Mercurial > public > mercurial-scm > hg
diff tests/test-import-merge.t @ 38086:b95a6fb7ae66
py3: fix .write() calls in few tests
This patch adds b'' prefixes to make sure we write bytes and add `and None` in
the end to suppress the output by .write() calls.
Differential Revision: https://phab.mercurial-scm.org/D3610
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sat, 19 May 2018 18:52:56 +0530 |
parents | eb586ed5d8ce |
children | f1186c292d03 |
line wrap: on
line diff
--- a/tests/test-import-merge.t Sat May 19 18:51:14 2018 +0530 +++ b/tests/test-import-merge.t Sat May 19 18:52:56 2018 +0530 @@ -143,7 +143,7 @@ $ hg export 2 | head -7 > ../a.patch $ hg export tip > out >>> apatch = open("../a.patch", "ab") - >>> apatch.write("".join(open("out").readlines()[7:])) + >>> apatch.write(b"".join(open("out", 'rb').readlines()[7:])) and None $ cd .. $ hg clone -qr0 repo3 repo3-clone