You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Return the correct exit code if all tests have been skipped in unittest #106584
In Python 3.12, a new exit code (5, instead of 0) was added if all tests were skipped in unittest. But in some cases it still returns 0. See code examples.
I think that it was a wrong change, and not only because it makes startTest() and stopTest() calls unbalanced (#113267), but because it does not solve the original issue. The third example should be equivalent to the second example:
Activity
pythonGH-106584: Fix exit code for unittest in Python 3.12
pythonGH-106584: Apply comment suggestion
pythonGH-106584: Remove the version info in the NEWS
pythonGH-106584: Remove empty line in the NEWS
pythonGH-106584: Check buffers before seek
gh-106584: Fix exit code for unittest in Python 3.12 (#106588)
pythongh-106584: Fix exit code for unittest in Python 3.12 (pythonGH-…
pythongh-106584: Fix exit code for unittest in Python 3.12 (python#10…
[3.12] gh-106584: Fix exit code for unittest in Python 3.12 (GH-106588)…
1 remaining item
Revert "pythongh-106584: Fix exit code for unittest in Python 3.12 (p…
serhiy-storchaka commentedon Jan 23, 2024
I think that it was a wrong change, and not only because it makes
startTest()andstopTest()calls unbalanced (#113267), but because it does not solve the original issue. The third example should be equivalent to the second example:But it gets error code 0 while the second example gets error code 5.
It also gives a wrong answer to the problem. #113661 fixes it in the opposite way.
gh-113267: Revert "gh-106584: Fix exit code for unittest in Python 3.…
pythongh-113267: Revert "pythongh-106584: Fix exit code for unittest …
[3.12] gh-113267: Revert "gh-106584: Fix exit code for unittest in Py…
pythongh-113267: Revert "pythongh-106584: Fix exit code for unittest …
pythongh-113267: Revert "pythongh-106584: Fix exit code for unittest …
carljm commentedon Feb 29, 2024
Looks like this change has been reverted, and #113661 PRs are merged also, and that issue is closed. Seems there is nothing left to do here?
pythongh-106584: Fix exit code for unittest in Python 3.12 (python#10…