Skip to content

Commit bd6f4fb

Browse files
committed
Insert the current directory to the front of sys.path -- and remove it
at the end. This fixes a problem where python Lib/test/test_import.py failed while "make test" succeeded.
1 parent 0702507 commit bd6f4fb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_import.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import os
44
import random
5+
import sys
6+
7+
sys.path.insert(0, os.curdir)
58

69
source = TESTFN + ".py"
710
pyc = TESTFN + ".pyc"
@@ -42,3 +45,5 @@
4245
os.unlink(pyo)
4346
except os.error:
4447
pass
48+
49+
del sys.path[0]

0 commit comments

Comments
 (0)