summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-11-23 00:54:27 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-11-23 00:54:27 (GMT)
commitc3055be5f30a4b980356322e11a3d8e119059dbe (patch)
treefd9234c89a215e81a790b716d5dd988cab4ee4f6 /Lib/test
parentf8d0ff9f423d56cc155da2a234a74b42eab95ac8 (diff)
downloadcpython-c3055be5f30a4b980356322e11a3d8e119059dbe.zip
cpython-c3055be5f30a4b980356322e11a3d8e119059dbe.tar.gz
cpython-c3055be5f30a4b980356322e11a3d8e119059dbe.tar.bz2
Trying other strategy for #19715: use utime(..., None)
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/test_pathlib.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index 6663ffa..049e12d 100755
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -1391,11 +1391,8 @@ class _BasePathTest(object):
# The file mtime should be refreshed by calling touch() again
p.touch()
st = p.stat()
- # Issue #19715: there can be an inconsistency under Windows between
- # the timestamp rounding when creating a file, and the timestamp
- # rounding done when calling utime(). `delta` makes up for this.
- delta = 1e-6 if os.name == 'nt' else 0
- self.assertGreaterEqual(st.st_mtime, old_mtime - delta)
+ self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns)
+ self.assertGreaterEqual(st.st_mtime, old_mtime)
# Now with exist_ok=False
p = P / 'newfileB'
self.assertFalse(p.exists())