unittest buffing output on windows?

Roy Smith roy at panix.com
Mon Dec 7 14:46:47 EST 2009


I'm running 2.5.1.  I've got a test suite that takes about 15 minutes
to complete.  On my unix boxes, as each test case executes, it prints
out a line (I'm using unittest.TextTestRunner(verbosity=2)) of status,
but on my windows box (running under cygwin), it buffers everything
until the entire test suite is completed.

I can stick sys.stdout.flush() and sys.stderr.flush() in my tearDown()
method, which gets me output, but that doesn't seem like the right
solution.  Is there a better way to get the test runner to flush
output  after every test case?



More information about the Python-list mailing list