diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2008-12-12 13:58:03 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2008-12-12 13:58:03 (GMT) |
commit | 3b02742f7df5831eae5e23b80d2b19b4ee42f75b (patch) | |
tree | 2a8550381b4fbbd8bdfa813da77e03038ba17361 /Lib/test/test_tarfile.py | |
parent | 4c96fa55258628fa917c3ccf2bf2d84070955dc1 (diff) | |
download | cpython-3b02742f7df5831eae5e23b80d2b19b4ee42f75b.zip cpython-3b02742f7df5831eae5e23b80d2b19b4ee42f75b.tar.gz cpython-3b02742f7df5831eae5e23b80d2b19b4ee42f75b.tar.bz2 |
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 7e4fd25..f5c9ed4 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -256,17 +256,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 & 0777, os.stat(path).st_mode & 0777) + if sys.platform != "win32": + # Win32 has no support for fine grained permissions. + self.assertEqual(tarinfo.mode & 0777, os.stat(path).st_mode & 0777) self.assertEqual(tarinfo.mtime, os.path.getmtime(path)) tar.close() |