changeset 25036:61fc2cdbc57c

run-tests: work around chr() producing unicode in Python 3
author Augie Fackler <augie@google.com>
date Tue, 14 Apr 2015 15:52:45 -0400
parents 1203ca7005fa
children 570141fa38f9
files tests/run-tests.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sat Apr 11 18:28:32 2015 -0400
+++ b/tests/run-tests.py	Tue Apr 14 15:52:45 2015 -0400
@@ -826,6 +826,10 @@
     re.compile(r'^pulling from \$TESTTMP/.*[^)]$')
 ]
 
+bchr = chr
+if sys.version_info[0] == 3:
+    bchr = lambda x: bytes([x])
+
 class TTest(Test):
     """A "t test" is a test backed by a .t file."""