① setup():每个测试函数运行前运行
② teardown():每个测试函数运行完后执行

③ setUpClass():必须使用@classmethod 装饰器,所有test运行前运行一次

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

相关文章: