Skip to content
Snippets Groups Projects
Commit 2f40bcebad30 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

py3: suppress the return value from .write() call

Differential Revision: https://phab.mercurial-scm.org/D4591
parent c8e371ee65a4
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@
$ mkdir dir
$ echo b > dir/b
$ echo d > dir/d
$ $PYTHON -c 'open("bin", "wb").write(b"a\\x00b")'
$ $PYTHON -c 'open("bin", "wb").write(b"a\\x00b") and None'
$ echo c > c
$ mtn add a dir/b dir/d c bin
mtn: adding 'a' to workspace manifest
......@@ -65,7 +65,7 @@
$ echo b >> dir/b
$ mtn drop c
mtn: dropping 'c' from workspace manifest
$ $PYTHON -c 'open("bin", "wb").write(b"b\\x00c")'
$ $PYTHON -c 'open("bin", "wb").write(b"b\\x00c") and None'
$ mtn ci -m update1
mtn: beginning commit on branch 'com.selenic.test'
mtn: committed revision 51d0a982464573a2a2cf5ee2c9219c652aaebeff
......@@ -218,7 +218,7 @@
test large file support (> 32kB)
>>> fp = open('large-file', 'wb')
>>> for x in range(10000): fp.write(b'%d\n' % x)
>>> for x in range(10000): fp.write(b'%d\n' % x) and None
>>> fp.close()
$ md5sum.py large-file
5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file
......
......@@ -57,7 +57,7 @@
>>> with open('a', 'rb') as f:
... data = f.read()
>>> with open('a', 'wb') as f:
... f.write(data.replace(b'dd', b'dd \r'))
... f.write(data.replace(b'dd', b'dd \r')) and None
$ hg diff --nodates
\x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc)
\x1b[0;31;1m--- a/a\x1b[0m (esc)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment