diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2008-12-12 14:14:42 +0000 |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2008-12-12 14:14:42 +0000 |
commit | 696d6ba6b9c03884c80c789ffb6486f8a65795ab (patch) | |
tree | f75f5275ade0fc1d15cef21cac9c7df7131ac11f /Lib/test | |
parent | 717d5d0a501c4061bd195c083a8258bd2a2745ab (diff) | |
download | cpython-git-696d6ba6b9c03884c80c789ffb6486f8a65795ab.tar.gz |
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')
-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 7e4fd25cf0..f5c9ed434e 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() |