tests/runAll.py
branchpy33
changeset 3780 b809eb915503
parent 3731 b233dd0577ff
child 4252 fe660f227cac
--- a/tests/runAll.py	Tue Oct 15 14:44:54 2013 +0100
+++ b/tests/runAll.py	Tue Oct 15 14:45:50 2013 +0100
@@ -52,8 +52,9 @@
         modname = os.path.splitext(os.path.basename(filename))[0]
         if modname not in exclude:
             try:
-                exec('import %s as module' % modname)
-                allTests.addTest(module.makeSuite())
+                ns ={}
+                exec('import %s as module' % modname,ns)
+                allTests.addTest(ns['module'].makeSuite())
             except:
                 tt, tv, tb = sys.exc_info()[:]
                 nonImportable.append((filename,traceback.format_exception(tt,tv,tb)))
@@ -62,7 +63,6 @@
 
     return allTests
 
-
 def main(pattern='test_*.py'):
     try:
         folder = os.path.dirname(__file__)