Commits

Victor Stinner committed 958f184

fix test_doc.py for Python3

  • Participants
  • Parent commits 836a3a3

Comments (0)

Files changed (1)

 from os.path import dirname
 
 def testDoc(filename, name=None):
-    print "--- %s: Run tests" % filename
+    print("--- %s: Run tests" % filename)
     failure, nb_test = testfile(
         filename, optionflags=ELLIPSIS, name=name)
     if failure:
         exit(1)
-    print "--- %s: End of tests" % filename
+    print("--- %s: End of tests" % filename)
 
 def importModule(name):
     mod = __import__(name)
     return mod
 
 def testModule(name):
-    print "--- Test module %s" % name
+    print("--- Test module %s" % name)
     module = importModule(name)
     failure, nb_test = testmod(module)
     if failure:
         exit(1)
-    print "--- End of test"
+    print("--- End of test")
 
 def main():
     ptrace_dir = dirname(__file__)