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

Make this test work when imported from the interpreter instead of run

from regrtest.py (it still works there too, of course).
üst fc40a831
......@@ -5,7 +5,12 @@ import os
def findfile(file):
if os.path.isabs(file): return file
import sys
for dn in 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