py3: suppress the output from .write() calls in the remaining tests
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 29 Sep 2018 02:02:35 -0400
changeset 39903 803b7569c9ea
parent 39902 8d6ab33a61b2
child 39904 5fe0b880200e
py3: suppress the output from .write() calls in the remaining tests
tests/test-casefolding.t
tests/test-hgweb-json.t
tests/test-keyword.t
tests/test-revlog.t
--- a/tests/test-casefolding.t	Fri Sep 28 23:17:06 2018 -0400
+++ b/tests/test-casefolding.t	Sat Sep 29 02:02:35 2018 -0400
@@ -248,7 +248,7 @@
 X will be using HFS+. If that's not true, this test will fail.
 
   $ rm A
-  >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun')
+  >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun') and None
   $ hg status
   M A
 
--- a/tests/test-hgweb-json.t	Fri Sep 28 23:17:06 2018 -0400
+++ b/tests/test-hgweb-json.t	Sat Sep 29 02:02:35 2018 -0400
@@ -2201,7 +2201,7 @@
 Commit message with null character
 
   $ echo foo >> da/foo
-  >>> open('msg', 'wb').write('commit with null character: \0\n')
+  >>> open('msg', 'wb').write('commit with null character: \0\n') and None
   $ hg ci -l msg
   $ rm msg
 
--- a/tests/test-keyword.t	Fri Sep 28 23:17:06 2018 -0400
+++ b/tests/test-keyword.t	Sat Sep 29 02:02:35 2018 -0400
@@ -214,7 +214,7 @@
 
 hg status of kw-ignored binary file starting with '\1\n'
 
-  >>> open("i", "wb").write("\1\nfoo")
+  >>> open("i", "wb").write("\1\nfoo") and None
   $ hg -q commit -Am metasep i
   $ hg status
   >>> open("i", "wb").write("\1\nbar")
--- a/tests/test-revlog.t	Fri Sep 28 23:17:06 2018 -0400
+++ b/tests/test-revlog.t	Sat Sep 29 02:02:35 2018 -0400
@@ -37,7 +37,7 @@
   >>> open("a.i", "wb").write(
   ... b"""eJxjYGZgZIAAYQYGxhgom+k/FMx8YKx9ZUaKSOyqo4cnuKb8mbqHV5cBCVTMWb1Cwqkhe4Gsg9AD
   ... Joa3dYtcYYYBAQ8Qr4OqZAYRICPTSr5WKd/42rV36d+8/VmrNpv7NP1jQAXrQE4BqQUARngwVA=="""
-  ... .decode("base64").decode("zlib"))
+  ... .decode("base64").decode("zlib")) and None
 
   $ hg debugrevlogindex a.i
      rev linkrev nodeid       p1           p2