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.
This commit is contained in:
parent
0702507ea2
commit
bd6f4fba1b
|
@ -2,6 +2,9 @@ from test_support import TESTFN
|
|||
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.curdir)
|
||||
|
||||
source = TESTFN + ".py"
|
||||
pyc = TESTFN + ".pyc"
|
||||
|
@ -42,3 +45,5 @@ finally:
|
|||
os.unlink(pyo)
|
||||
except os.error:
|
||||
pass
|
||||
|
||||
del sys.path[0]
|
||||
|
|
Loading…
Reference in New Issue