]> granicus.if.org Git - python/commitdiff
Try to fix test_tarfile on AMD64 debian parallel 3.x
authorVictor Stinner <victor.stinner@haypocalc.com>
Sat, 23 Oct 2010 01:15:30 +0000 (01:15 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sat, 23 Oct 2010 01:15:30 +0000 (01:15 +0000)
tarinfo.mtime is an int, whereas getmtime() is a float and it might be
different by something like 3 µs.

Lib/test/test_tarfile.py

index 3a217dc8150d1f01bbd2e14b73882190755a1e8c..fd7ac2bf498b65b71ab3fd8ba439ce5fe7e1db2f 100644 (file)
@@ -345,7 +345,7 @@ class MiscReadTest(CommonReadTest):
                 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))
+                self.assertEqual(tarinfo.mtime, int(os.path.getmtime(path)))
         finally:
             tar.close()