bpo-30856: Update TestResult early, without buffering in _Outcome#28180
Conversation
TestResult methods addFailure(), addError(), addSkip() and addSubTest() are now called immediately after raising an exception in test or finishing a subtest. Previously they were called only after finishing the test clean up.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
I am merging it now. We can continue the discussion if you show a case in which additional checks would be helpful. |
Sorry, something went wrong.
…thonGH-28180) TestResult methods addFailure(), addError(), addSkip() and addSubTest() are now called immediately after raising an exception in test or finishing a subtest. Previously they were called only after finishing the test clean up.
…thon#28180. After the change, the errors from the test case were no longer buffered in `_Outcome`. Instead, we need to take a note of errors on the `TestResult` before, then compare errors after. PiperOrigin-RevId: 461070558 Change-Id: I7d9f769cd46143a886bc5edeb224804acd8dbaf9
|
This change makes it no longer possible to get test errors during the execution of a cleanup function added by The errors are now immediately sent to Line 74 in 26a0282 Lines 94 to 99 in 26a0282 The actually implementation of So the question is: After this change, how can a cleanup function get test errors and act accordingly? Thanks for your help in advance. |
Sorry, something went wrong.
TestResult methods addFailure(), addError(), addSkip() and
addSubTest() are now called immediately after raising an exception
in test or finishing a subtest. Previously they were called only
after finishing the test clean up.
https://bugs.python.org/issue30856