-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
teardown_class not being run #5201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I attempted to recreate the issue with a simple test, but was unable, so there's something else going on that I don't yet understand. |
Hi @jaraco, Thanks. We do have tests for |
JFI: there are issues reported by users of pytest-django also in this regard (caused by pytest handling unittests more itself now). The latest one being pytest-dev/pytest-django#753, with some references to others. |
I wasn't using |
Uh oh!
There was an error while loading. Please reload this page.
I've started to notice after running the tests for pmxbot that some of the files that are meant to be deleted ('tests/functional/testconf.yaml', 'sqllite.sqllite') are lingering on the file system.
The
teardown_class
methods are supposed to be cleaning up those things, and they used to, but now they're not, likely due to an update of pytest.Here's the pip list:
I've added a "raise ValueError()" into the
teardown_class
methods (such as this one), but no error occurs during the test run, so I suspect that pytest is somehow no longer honoring teardown_class.Perhaps something was changed that causes
teardown_class
to only be honored for the test classes themselves (and not their base classes). I hope to do more investigation later.The text was updated successfully, but these errors were encountered: