前戏
在前面我们都是在一个py文件里写测试用例,当然在实际项目中,肯定不会这么干,这样不是一个优秀的测试攻城狮,这时候我们就要查找不同目录下的测试来进行运行了
运行不同文件下的用例
先来看下文件结构
import unittest class Test_case01(unittest.TestCase): def test01(self): print('test01') def test02(self): print('test02') def test03(self): print('test03') def test04(self): print('test04') def test05(self): print('test05')