diff -r 0d95ad9fc5f4 -r 40381a88bab4 tests/test-wireproto.py --- a/tests/test-wireproto.py Fri Apr 27 11:50:24 2018 -0400 +++ b/tests/test-wireproto.py Fri Apr 27 11:55:04 2018 -0400 @@ -1,5 +1,7 @@ from __future__ import absolute_import, print_function +import sys + from mercurial import ( error, pycompat, @@ -9,6 +11,9 @@ wireprotov1peer, wireprotov1server, ) +from mercurial.utils import ( + stringutil, +) stringio = util.stringio class proto(object): @@ -92,10 +97,15 @@ srv = serverrepo() clt = clientpeer(srv, uimod.ui()) -print(clt.greet(b"Foobar")) +def printb(data, end=b'\n'): + out = getattr(sys.stdout, 'buffer', sys.stdout) + out.write(data + end) + out.flush() + +printb(clt.greet(b"Foobar")) with clt.commandexecutor() as e: fgreet1 = e.callcommand(b'greet', {b'name': b'Fo, =;: