diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-21 17:20:06 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-21 17:20:06 (GMT) |
| commit | 963b4bab5296da961e0d240756233bd016f90e62 (patch) | |
| tree | 5e91261822f3cbd3e45e8b87e9e824341cb1fc84 /Lib/test/test_pathlib.py | |
| parent | a7d03d98c93c960039d2fae8ca3b375092cdcd49 (diff) | |
| parent | ec86469ca31436c30c4dec717d4bdc72323c832e (diff) | |
| download | cpython-963b4bab5296da961e0d240756233bd016f90e62.zip cpython-963b4bab5296da961e0d240756233bd016f90e62.tar.gz cpython-963b4bab5296da961e0d240756233bd016f90e62.tar.bz2 | |
Merge Python 3.4
* Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
shutil.rmtree() to remove the temporary directory.
* Issue #19629: Fix support.rmtree(), use os.lstat() to check if the file is a
directory, not os.path.isdir()
Diffstat (limited to 'Lib/test/test_pathlib.py')
| -rw-r--r-- | Lib/test/test_pathlib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index d838e70..a45cf7e 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -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')) @@ -1419,7 +1419,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') |
