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.)
This commit is contained in:
Guido van Rossum 1997-09-07 16:50:45 +00:00
parent 970f5d33c7
commit bc8b2bd95e
1 changed files with 2 additions and 1 deletions

View 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