[PATCH 5 of 7 hglib] tests: write out bytes instead of strings to test files (issue4520)
Brett Cannon
brett at python.org
Wed Mar 25 19:39:59 CDT 2015
# HG changeset patch
# User Brett Cannon <brett at python.org>
# Date 1427329421 14400
# Wed Mar 25 20:23:41 2015 -0400
# Node ID c65b266b8abb6d442740508c08c29dfe8c712ffa
# Parent 5efe91a4c2d49d74d1104edd50cd5a82003df4b6
tests: write out bytes instead of strings to test files (issue4520)
diff -r 5efe91a4c2d4 -r c65b266b8abb tests/common.py
--- a/tests/common.py Wed Mar 25 20:21:57 2015 -0400
+++ b/tests/common.py Wed Mar 25 20:23:41 2015 -0400
@@ -45,5 +45,5 @@
def append(self, path, *args):
f = open(path, 'ab')
for a in args:
- f.write(str(a))
+ f.write(a.encode('latin-1'))
f.close()
More information about the Mercurial-devel
mailing list