[PATCH 3 of 3] py3: suppress the output from .write() calls in the remaining tests
Matt Harbison
mharbison72 at gmail.com
Sat Sep 29 02:20:09 EDT 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1538200955 14400
# Sat Sep 29 02:02:35 2018 -0400
# Node ID 5d581713ab9594105a1a8ad989277b85e4230b2f
# Parent e3fa739c298dc8f34d10b882e324380c5d0638fa
py3: suppress the output from .write() calls in the remaining tests
diff --git a/tests/test-casefolding.t b/tests/test-casefolding.t
--- a/tests/test-casefolding.t
+++ b/tests/test-casefolding.t
@@ -248,7 +248,7 @@ We assume anyone running the tests on a
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
diff --git a/tests/test-hgweb-json.t b/tests/test-hgweb-json.t
--- a/tests/test-hgweb-json.t
+++ b/tests/test-hgweb-json.t
@@ -2201,7 +2201,7 @@ Commit message with Japanese Kanji 'Noh'
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
diff --git a/tests/test-keyword.t b/tests/test-keyword.t
--- a/tests/test-keyword.t
+++ b/tests/test-keyword.t
@@ -214,7 +214,7 @@ hg cat files and symlink, no expansion
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")
diff --git a/tests/test-revlog.t b/tests/test-revlog.t
--- a/tests/test-revlog.t
+++ b/tests/test-revlog.t
@@ -37,7 +37,7 @@ Test for CVE-2016-3630
>>> 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
More information about the Mercurial-devel
mailing list