setup,teardown的优先级

模块级(setup_module/teardown_module)在模块始末调用
函数级(setup_function/teardown_module)在函数始末调用(在类外部)
类级(setup_class/teardown_class)在类始末调用(在类中)
方法级(setup_method/teardown_method)在方法始末调用(在类中)
方法级(setup/teardown)在方法始末调用(在类中)
调用顺序
setup_module > setup_class > setup_method > setup > teardown > teardown_method > teardown_class > teardown_module

你可能感兴趣的:(setup,teardown的优先级)