diff options
author | Guido van Rossum <guido@python.org> | 1997-09-07 16:54:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-07 16:54:34 (GMT) |
commit | eeadc04200695addc45239b57246c714e775184d (patch) | |
tree | 6bf4ad259172b4afbd4bd2746b03f27d87a4a9eb /Lib | |
parent | bc8b2bd95e58389570603bdf01538f264454f4cb (diff) | |
download | cpython-eeadc04200695addc45239b57246c714e775184d.zip cpython-eeadc04200695addc45239b57246c714e775184d.tar.gz cpython-eeadc04200695addc45239b57246c714e775184d.tar.bz2 |
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.)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_rgbimg.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_rgbimg.py b/Lib/test/test_rgbimg.py index 3bc206f..c5b7c83 100644 --- a/Lib/test/test_rgbimg.py +++ b/Lib/test/test_rgbimg.py @@ -11,8 +11,12 @@ print 'RGBimg test suite:' def findfile(file): if os.path.isabs(file): return file import sys - print "__file__ =", __file__ - for dn in [os.path.dirname(__file__)] + sys.path: + path = sys.path + try: + path = [os.path.dirname(__file__)] + path + except NameError: + pass + for dn in path: fn = os.path.join(dn, file) if os.path.exists(fn): return fn return file |