changeset 33305:aaa1f8f514cf

py3: fix test-diff-newlines.t to be compatible with py3
author Boris Feld <boris.feld@octobus.net>
date Thu, 06 Jul 2017 17:18:50 +0200
parents 3e1accab7447
children a9808bd1449e
files contrib/python3-whitelist tests/test-diff-newlines.t
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Thu Jul 06 14:48:16 2017 -0700
+++ b/contrib/python3-whitelist	Thu Jul 06 17:18:50 2017 +0200
@@ -11,6 +11,7 @@
 test-contrib-check-commit.t
 test-ctxmanager.py
 test-diff-issue2761.t
+test-diff-newlines.t
 test-diff-reverse.t
 test-diff-subdir.t
 test-dirstate-nonnormalset.t
--- a/tests/test-diff-newlines.t	Thu Jul 06 14:48:16 2017 -0700
+++ b/tests/test-diff-newlines.t	Thu Jul 06 17:18:50 2017 +0200
@@ -1,6 +1,6 @@
   $ hg init
 
-  $ $PYTHON -c 'file("a", "wb").write("confuse str.splitlines\nembedded\rnewline\n")'
+  $ $PYTHON -c 'open("a", "wb").write(b"confuse str.splitlines\nembedded\rnewline\n")'
   $ hg ci -Ama -d '1 0'
   adding a