目前我尝试创建一个单元测试,它打开一个文件(与相应的应用程序),然后测试运行应该等到程序关闭。Python单元测试:打开并等待,直到程序关闭
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
#....
有没有人有任何想法如何实现(尽可能简单)我的计划?