summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-11-22 22:20:08 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-11-22 22:20:08 (GMT)
commit0f57564cac8235961c9e64774dfb4069963c35de (patch)
tree310bd9ad83eae3d154cb84c0ec8e44e2de4cd35a /Lib/test/test_pathlib.py
parent2dd38fb23894df578ae57f2ec12aaba7669b7f0d (diff)
downloadcpython-0f57564cac8235961c9e64774dfb4069963c35de.zip
cpython-0f57564cac8235961c9e64774dfb4069963c35de.tar.gz
cpython-0f57564cac8235961c9e64774dfb4069963c35de.tar.bz2
Try to debug issue #19715
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rwxr-xr-xLib/test/test_pathlib.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index 01b1af6..2aa8af2 100755
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -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)