changeset 37369:22f19da5736e

py3: suppress output from f.write() function class We need to suppress them because the output is not present on Python 2 Differential Revision: https://phab.mercurial-scm.org/D3130
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 05 Apr 2018 17:14:11 +0530
parents cdccfe20eed7
children b6de372b4309
files tests/test-diff-unified.t
diffstat 1 files changed, 24 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-diff-unified.t	Thu Apr 05 17:13:09 2018 +0530
+++ b/tests/test-diff-unified.t	Thu Apr 05 17:14:11 2018 +0530
@@ -394,33 +394,33 @@
   $ cd longfunc
 
   >>> with open('a', 'wb') as f:
-  ...     f.write(b'a' * 39 + b'bb' + b'\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b' 0 b\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b'a' * 39 + b'\xc3\xa0' + b'\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b' 0 a with grave (single code point)\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b'a' * 39 + b'a\xcc\x80' + b'\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b' 0 a with grave (composition)\n')
-  ...     f.write(b' .\n' * 3)
+  ...     f.write(b'a' * 39 + b'bb' + b'\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b' 0 b\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b'a' * 39 + b'\xc3\xa0' + b'\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b' 0 a with grave (single code point)\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b'a' * 39 + b'a\xcc\x80' + b'\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b' 0 a with grave (composition)\n') and None
+  ...     f.write(b' .\n' * 3) and None
   $ hg ci -qAm0
 
   >>> with open('a', 'wb') as f:
-  ...     f.write(b'a' * 39 + b'bb' + b'\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b' 1 b\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b'a' * 39 + b'\xc3\xa0' + b'\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b' 1 a with grave (single code point)\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b'a' * 39 + b'a\xcc\x80' + b'\n')
-  ...     f.write(b' .\n' * 3)
-  ...     f.write(b' 1 a with grave (composition)\n')
-  ...     f.write(b' .\n' * 3)
+  ...     f.write(b'a' * 39 + b'bb' + b'\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b' 1 b\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b'a' * 39 + b'\xc3\xa0' + b'\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b' 1 a with grave (single code point)\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b'a' * 39 + b'a\xcc\x80' + b'\n') and None
+  ...     f.write(b' .\n' * 3) and None
+  ...     f.write(b' 1 a with grave (composition)\n') and None
+  ...     f.write(b' .\n' * 3) and None
   $ hg ci -m1
 
   $ hg diff -c1 --nodates --show-function