D2140: py3: fix file i/o in test-status.t
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sun Feb 11 22:57:49 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Use raw string literal for open() mode and pass the proper data
type to write().
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2140
AFFECTED FILES
tests/test-status.t
CHANGE DETAILS
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -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'
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list