changeset 87378:4101bfaa76fe

Try to debug issue #19715
author Antoine Pitrou <solipsis@pitrou.net>
date Fri, 22 Nov 2013 23:20:08 +0100
parents 4734f6e2fd2f
children 716e41100553
files Lib/test/test_pathlib.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/test/test_pathlib.py	Fri Nov 22 22:26:01 2013 +0100
+++ b/Lib/test/test_pathlib.py	Fri Nov 22 23:20:08 2013 +0100
@@ -1382,13 +1382,17 @@
         self.assertFalse(p.exists())
         p.touch()
         self.assertTrue(p.exists())
-        old_mtime = p.stat().st_mtime
+        st = p.stat()
+        old_mtime = st.st_mtime
+        old_mtime_ns = st.st_mtime_ns
         # Rewind the mtime sufficiently far in the past to work around
         # filesystem-specific timestamp granularity.
         os.utime(str(p), (old_mtime - 10, old_mtime - 10))
         # The file mtime is refreshed by calling touch() again
         p.touch()
-        self.assertGreaterEqual(p.stat().st_mtime, old_mtime)
+        st = p.stat()
+        self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns)
+        self.assertGreaterEqual(st.st_mtime, old_mtime)
         p = P / 'newfileB'
         self.assertFalse(p.exists())
         p.touch(mode=0o700, exist_ok=False)