diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-07-03 09:12:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 09:12:27 (GMT) |
commit | 74c9dd57771f4f061ee83b069c8e7b37de41246b (patch) | |
tree | 242a627f7b7bf36fd594c7f10b546b0a1f8de51a /Lib/distutils/tests/support.py | |
parent | 684cb47fffb7af3ac50cb077f6d2a095c9ce20b4 (diff) | |
download | cpython-74c9dd57771f4f061ee83b069c8e7b37de41246b.zip cpython-74c9dd57771f4f061ee83b069c8e7b37de41246b.tar.gz cpython-74c9dd57771f4f061ee83b069c8e7b37de41246b.tar.bz2 |
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 'Lib/distutils/tests/support.py')
-rw-r--r-- | Lib/distutils/tests/support.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/distutils/tests/support.py b/Lib/distutils/tests/support.py index 7385c6b..0413098 100644 --- a/Lib/distutils/tests/support.py +++ b/Lib/distutils/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. |