changeset 36994:0baf0e3ee569

py3: make tests/test-log-linerange.t work on Python 3 Made sure we write bytes to file and we suppress the return value of open(). Differential Revision: https://phab.mercurial-scm.org/D2893
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Mar 2018 00:02:59 +0530
parents f4c7dc24e889
children d5d42c170f4d
files tests/test-log-linerange.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-log-linerange.t	Mon Mar 19 00:04:38 2018 +0530
+++ b/tests/test-log-linerange.t	Mon Mar 19 00:02:59 2018 +0530
@@ -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