Patchwork D2893: py3: make tests/test-log-linerange.t work on Python 3

login
register
mail settings
Submitter phabricator
Date March 19, 2018, 7:30 a.m.
Message ID <differential-rev-PHID-DREV-6xjddhggezkjkd4kyrnu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29607/
State Superseded
Headers show

Comments

phabricator - March 19, 2018, 7:30 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Made sure we write bytes to file and we suppress the return value of open().

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-log-linerange.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-log-linerange.t b/tests/test-log-linerange.t
--- a/tests/test-log-linerange.t
+++ b/tests/test-log-linerange.t
@@ -871,7 +871,7 @@ 
 Binary files work but without diff hunks filtering.
 (Checking w/ and w/o diff.git option.)
 
-  >>> open('binary', 'wb').write('this\nis\na\nbinary\0')
+  >>> open('binary', 'wb').write(b'this\nis\na\nbinary\0') and None
   $ hg add binary
   $ hg ci -m 'add a binary file' --quiet
   $ hg log -f -L binary,1:2 -p