Kaydet (Commit) 3050987d authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

bpo-30843: regrtest fixes sys.path, restore test.bisect (#2567)

* Rename again Lib/test/bisectcmd.py to Lib/test/bisect.py
* regrtest now removes '' and Lib/test/ from sys.path
* Use absolute import in test_bisect
üst d0ae4be4
......@@ -464,6 +464,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
# to locate tests
sys.path.insert(0, testdir)
# Make sure that '' and Lib/test/ are not in sys.path
regrtest_dir = os.path.abspath(os.path.dirname(__file__))
for path in ('', regrtest_dir):
try:
sys.path.remove(path)
except ValueError:
pass
if slaveargs is not None:
args, kwargs = json.loads(slaveargs)
if kwargs['huntrleaks']:
......
from __future__ import absolute_import
import sys
import unittest
from test import test_support
......
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