# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-06-18 10:01:13 # Node ID e033fd788bf8dc5f82911f0869cbc11300ce2250 # Parent 4a6d01b49d91c8a6265af95bec5f79265c987897 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 diff --git a/tests/test-impexp-branch.t b/tests/test-impexp-branch.t --- a/tests/test-impexp-branch.t +++ b/tests/test-impexp-branch.t @@ -75,8 +75,8 @@ Test --exact and patch header separators 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