]> git.phdru.name Git - m_librarian.git/blobdiff - tests/run_all.py
Update code for compatibility with Python 3
[m_librarian.git] / tests / run_all.py
index 51d3d6ad75c09cf004143d2d008184515ae51651..c04d9ed372f2baa2a6b4ba2dc4b8ef0b58da7936 100755 (executable)
@@ -1,6 +1,7 @@
 #! /usr/bin/env python
 
 
+from __future__ import print_function
 import os
 import sys
 import subprocess
@@ -31,14 +32,8 @@ def main():
     os.environ["PYTHONPATH"] = os.curdir
 
     for test in sorted(tests):
-        sys.stdout.write("Test: %s... " % test)
-        sys.stdout.flush()
-        rc = subprocess.call((sys.executable, '-m', test))
-        if rc:
-            sys.stdout.write("ERROR\n")
-        else:
-            sys.stdout.write("Ok\n")
-        sys.stdout.flush()
+        print(test)
+        subprocess.call((sys.executable, '-m', test))
 
 if __name__ == '__main__':
     main()