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
--- 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