py3: use sys.stdout instead of print in test-mq-qpush-fail.t
authorPulkit Goyal <7895pulkit@gmail.com>
Tue, 10 Apr 2018 18:57:56 +0530
changeset 37524 5d81f1b7051b
parent 37523 d17cfb23017c
child 37525 a7de62adcf03
py3: use sys.stdout instead of print in test-mq-qpush-fail.t Differential Revision: https://phab.mercurial-scm.org/D3218
tests/test-mq-qpush-fail.t
--- a/tests/test-mq-qpush-fail.t	Tue Apr 10 18:57:32 2018 +0530
+++ b/tests/test-mq-qpush-fail.t	Tue Apr 10 18:57:56 2018 +0530
@@ -31,7 +31,7 @@
   popping patch2
   popping patch1
   patch queue now empty
-  $ $PYTHON -c 'print "\xe9"' > message
+  $ $PYTHON -c 'import sys; getattr(sys.stdout, "buffer", sys.stdout).write(b"\xe9\n")' > message
   $ cat .hg/patches/bad-patch >> message
   $ mv message .hg/patches/bad-patch
   $ cat > $TESTTMP/wrapplayback.py <<EOF