run-tests: work around chr() producing unicode in Python 3
authorAugie Fackler <augie@google.com>
Tue, 14 Apr 2015 15:52:45 -0400
changeset 25036 61fc2cdbc57c
parent 25035 1203ca7005fa
child 25037 570141fa38f9
run-tests: work around chr() producing unicode in Python 3
tests/run-tests.py
--- 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."""