Mercurial > hg
diff tests/test-hardlinks.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 | c2c8962a9465 |
children | 0a57945aaf7f |
line wrap: on
line diff
--- a/tests/test-hardlinks.t Sat May 19 18:51:14 2018 +0530 +++ b/tests/test-hardlinks.t Sat May 19 18:52:56 2018 +0530 @@ -122,7 +122,7 @@ $ cd r3/d1 >>> f = open('data1', 'wb') >>> for x in range(10000): - ... f.write("%s\n" % str(x)) + ... f.write(b"%d\n" % x) and None >>> f.close() $ for j in 0 1 2 3 4 5 6 7 8 9; do > cat data1 >> f2