From patchwork Mon Mar 19 07:30:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2893: py3: make tests/test-log-linerange.t work on Python 3 From: phabricator X-Patchwork-Id: 29607 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Mon, 19 Mar 2018 07:30:59 +0000 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 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