]> granicus.if.org Git - python/commitdiff
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 21 Jul 2014 17:19:05 +0000 (19:19 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 21 Jul 2014 17:19:05 +0000 (19:19 +0200)
shutil.rmtree() to remove the temporary directory.

Lib/test/test_pathlib.py

index da001f049d300451f0adaf598f896a757de4edcb..7f6a66dc82d934cb2170c6da64e7a9cf8c1cc869 100644 (file)
@@ -1214,7 +1214,7 @@ class _BasePathTest(object):
 
     def setUp(self):
         os.mkdir(BASE)
-        self.addCleanup(shutil.rmtree, BASE)
+        self.addCleanup(support.rmtree, BASE)
         os.mkdir(join('dirA'))
         os.mkdir(join('dirB'))
         os.mkdir(join('dirC'))
@@ -1399,7 +1399,7 @@ class _BasePathTest(object):
         self._check_resolve_relative(p, P(BASE, 'dirB', 'fileB'))
         # Now create absolute symlinks
         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(join('dirB'), os.path.join(d, 'linkY'))
         p = P(BASE, 'dirA', 'linkX', 'linkY', 'fileB')