标签:pat test getcwd Suite str loader port 获取 mic
#alltest.py中内容如下
import unittest,os
def all():
#path="D:\\study\\python_api_test\\test1203" #手动添加路径
path=os.getcwd() #获取路径
files=unittest.defaultTestLoader.discover(path,
pattern="hui*.py",
top_level_dir=None)
lastall=unittest.TestSuite()
lastall.addTest(files)
return lastall
if __name__=="__main__":
unittest.TextTestRunner().run(all())
标签:pat test getcwd Suite str loader port 获取 mic
原文地址:https://www.cnblogs.com/canglongdao/p/11980349.html