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
gh-106584: Fix exit code for unittest in Python 3.12 #106588
gh-106584: Fix exit code for unittest in Python 3.12 #106588
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
2b0b119
to
9efdf58
Compare
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Increase the number of running tests only if it hasn't been skipped.
9efdf58
to
6e1be71
Compare
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
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 please add a NEWS entry!
Misc/NEWS.d/next/Library/2023-07-11-08-56-40.gh-issue-106584.g-SBtC.rst
Outdated
Show resolved
Hide resolved
🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit 9779a2b 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
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.
No need to specify the version info in the NEWS.
Misc/NEWS.d/next/Library/2023-07-11-08-56-40.gh-issue-106584.g-SBtC.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit 6313c98 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
We got some failed tests. Most are unrelated, but we might need to rule them out. |
Thanks @EliseevEgor for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
GH-109725 is a backport of this pull request to the 3.12 branch. |
…6588) Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
…ss_db_feature() test on Python 3.12.1+. Python 3.12.1+ no longer includes skipped tests in the number of running tests. Check out: python/cpython#110890 (comment) python/cpython#106588
…ss_db_feature() test on Python 3.12.1+. Python 3.12.1+ no longer includes skipped tests in the number of running tests. Check out: python/cpython#110890 (comment) python/cpython#106588
…ss_db_feature() test on Python 3.12.1+. Python 3.12.1+ no longer includes skipped tests in the number of running tests. Check out: python/cpython#110890 (comment) python/cpython#106588
…ass_unless_db_feature() test on Python 3.12.1+. Python 3.12.1+ no longer includes skipped tests in the number of running tests. Check out: python/cpython#110890 (comment) python/cpython#106588 Backport of 20b7aac from main
…ass_unless_db_feature() test on Python 3.12.1+. Python 3.12.1+ no longer includes skipped tests in the number of running tests. Check out: python/cpython#110890 (comment) python/cpython#106588 Backport of 20b7aac from main
It doesn't seem like this ought to have been backported. It includes an incompatible change in the long-established protocol between a test runner and a test results object. One consequence is that it has broken trial's multiprocess test runner (twisted/twisted#12052). |
In Python 3.12.1 python/cpython#106588 was backported which changed the execution behavior of the unittest runner. After python/cpython#106588 startTest() is no longer being called if a test is skipped. This causes knock-on effects in testtools because the test result subclasses were assuming that startTest() was always called when stopTest() was called. To handle this change in behavior when running with Python 3.12.1 this commit adds a check to only deal with tags if they exist (when startTest() is run).
Increase the number of running tests only if a test hasn't been skipped.
unittest
#106584