-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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 <[email protected]>
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
🤖 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. |
…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).
FYI-- This also broke We should be able to workaround it, but just wanted to point this out. It seems strange for |
…ipped. `startTest` may not be called in this case, after the change in python/cpython#106588. PiperOrigin-RevId: 597675639
…ipped. `startTest` may not be called in this case, after the change in python/cpython#106588. PiperOrigin-RevId: 597675639
…ipped. `startTest` may not be called in this case, after the change in python/cpython#106588. PiperOrigin-RevId: 597675639
…ipped. `startTest` may not be called in this case, after the change in python/cpython#106588. PiperOrigin-RevId: 597675639
…ipped. `startTest` may not be called in this case, after the change in python/cpython#106588. PiperOrigin-RevId: 597675639
…ipped. `startTest` may not be called in this case, after the change in python/cpython#106588. PiperOrigin-RevId: 597840713
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).
* Add Python 3.12 builds The migrator seems confused by another package from a split feedstock that also produces non-Python packages that qiskit-aer depends on not having Python 3.12 builds yet, so this is a manual migration. Explicitly exclude TestNoiseTransformer tests because they require cvxpy. Previously they were skipped by unittest when cvxpy was not installed but test skipping was broken by Python 3.12.1 (see testing-cabal/testtools#371 and python/cpython#106588), so we had to explicitly skip the tests with the test runner.
…ython#106588)" This reverts commit 8fc0713.
…in Python 3.12 (pythonGH-106588)" (pythonGH-114470) This reverts commit 8fc0713. (cherry picked from commit ecabff9) Co-authored-by: Serhiy Storchaka <[email protected]>
…in Python 3.12 (python#106588)" (pythonGH-114470) This reverts commit 8fc0713.
…in Python 3.12 (python#106588)" (pythonGH-114470) This reverts commit 8fc0713.
…6588) Co-authored-by: sunmy2019 <[email protected]> Co-authored-by: Nikita Sobolev <[email protected]>
Increase the number of running tests only if a test hasn't been skipped.
unittest
#106584