[issue2787] Patch to flush unittest output

Adam Olsen report at bugs.python.org
Wed May 7 23:27:27 CEST 2008


New submission from Adam Olsen <rhamph at gmail.com>:

In 3.0, unittest's output has become line buffered.  Instead of printing
the test name when it starts a test, then "ok" when it finishes, the
test name is delayed until the "ok" is printed.  This makes it
unnecessarily hard to determine which test is hanging or segfaulted.

The attached patch adds explicit flushes.

An alternative approach would be to force stdout to be unbuffered
somehow.  I don't know how difficult that would be.

----------
files: python-unittest_flush.diff
keywords: patch
messages: 66375
nosy: Rhamphoryncus
severity: normal
status: open
title: Patch to flush unittest output
versions: Python 3.0
Added file: http://bugs.python.org/file10211/python-unittest_flush.diff

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2787>
__________________________________


More information about the Python-bugs-list mailing list