Patchwork D3218: py3: use sys.stdout instead of print in test-mq-qpush-fail.t

login
register
mail settings
Submitter phabricator
Date April 11, 2018, 11:21 a.m.
Message ID <5bbd2d01d968ff12ae7c82082f6451c0@localhost.localdomain>
Download mbox | patch
Permalink /patch/30679/
State Not Applicable
Headers show

Comments

phabricator - April 11, 2018, 11:21 a.m.
pulkit updated this revision to Diff 7964.
pulkit retitled this revision from "py3: use print as a function in test-mq-qpush-fail.t" to "py3: use sys.stdout instead of print in test-mq-qpush-fail.t".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3218?vs=7930&id=7964

REVISION DETAIL
  https://phab.mercurial-scm.org/D3218

AFFECTED FILES
  tests/test-mq-qpush-fail.t

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: yuja, mercurial-devel

Patch

diff --git a/tests/test-mq-qpush-fail.t b/tests/test-mq-qpush-fail.t
--- a/tests/test-mq-qpush-fail.t
+++ b/tests/test-mq-qpush-fail.t
@@ -31,7 +31,7 @@ 
   popping patch2
   popping patch1
   patch queue now empty
-  $ $PYTHON -c 'print "\xe9"' > message
+  $ $PYTHON -c 'import sys; stdout = getattr(sys.stdout, "buffer", sys.stdout); stdout.flush(); stdout.write("\xe9\n")' > message
   $ cat .hg/patches/bad-patch >> message
   $ mv message .hg/patches/bad-patch
   $ cat > $TESTTMP/wrapplayback.py <<EOF