Skip to content

Commit 400e6dd

Browse files
pemensikjaredgrubb
authored andcommitted
Support python3 for running tests
Simple change done by 2to3 python tool. Make prints compatible with both python3 and python2. Change default version to python3. Still can be run by python2 run_tests.py. Signed-off-by: Petr Mensik <[email protected]>
1 parent d6a0987 commit 400e6dd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

run_tests.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python2
1+
#!/usr/bin/env python3
22

33
import re
44
import sys
@@ -56,17 +56,17 @@ def parse_test(raw):
5656

5757
failures += 1
5858

59-
print "="*40
60-
print doc
61-
print ':'*20
62-
print prog, argv
63-
print '-'*20
59+
print("="*40)
60+
print(doc)
61+
print(':'*20)
62+
print(prog, argv)
63+
print('-'*20)
6464
if out:
65-
print out
66-
print error
65+
print(out)
66+
print(error)
6767

6868
if failures:
69-
print "%d failures" % failures
69+
print("%d failures" % failures)
7070
sys.exit(1)
7171
else:
72-
print "PASS (%d)" % passes
72+
print("PASS (%d)" % passes)

0 commit comments

Comments
 (0)