fix test runner in Py<2.5
authorStefan Behnel <scoder@users.berlios.de>
Sun, 25 Jan 2009 18:05:52 +0000 (19:05 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 25 Jan 2009 18:05:52 +0000 (19:05 +0100)
runtests.py

index cad732fd0ad5a5c03fe50e98c5c7587e84c9315e..118996f0892bbf0fb7eaa5f1c3209a24c2940d25 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 
-import os, sys, re, shutil, unittest, doctest, ctypes
+import os, sys, re, shutil, unittest, doctest
 
 WITH_CYTHON = True
 
@@ -534,6 +534,7 @@ if __name__ == '__main__':
         Errors.LEVEL = 0 # show all warnings
 
     if options.with_refnanny:
+        import ctypes
         ctypes.PyDLL("Cython/Runtime/refnanny.so", mode=ctypes.RTLD_GLOBAL)
         sys.path.append("Cython/Runtime")
         import refnanny