]> granicus.if.org Git - python/commitdiff
Look for uuencoded test files in the directory containing this module, too.
authorGuido van Rossum <guido@python.org>
Sun, 7 Sep 1997 16:50:45 +0000 (16:50 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 7 Sep 1997 16:50:45 +0000 (16:50 +0000)
(This is necessary because when imported as test.test_rgbimg, the test
directory is not on sys.path.)

Lib/test/test_rgbimg.py

index f0f772c8eb75efa519602c239162b1435a93b65e..3bc206f08c9accda5e5e444616e7d89f33f4e332 100644 (file)
@@ -11,7 +11,8 @@ print 'RGBimg test suite:'
 def findfile(file):
        if os.path.isabs(file): return file
        import sys
-       for dn in sys.path:
+       print "__file__ =", __file__
+       for dn in [os.path.dirname(__file__)] + sys.path:
                fn = os.path.join(dn, file)
                if os.path.exists(fn): return fn
        return file