python的setup和teardown

关于python unittest

① setup():每个测试函数运行前运行
② teardown():每个测试函数运行完后执行
③ setUpClass():必须使用@classmethod 装饰器,所有test运行前运行一次

④ tearDownClass():必须使用@classmethod装饰器,所有test运行完后运行一次

猜你喜欢

转载自www.cnblogs.com/liurong07/p/9467332.html
今日推荐