Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-89392: Remove support of test_main() in libregrtest#108876
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-89392: Remove support of test_main() in libregrtest#108876
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, but I would prefer a better error message if a test module has a test_main() function.
Lib/test/libregrtest/runtest.py Outdated
| else: | ||
| deftest_func(): | ||
| returnrun_unittest(test_mod) | ||
| assertnothasattr(test_mod,"test_main") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you please replace the assert with a regular exception. Like:
ifhasattr(test_mod,"test_main"):raiseException("Module {result.test_name} defines test_main() which is no longer supported by regrtest")
Maybe add a comment linking tohttps://github.com/python/cpython/issues/89392.
Uh oh!
There was an error while loading.Please reload this page.
miss-islington commentedSep 5, 2023
Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
bedevere-bot commentedSep 5, 2023
There's a new commit after the PR has been approved. @vstinner: please review the changes made to this pull request. |
miss-islington commentedSep 5, 2023
Sorry,@serhiy-storchaka, I could not cleanly backport this to |
miss-islington commentedSep 5, 2023
Sorry,@serhiy-storchaka, I could not cleanly backport this to |
…ythonGH-108876).(cherry picked from commit04a0830)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
bedevere-bot commentedSep 5, 2023
GH-108897 is a backport of this pull request to the3.12 branch. |
…ythonGH-108876).(cherry picked from commit04a0830)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
bedevere-bot commentedSep 5, 2023
GH-108898 is a backport of this pull request to the3.11 branch. |
Uh oh!
There was an error while loading.Please reload this page.