bpo-40275: Use new test.support helper submodules in tests (GH-21743)

This commit is contained in:
Hai Shi 2020-08-06 19:51:29 +08:00 committed by GitHub
parent 52f98424a5
commit 79bb2c93f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 73 additions and 56 deletions

View file

@ -67,7 +67,7 @@ class TestServerThread(threading.Thread):
class BaseTestCase(unittest.TestCase):
def setUp(self):
self._threads = threading_helper.threading_setup()
os.environ = support.EnvironmentVarGuard()
os.environ = os_helper.EnvironmentVarGuard()
self.server_started = threading.Event()
self.thread = TestServerThread(self, self.request_handler)
self.thread.start()
@ -621,7 +621,7 @@ class CGIHTTPServerTestCase(BaseTestCase):
# The shebang line should be pure ASCII: use symlink if possible.
# See issue #7668.
self._pythonexe_symlink = None
if support.can_symlink():
if os_helper.can_symlink():
self.pythonexe = os.path.join(self.parent_dir, 'python')
self._pythonexe_symlink = support.PythonSymlink(self.pythonexe).__enter__()
else: