[Python-3000] Odd output from test -- buffering bug?

Bill Janssen janssen at parc.com
Sun Oct 28 00:27:08 CEST 2007


I'm seeing a sort of odd thing going on when running one of my tests.
I'm seeing two lines of output, from two different threads, being
duplicated when I run with "regrtest -u all -v test_ssl".  This is
with the latest 3K sources on PPC OS X 10.4.10.

testSTARTTLS (test.test_ssl.ThreadedTests) ... 
 client:  sending b'msg 1'...
^@client:  sending b'msg 1'...
 server:  new connection from ('127.0.0.1', 52371)
 server:  new connection from ('127.0.0.1', 52371)

This is output to an Emacs shell buffer, so it shows control
characters in the output, and I'm seeing a NUL character being output
there at the beginning of the third line.  Both of the duplicated lines
are being output with code like this:

    if test_support.verbose:
        sys.stdout.write(
            " client:  sending %s...\n" % repr(msg))

This looks like some kind of buffering bug.  Is it in the test
harness, or the standard I/O library?

Bill



More information about the Python-3000 mailing list