]> granicus.if.org Git - python/commitdiff
Move imgfile import to the global namespace to trigger an import error ASAP to
authorBrett Cannon <bcannon@gmail.com>
Sun, 20 May 2007 23:56:18 +0000 (23:56 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sun, 20 May 2007 23:56:18 +0000 (23:56 +0000)
prevent creation of a test file.

Lib/test/test_imageop.py

index 8789c13ec549a3ce84f04e6398b1ec0458d40ba2..770c9f3c3fbb8b08ae32f70fcf784b048e196c8f 100755 (executable)
@@ -7,7 +7,7 @@
 
 from test.test_support import verbose, unlink
 
-import imageop, uu, os
+import imageop, uu, os, imgfile
 
 import warnings
 
@@ -119,9 +119,6 @@ def getimage(name):
     """return a tuple consisting of
        image (in 'imgfile' format) width and height
     """
-
-    import imgfile
-
     try:
         sizes = imgfile.getsizes(name)
     except imgfile.error: