summaryrefslogtreecommitdiff
path: root/tests/support.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/support.py')
-rw-r--r--tests/support.py5
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.