tests/runAll.py
branchpy33
changeset 3731 b233dd0577ff
parent 3721 0c93dd8ff567
child 3780 b809eb915503
--- a/tests/runAll.py	Thu Mar 07 17:54:44 2013 +0000
+++ b/tests/runAll.py	Wed May 01 16:43:09 2013 +0100
@@ -4,7 +4,7 @@
 """Runs all test files in all subfolders.
 """
 __version__=''' $Id$ '''
-import os, glob, sys, string, traceback, unittest
+import os, glob, sys, traceback, unittest
 
 #we need to ensure 'tests' is on the path.  It will be if you
 #run 'setup.py tests', but won't be if you CD into the tests
@@ -87,7 +87,7 @@
     # special case for tests directory - clean up
     # all PDF & log files before starting run.  You don't
     # want this if reusing runAll anywhere else.
-    if string.find(folder, os.sep+'tests') > -1: cleanup(folder)
+    if os.sep+'tests' in folder: cleanup(folder)
     cleanup(outputfile(''))
     NI = []
     cleanOnly = '--clean' in sys.argv
@@ -100,7 +100,7 @@
         if NI:
             sys.stderr.write('\n###################### the following tests could not be imported\n')
             for f,tb in NI:
-                print('file: "%s"\n%s\n' % (f,string.join(tb,'')))
+                print('file: "%s"\n%s\n' % (f,''.join(tb)))
         printLocation()
 
 def mainEx():