# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1517991542 -19800 # Node ID 80e5210df25c330bd2a4e8f12385422545cb69bf # Parent f87641bf4d23b92919e4e921cf48fc9c376f2cbd py3: make sure we open the file in bytes mode # skip-blame because we are just adding b Differential Revision: https://phab.mercurial-scm.org/D2077 diff -r f87641bf4d23 -r 80e5210df25c tests/test-check-help.t --- a/tests/test-check-help.t Wed Feb 07 13:47:03 2018 +0530 +++ b/tests/test-check-help.t Wed Feb 07 13:49:02 2018 +0530 @@ -12,7 +12,7 @@ > topics = set() > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`') > for fname in sys.argv: - > with open(fname) as f: + > with open(fname, 'rb') as f: > topics.update(m.group(1) for m in topicre.finditer(f.read())) > for s in sorted(topics): > print(s) diff -r f87641bf4d23 -r 80e5210df25c tests/test-conflict.t --- a/tests/test-conflict.t Wed Feb 07 13:47:03 2018 +0530 +++ b/tests/test-conflict.t Wed Feb 07 13:49:02 2018 +0530 @@ -138,7 +138,7 @@ $ hg up -q --clean . $ $PYTHON < fp = open('logfile', 'w') + > fp = open('logfile', 'wb') > fp.write(b'12345678901234567890123456789012345678901234567890' + > b'1234567890') # there are 5 more columns for 80 columns >