前置/后置条件
- 方法前置/后置:setup/teardown、setup_method/teardown_method #二者区别:调用顺序:setup_method > setup
- 类前置/后置:setup_class/teardown_calss(在类内部)
- 函数前置/后置:setup_function/teardown_function(在类外部)
- 模块前置/后置:setup_module/teardown_module
调用顺序
- setup_module --> setup_class -->setup_method --> setup
- teardown -->teardown_method --> teardown_class --> teardown_module