[Python-checkins] r85801 - python/branches/py3k/Lib/test/test_tarfile.py

victor.stinner python-checkins at python.org
Sat Oct 23 03:15:30 CEST 2010


Author: victor.stinner
Date: Sat Oct 23 03:15:30 2010
New Revision: 85801

Log:
Try to fix test_tarfile on AMD64 debian parallel 3.x

tarinfo.mtime is an int, whereas getmtime() is a float and it might be
different by something like 3 µs.


Modified:
   python/branches/py3k/Lib/test/test_tarfile.py

Modified: python/branches/py3k/Lib/test/test_tarfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_tarfile.py	(original)
+++ python/branches/py3k/Lib/test/test_tarfile.py	Sat Oct 23 03:15:30 2010
@@ -345,7 +345,7 @@
                 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()
 


More information about the Python-checkins mailing list