mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
shutil.rmtree() to remove the temporary directory.
This commit is contained in:
parent
67f8706521
commit
ec86469ca3
1 changed files with 2 additions and 2 deletions
|
@ -1214,7 +1214,7 @@ class _BasePathTest(object):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
os.mkdir(BASE)
|
os.mkdir(BASE)
|
||||||
self.addCleanup(shutil.rmtree, BASE)
|
self.addCleanup(support.rmtree, BASE)
|
||||||
os.mkdir(join('dirA'))
|
os.mkdir(join('dirA'))
|
||||||
os.mkdir(join('dirB'))
|
os.mkdir(join('dirB'))
|
||||||
os.mkdir(join('dirC'))
|
os.mkdir(join('dirC'))
|
||||||
|
@ -1399,7 +1399,7 @@ class _BasePathTest(object):
|
||||||
self._check_resolve_relative(p, P(BASE, 'dirB', 'fileB'))
|
self._check_resolve_relative(p, P(BASE, 'dirB', 'fileB'))
|
||||||
# Now create absolute symlinks
|
# Now create absolute symlinks
|
||||||
d = tempfile.mkdtemp(suffix='-dirD')
|
d = tempfile.mkdtemp(suffix='-dirD')
|
||||||
self.addCleanup(shutil.rmtree, d)
|
self.addCleanup(support.rmtree, d)
|
||||||
os.symlink(os.path.join(d), join('dirA', 'linkX'))
|
os.symlink(os.path.join(d), join('dirA', 'linkX'))
|
||||||
os.symlink(join('dirB'), os.path.join(d, 'linkY'))
|
os.symlink(join('dirB'), os.path.join(d, 'linkY'))
|
||||||
p = P(BASE, 'dirA', 'linkX', 'linkY', 'fileB')
|
p = P(BASE, 'dirA', 'linkX', 'linkY', 'fileB')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue