summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_rgbimg.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-09-07 16:50:45 (GMT)
committerGuido van Rossum <guido@python.org>1997-09-07 16:50:45 (GMT)
commitbc8b2bd95e58389570603bdf01538f264454f4cb (patch)
tree5d2f7a63b45d6aab666dd6404487f565cf656216 /Lib/test/test_rgbimg.py
parent970f5d33c758bd23acaf8db31c9f0a676edbea9e (diff)
downloadcpython-bc8b2bd95e58389570603bdf01538f264454f4cb.zip
cpython-bc8b2bd95e58389570603bdf01538f264454f4cb.tar.gz
cpython-bc8b2bd95e58389570603bdf01538f264454f4cb.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/test/test_rgbimg.py')
-rw-r--r--Lib/test/test_rgbimg.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_rgbimg.py b/Lib/test/test_rgbimg.py
index f0f772c..3bc206f 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