]> granicus.if.org Git - python/commitdiff
Try to debug issue #19715
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 22 Nov 2013 22:20:08 +0000 (23:20 +0100)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 22 Nov 2013 22:20:08 +0000 (23:20 +0100)
Lib/test/test_pathlib.py

index 01b1af66db1c0e15f3e09c512124a7bbc7d2a802..2aa8af2511b3bf5822c68557243d7b8b2bbd2a58 100755 (executable)
@@ -1382,13 +1382,17 @@ class _BasePathTest(object):
         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)