在我的计划时,我把这个文件名:文件名字符串不工作
msTestPrompt = r'"C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe"'
它不工作,它说,文件名,目录名或卷语法不正确。我已经尝试过几乎所有的方法来解决这个问题,无论我对字符串做什么,我都无法使它工作。预先感谢您的帮助。
编辑:下面是使用文件名字符串
p = subprocess.Popen([msTestPrompt, blah], shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
EDIT2:这里是胡说变量:
resultsFile = "/resultsfile:" + os.path.normpath('"C:/BB1.trx"')
testSettings = "/testsettings:" + os.path.normpath('"C:/Users/bgb/Documents/Brent/Code/Visual Studio/Local.testsettings"')
testContainer = '/testcontainer:"C:\Users\bgb\Documents\Brent\Code\Visual Studio\DesignF.UnitTests\bin\Debug\DesignF-UnitTests.dll"'
blah = str(' ' + testContainer + ' ' + resultsFile + ' ' + testSettings)
是那个*确切*代码?请注意,在第一种情况下,您有一个名为'msTestPrompt'的变量,但在另一个中使用'msBuildPrompt'。 msBuildPrompt的价值是什么? – bgporter