diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-11-23 14:25:59 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-11-23 14:25:59 (GMT) |
commit | 2cf3917954dab65c025ea39f8b6a0298c598f9f7 (patch) | |
tree | 5d1f3fde7633f83289b9ec2f9d6debb20670db74 /Lib/test | |
parent | 91a7af3e48b7e36bd937998e7076c3fe2e812de2 (diff) | |
download | cpython-2cf3917954dab65c025ea39f8b6a0298c598f9f7.zip cpython-2cf3917954dab65c025ea39f8b6a0298c598f9f7.tar.gz cpython-2cf3917954dab65c025ea39f8b6a0298c598f9f7.tar.bz2 |
Issue #19715: try the utime(..., None) approach again, now that it should be more precise under Windows
Diffstat (limited to 'Lib/test')
-rwxr-xr-x | Lib/test/test_pathlib.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index 83c56d0..4108d5e 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()) |