Patchwork [3,of,3] py3: fix test-import-context.t

login
register
mail settings
Submitter Matt Harbison
Date Oct. 18, 2018, 2:09 a.m.
Message ID <b08be5625c0094a2fdd6.1539828542@Envy>
Download mbox | patch
Permalink /patch/36115/
State Accepted
Headers show

Comments

Matt Harbison - Oct. 18, 2018, 2:09 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1539827689 14400
#      Wed Oct 17 21:54:49 2018 -0400
# Node ID b08be5625c0094a2fdd6cc00bec2a4dcdcc9ea75
# Parent  0f8e789ea9450bd401cadd53cdf1cb81ec688cb2
py3: fix test-import-context.t

Patch

diff --git a/tests/test-import-context.t b/tests/test-import-context.t
--- a/tests/test-import-context.t
+++ b/tests/test-import-context.t
@@ -19,7 +19,10 @@  Test applying context diffs
   > EOF
   $ cat > cat.py <<EOF
   > import sys
-  > sys.stdout.write(repr(open(sys.argv[1], 'rb').read()) + '\n')
+  > from mercurial import pycompat
+  > from mercurial.utils import stringutil
+  > pycompat.stdout.write(b'%s\n'
+  >                       % stringutil.pprint(open(sys.argv[1], 'rb').read()))
   > EOF
 
 Initialize the test repository