]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 29 Oct 2018 21:07:50 +0000 (14:07 -0700)
committerGitHub <noreply@github.com>
Mon, 29 Oct 2018 21:07:50 +0000 (14:07 -0700)
commit7b689c68ab3236455f7d58954435d029e2bb2c8a
tree9cd5e0e558464a49a4c4c7561e4fea080b843a9d
parent4687bc993a275eaeb27a8b2068b128ce1f464818
bpo-34945: Buffer output in test suite only when creating junit file (GH-10204)

After commit d0f49d2f5085ca68e3dc8725f1fb1c9674bfb5ed, the output of the
test suite is always buffered as the test output needs to be included in
the JUnit file in same cases (as when a test fails). This has the
consequence that printing or using debuggers (like pdb) in the test
suite does not result in a good user experience anymore.

This commit modifies the test suite runner so it only captures the test
output when the JUnit file is requested to fix the regression so prints
and debuggers are usable again.
(cherry picked from commit 02277482ea765335e497ecd9661d4bde9b5ddc67)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Lib/test/support/__init__.py
Lib/test/support/testresult.py