diff --git a/Lib/test/bisectcmd.py b/Lib/test/bisect.py similarity index 100% rename from Lib/test/bisectcmd.py rename to Lib/test/bisect.py diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 925b7dba1702db..1290086cc0b457 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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']: diff --git a/Lib/test/test_bisect.py b/Lib/test/test_bisect.py index 5c3330b4e410f7..9bed28e058c956 100644 --- a/Lib/test/test_bisect.py +++ b/Lib/test/test_bisect.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import sys import unittest from test import test_support