From: Guido van Rossum Date: Sun, 7 Sep 1997 16:50:45 +0000 (+0000) Subject: Look for uuencoded test files in the directory containing this module, too. X-Git-Tag: v1.5a4~213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc8b2bd95e58389570603bdf01538f264454f4cb;p=python Look for uuencoded test files in the directory containing this module, too. (This is necessary because when imported as test.test_rgbimg, the test directory is not on sys.path.) --- diff --git a/Lib/test/test_rgbimg.py b/Lib/test/test_rgbimg.py index f0f772c8eb..3bc206f08c 100644 --- a/Lib/test/test_rgbimg.py +++ b/Lib/test/test_rgbimg.py @@ -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