◐ Shell
clean mode source ↗

bpo-30856: Update TestResult early, without buffering in _Outcome by serhiy-storchaka · Pull Request #28180 · python/cpython

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.

@serhiy-storchaka

ambv

Co-authored-by: Łukasz Langa <lukasz@langa.pl>

niyas-sait pushed a commit to niyas-sait/cpython that referenced this pull request

Sep 21, 2021
…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.

yilei added a commit to yilei/abseil-py that referenced this pull request

Jul 18, 2022
…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