changeset 38377:fb4813304c5f

py3: add `and None` to suppress return values of .write() calls .write() calls don't return anything on Python2, so we need to make sure we suppress that on py3 too. This makes the test pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3793
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 18 Jun 2018 16:07:46 +0530
parents c7eb9bce6041
children f4f1fb1cbfb4
files contrib/python3-whitelist tests/test-transplant.t
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python3-whitelist	Mon Jun 18 16:06:28 2018 +0530
+++ b/contrib/python3-whitelist	Mon Jun 18 16:07:46 2018 +0530
@@ -490,6 +490,7 @@
 test-tag.t
 test-tags.t
 test-template-filters.t
+test-transplant.t
 test-treemanifest.t
 test-ui-color.py
 test-ui-config.py
--- a/tests/test-transplant.t	Mon Jun 18 16:06:28 2018 +0530
+++ b/tests/test-transplant.t	Mon Jun 18 16:07:46 2018 +0530
@@ -836,9 +836,9 @@
   $ cd binarysource
   $ echo a > a
   $ hg ci -Am adda a
-  >>> open('b', 'wb').write(b'\0b1')
+  >>> open('b', 'wb').write(b'\0b1') and None
   $ hg ci -Am addb b
-  >>> open('b', 'wb').write(b'\0b2')
+  >>> open('b', 'wb').write(b'\0b2') and None
   $ hg ci -m changeb b
   $ cd ..