Modify examples to be both Python 2 and 3 compatible
For removing dependency on 2to3
This commit is contained in:
parent
2af35cb4ff
commit
89bee6a7fa
37 changed files with 368 additions and 388 deletions
|
|
@ -5,14 +5,14 @@ import subprocess
|
|||
import sys
|
||||
|
||||
testname = os.path.basename(os.path.dirname(os.path.abspath(__file__)))
|
||||
print "Testing " + testname + " - namespace packages"
|
||||
print("Testing " + testname + " - namespace packages")
|
||||
|
||||
if sys.version_info < (3, 3, 0):
|
||||
print " Not importing nstest as Python version is < 3.3"
|
||||
print(" Not importing nstest as Python version is < 3.3")
|
||||
sys.exit(0)
|
||||
|
||||
import nstest
|
||||
|
||||
print " Finished importing nstest"
|
||||
print(" Finished importing nstest")
|
||||
|
||||
nstest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue