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
Skip not properly propagated and wrongly shown as ok #139255
I have just updated a testbench from python3.8 to python3.10. To display the status of the tests I use pydev in Eclipse.
With 3.10 skipped tests are not shown as skipped in the GUI.
I debugged and disected and found this PR as the cause: #27831
The issue for it: #89118
I have no deep understanding for the unittest code, but I think (and debugging shows) the reason it breaks is because we clear self._outcome before we commit (if this is the right term?) the data via stopTestRun()
I do not use the skipdecorator but raise a SkipTest Exception.
I am not totally sure if the behaviour is wanted or not. I could not find a report that has a similar problem.
Pinging @serhiy-storchaka because it was your PR and it seems you know the module quite well. I could probably write a Patch so that it works for me, but I have no idea if I am just using something wrong. If you need any additional infos I am glad to help.
Thank you for your report, @herostrat. If I understand you correctly, you use a third-party wrapper around unittest which provides a custom TestResult. In its stopTestRun() or, more likely, stopTest() method it accesses the _outcome attribute of TestCase, but it is already cleared when these methods are called. Is it correct?
Did you report the bug to PyDev or who provides the test runner? It is a private attribute, so the code that uses it risks to stop working in the new Python version. Its content should already be moved to the TestResult instance before these methods are called. If there are still good reasons to use _outcome, we can postpone its clearing until the stopTest() and stopTestRun() methods are called, although it will lead to more complicated code. But we need to know these reasons. We cannot change versions 3.9-3.12.
Activity
terryjreedy commentedon Sep 23, 2025
3.12 and before only get security fixes. Please retest with 3.13 or later.
serhiy-storchaka commentedon Sep 23, 2025
Thank you for your report, @herostrat. If I understand you correctly, you use a third-party wrapper around
unittestwhich provides a customTestResult. In itsstopTestRun()or, more likely,stopTest()method it accesses the_outcomeattribute ofTestCase, but it is already cleared when these methods are called. Is it correct?Did you report the bug to PyDev or who provides the test runner? It is a private attribute, so the code that uses it risks to stop working in the new Python version. Its content should already be moved to the
TestResultinstance before these methods are called. If there are still good reasons to use_outcome, we can postpone its clearing until thestopTest()andstopTestRun()methods are called, although it will lead to more complicated code. But we need to know these reasons. We cannot change versions 3.9-3.12.StanFromIreland commentedon Sep 5, 2026
Closing as the author never replied to Serhiy's questions.