Skip to content

Commit

Permalink
Support python3 for running tests
Browse files Browse the repository at this point in the history
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 <pemensik@redhat.com>
  • Loading branch information
pemensik authored and jaredgrubb committed Mar 25, 2022
1 parent d6a0987 commit 400e6dd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions run_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

import re
import sys
Expand Down Expand Up @@ -56,17 +56,17 @@ def parse_test(raw):

failures += 1

print "="*40
print doc
print ':'*20
print prog, argv
print '-'*20
print("="*40)
print(doc)
print(':'*20)
print(prog, argv)
print('-'*20)
if out:
print out
print error
print(out)
print(error)

if failures:
print "%d failures" % failures
print("%d failures" % failures)
sys.exit(1)
else:
print "PASS (%d)" % passes
print("PASS (%d)" % passes)

0 comments on commit 400e6dd

Please sign in to comment.