• Jérome Perrin's avatar
    Treat program output as binary for python3 support · beb9d47e
    Jérome Perrin authored
    While treating output as text would not really be impossible, treating it
    as bytes seems a better choice because:
     - we don't have to make assumptions about what output encoding the test
       program is using for output
     - `tee` can just read stream output bytes by bytes without having to worry
       about multi-bytes characters
     - testnode protocol uses xmlrpc.client.Binary, which uses bytes.
    
    Because using bufsize=1 implies reading subprocess output as text, we use
    bufsize=0 instead in the subprocess.Popen call, to prevent buffering.
    
    To make manipulation of strings and bytes easier, we add a dependency on
    pygolang, so that we can use its strings utility functions.
    
    Also add a few tests to verify general functionality.
    beb9d47e
setup.py 894 Bytes