mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
2158231433
commit
2b9af63b4f
|
@ -345,7 +345,7 @@ class MiscReadTest(CommonReadTest):
|
||||||
if sys.platform != "win32":
|
if sys.platform != "win32":
|
||||||
# Win32 has no support for fine grained permissions.
|
# Win32 has no support for fine grained permissions.
|
||||||
self.assertEqual(tarinfo.mode & 0o777, os.stat(path).st_mode & 0o777)
|
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:
|
finally:
|
||||||
tar.close()
|
tar.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue