Closed baris closed 11 years ago
Maybe this would be an appropriate time to try and unify how class_setup_teardown
and class_setup
/class_teardown
are handled?
Yes, that's what I'm trying to do in my branch. As I said it's still a work in progress. https://github.com/baris/Testify/commit/e4271d80a3656ac2b56444bdb77da7937481db90 shows the gist of the change I suppose, but I'll have to clean things up and as stated in the comments fix the ordering using/changing __init_fixture_methods. I didn't have the time to work on that yet, but hoping to do so soon...
Testify runs all class_setup methods respecting the MRO and then runs all class_setup_teardown methods.
It is confusing because the general understanding is that testify would always run Base classes class_setup methods (and class_setup_teardown method's setup phase) before running the methods in the Derived class.
Added a test to illustrate the issue in a private my branch (the branch is WIP but I believe the test case is valid): https://github.com/baris/Testify/blob/bmetin_class_setup_teardown/test/test_case_test.py#L257