-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
Rename module-global test methods #39208
base: develop
Are you sure you want to change the base?
Conversation
Pytest automatically identifies and runs all methods prefixed with `test_`, following the standard convention for denoting tests. In the Sage codebase, there are numerous methods with the `test_` prefix. While many of these are indeed intended for testing purposes, they do not conform to Pytest's requirements for valid tests. To address this, we are temporarily renaming these methods, with the goal of eventually converting them into proper Pytest tests in the future.
Documentation preview for this PR (built with commit db16597; changes) is ready! 🎉 |
How about pytest.mark.skip? This risks being a breaking change. |
That might work as well, but then they would show up as "skipped tests" in pytest - which is also not really nice. |
I just come across a solution that doesn't involve changing the name https://stackoverflow.com/a/71164113 (though not sure if it's worth) |
Thanks! If someone dislikes the renames here, this would indeed be a nice workaround. |
Pytest automatically identifies and runs all methods prefixed with
test_
, following the standard convention for denoting tests. In the Sage codebase, there are numerous methods with thetest_
prefix. While many of these are indeed intended for testing purposes, they do not conform to Pytest's requirements for valid tests. To address this, we are temporarily renaming these methods, with the goal of eventually converting them into proper Pytest tests in the future.📝 Checklist
⌛ Dependencies