-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
remove nose-style test classes #24148
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
Hi! I'm trying to find the nose-settings in the pytest-config, but I could not find anything about nose-library except in the docs... |
I think the issue is that we are implicitly using nose-style classes that pytest has in the past happily discovered and ran them, but on the current development branch of pytest is starting to warn that this will be removed in the future. We have our tests set to fail on warning so this is causing test failures for us now (or well as soon as the next version of pytest is released). Hopefully we can get this addressed before then (by fixing it on main and pinning on the bug-fix branch) so we never see these failures on our CI and do not have to deal with this when it becomes a crisis. |
I think that only test classes with a setup method count as a Nose test? For e.g. the matplotlib/lib/matplotlib/tests/test_cbook.py Lines 53 to 176 in f0cd8de
one can either just create the data in every method (now a function) or, the more advanced way, create a pytest fixture with the data. For For I guess the thing to closely look for is coverage changes. If there are any, something went wrong. If the coverage it still the same, there is a chance it is correct. |
Would it be enough to just replace |
With the development version of pytest
I'm seeing the following errors locally
We are still using nose-stil test classes that we apparently need to migrate away from.
I'm labeling this "good first issue" because you do not need to understand anything about Matplotlib to do this work, but medium difficulty because it involves changing the tests which is a high-risk activity (as you do not have tests on your tests) so this is not a good issue for someone new to Python or testing frameworks.
The text was updated successfully, but these errors were encountered: