Kaydet (Commit) eeadc042 authored tarafından Guido van Rossum's avatar Guido van Rossum

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.)
üst bc8b2bd9
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment