changeset 36077:c1e01b1d5543

py3: fix file i/o in test-status.t Use raw string literal for open() mode and pass the proper data type to write(). Differential Revision: https://phab.mercurial-scm.org/D2140
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 11 Feb 2018 13:00:00 -0800
parents 15c8c4ac5d9c
children 0fb0c304ebd6
files tests/test-status.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-status.t	Sun Feb 11 12:55:50 2018 -0800
+++ b/tests/test-status.t	Sun Feb 11 13:00:00 2018 -0800
@@ -465,12 +465,12 @@
 
   $ hg init repo5
   $ cd repo5
-  >>> open("010a", "wb").write("\1\nfoo")
+  >>> open("010a", r"wb").write(b"\1\nfoo")
   $ hg ci -q -A -m 'initial checkin'
   $ hg status -A
   C 010a
 
-  >>> open("010a", "wb").write("\1\nbar")
+  >>> open("010a", r"wb").write(b"\1\nbar")
   $ hg status -A
   M 010a
   $ hg ci -q -m 'modify 010a'