Currently I try to create an unit test which opens a file (with the corresponding application) and then the test-run should wait until the program is closed.
def test_HFG(self):
#....
print "please edit this file"
os.chdir(r'C:\test\a')
os.startfile("myfile.vdx")
# here I need a "stop until the program is closed"-function
#....
Does anyone have any idea how to realize(as simple as possible) my plan?
From the docs:
If you know the path of the application to open the file with, you could use subprocess.Popen() which allows for you to wait.
See:
http://docs.python.org/library/os.html#os.startfile
http://docs.python.org/library/subprocess.html#subprocess.Popen