#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())