changeset 38367:e033fd788bf8

py3: make tests/test-impexp-branch.t compatible with Python 3 This patch adds some missig b'' prefixes and add suppress the output of write() calls. Differential Revision: https://phab.mercurial-scm.org/D3789
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 18 Jun 2018 15:31:13 +0530
parents 4a6d01b49d91
children 96ee5276340a
files tests/test-impexp-branch.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-impexp-branch.t	Mon Jun 18 15:28:18 2018 +0530
+++ b/tests/test-impexp-branch.t	Mon Jun 18 15:31:13 2018 +0530
@@ -75,8 +75,8 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   >>> import re
   >>> p = open('../r1.patch', 'rb').read()
-  >>> p = re.sub(r'Parent\s+', 'Parent ', p)
-  >>> open('../r1-ws.patch', 'wb').write(p)
+  >>> p = re.sub(br'Parent\s+', b'Parent ', p)
+  >>> open('../r1-ws.patch', 'wb').write(p) and None
   $ hg import --exact ../r1-ws.patch
   applying ../r1-ws.patch