diff options
| author | Victor Stinner <vstinner@redhat.com> | 2019-07-03 11:12:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-03 11:12:27 +0200 |
| commit | 6b9a31e6602723d98fce4c37f7151fdbab17367b (patch) | |
| tree | efbb4749c1c5f95981e46de127f77518e159c577 /tests/support.py | |
| parent | eb834d03cc5a681a43ad8b76d0761e718199e5bc (diff) | |
| download | python-setuptools-git-6b9a31e6602723d98fce4c37f7151fdbab17367b.tar.gz | |
bpo-37421: Fix test_distutils.test_build_ext() (GH-14564)
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
Diffstat (limited to 'tests/support.py')
| -rw-r--r-- | tests/support.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/support.py b/tests/support.py index 7385c6bb..04130985 100644 --- a/tests/support.py +++ b/tests/support.py @@ -6,6 +6,7 @@ import tempfile import unittest import sysconfig from copy import deepcopy +import test.support from distutils import log from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL @@ -64,8 +65,8 @@ class TempdirManager(object): os.chdir(self.old_cwd) super().tearDown() while self.tempdirs: - d = self.tempdirs.pop() - shutil.rmtree(d, os.name in ('nt', 'cygwin')) + tmpdir = self.tempdirs.pop() + test.support.rmtree(tmpdir) def mkdtemp(self): """Create a temporary directory that will be cleaned up. |
