Skip to content

Commit c9aef03

Browse files
committed
Make this test work when imported from the interpreter instead of run
from regrtest.py (it still works there too, of course).
1 parent fc40a83 commit c9aef03

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_sunaudiodev.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
def findfile(file):
66
if os.path.isabs(file): return file
77
import sys
8-
for dn in sys.path:
8+
path = sys.path
9+
try:
10+
path = [os.path.dirname(__file__)] + path
11+
except NameError:
12+
pass
13+
for dn in path:
914
fn = os.path.join(dn, file)
1015
if os.path.exists(fn): return fn
1116
return file

0 commit comments

Comments
 (0)