diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2008-12-12 14:58:38 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2008-12-12 14:58:38 (GMT) |
commit | 43fcf3a493d249eec6baf7b096563a89a749d434 (patch) | |
tree | 97ff5664ae8a6364893ea1f43c3b4f03c474a28a /Lib/test/test_tarfile.py | |
parent | a5bbf200172d52714a64f9294d86c14bd8eda501 (diff) | |
download | cpython-43fcf3a493d249eec6baf7b096563a89a749d434.zip cpython-43fcf3a493d249eec6baf7b096563a89a749d434.tar.gz cpython-43fcf3a493d249eec6baf7b096563a89a749d434.tar.bz2 |
Merged revisions 67717 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r67717 | lars.gustaebel | 2008-12-12 14:58:03 +0100 (Fri, 12 Dec 2008) | 2 lines
Issue #4616: TarFile.utime(): Restore directory times on Windows.
........
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r-- | Lib/test/test_tarfile.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 1f9e092..affbeeb 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -255,17 +255,14 @@ class MiscReadTest(ReadTest): def test_extractall(self): # Test if extractall() correctly restores directory permissions # and times (see issue1735). - if sys.platform == "win32": - # Win32 has no support for utime() on directories or - # fine grained permissions. - return - tar = tarfile.open(tarname, encoding="iso8859-1") directories = [t for t in tar if t.isdir()] tar.extractall(TEMPDIR, directories) for tarinfo in directories: path = os.path.join(TEMPDIR, tarinfo.name) - self.assertEqual(tarinfo.mode & 0o777, os.stat(path).st_mode & 0o777) + if sys.platform != "win32": + # Win32 has no support for fine grained permissions. + self.assertEqual(tarinfo.mode & 0o777, os.stat(path).st_mode & 0o777) self.assertEqual(tarinfo.mtime, os.path.getmtime(path)) tar.close() |