safety fix in test runner
authorStefan Behnel <scoder@users.berlios.de>
Sat, 13 Mar 2010 14:33:43 +0000 (15:33 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 13 Mar 2010 14:33:43 +0000 (15:33 +0100)
runtests.py

index 86a9c85b86dc8d6da2033f138834b9410fb06b42..d52b7d1bed6562736b1f63dcd1614183799f3e0e 100644 (file)
@@ -785,7 +785,7 @@ if __name__ == '__main__':
                 import Cython.Compiler.Main
             except Exception:
                 cy_modules = [ name for name in sys.modules
-                               if name.startswith('Cython') ]
+                               if name == 'Cython' or name.startswith('Cython.') ]
                 for name in cy_modules:
                     del sys.modules[name]
                 # hasn't been refactored yet - do it now