Created
June 26, 2014 03:36
-
-
Save isdyy/05db9ba531a6ce4895bc to your computer and use it in GitHub Desktop.
pytest method hook order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestOrder(object): | |
def test_hook(self): | |
pass | |
def setup_method(self, method): | |
print 'setup_method' | |
def setup(self): | |
print 'setup' | |
def teardown(self): | |
print 'teardown' | |
def teardown_method(self, method): | |
print 'teardown_method' | |
# >> Result: | |
# | |
# setup_method | |
# setup | |
# teardown | |
# teardown_method |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment