# HG changeset patch # User Gregory Szorc # Date 2019-01-24 01:45:11 # Node ID 84707d9e77a027b76952ee6952b9833093df8000 # Parent 13ccb03f21451acb5b0af36739c87297323fb671 tests: write directly to stdout to avoid b'' prefixes This enables the test to pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5668 diff --git a/tests/test-mq-eol.t b/tests/test-mq-eol.t --- a/tests/test-mq-eol.t +++ b/tests/test-mq-eol.t @@ -30,10 +30,14 @@ Test interactions between mq and patch.e $ cat > cateol.py < import sys + > try: + > stdout = sys.stdout.buffer + > except AttributeError: + > stdout = sys.stdout > for line in open(sys.argv[1], 'rb'): > line = line.replace(b'\r', b'') > line = line.replace(b'\n', b'') - > print(line) + > stdout.write(line + b'\n') > EOF $ hg init repo