Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upClass Method teardown() is Called by pytest, even though it is not documented #6973
Labels
Comments
|
I assume this is part of the general mapping of camelCase to snake_case conversion that pytest's unittest integration does... so it's probably treating it like https://docs.python.org/3/library/unittest.html#unittest.TestCase.tearDown Hopefully someone who uses this plugin can tell us what's happening! |
|
This is done by nose.py, probably to support the corresponding nose features. The documentation could be a bit clearer about it though, I'm guessing. |
|
would it be sensible to simply start to deprecate nose support, as far as i can tell the nose project is done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


According to your documentation (https://docs.pytest.org/en/latest/xunit_setup.html), I can name a method teardown() in a test class, and it should not get run by pytest. I am using version pytest-3.8.2.
Pytest calls a method called teardown on class destruction even though it is specified as teardown_class in your documentation. I am guessing this accidentally did not get removed, when the names changed to teardown_class().
example:
output: