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

This commit is contained in:
Hai Shi 2020-07-06 20:29:49 +08:00 committed by GitHub
parent b4a9263708
commit deb016224c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 128 additions and 110 deletions

View file

@ -15,6 +15,7 @@ from distutils.errors import (
import unittest
from test import support
from test.support import os_helper
from test.support.script_helper import assert_python_ok
# http://bugs.python.org/issue4373
@ -38,7 +39,7 @@ class BuildExtTestCase(TempdirManager,
# bpo-30132: On Windows, a .pdb file may be created in the current
# working directory. Create a temporary working directory to cleanup
# everything at the end of the test.
change_cwd = support.change_cwd(self.tmp_dir)
change_cwd = os_helper.change_cwd(self.tmp_dir)
change_cwd.__enter__()
self.addCleanup(change_cwd.__exit__, None, None, None)