mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Fix for #5257: refactored all tests in distutils, so they use a temporary directory.
This commit is contained in:
parent
a4038038c6
commit
1369900619
8 changed files with 67 additions and 74 deletions
|
@ -1,5 +1,5 @@
|
|||
"""Support code for distutils test cases."""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
|
@ -31,7 +31,7 @@ class TempdirManager(object):
|
|||
super(TempdirManager, self).tearDown()
|
||||
while self.tempdirs:
|
||||
d = self.tempdirs.pop()
|
||||
shutil.rmtree(d)
|
||||
shutil.rmtree(d, os.name in ('nt', 'cygwin'))
|
||||
|
||||
def mkdtemp(self):
|
||||
"""Create a temporary directory that will be cleaned up.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue