[issue19715] test_touch_common failure under Windows

Steve Dower report at bugs.python.org
Sat Nov 23 00:03:00 CET 2013


Steve Dower added the comment:

I don't have any extra insight into this. The documented resolution for mtime on NTFS is 100ns (2s on FAT32), so without delaying by at least that long you're not going to see an official change. The noise is probably from floating-point conversions (in _PyTime_ObjectToDenominator, at a guess).

Maybe you want to test to be a bit more generous with the bounds:

1. touch
2. get original_mtime
3. utime(10s ago)
4. verify p.stat().st_mtime < original_mtime
5. store old_mtime
6. touch
7. verify p.stat().st_mtime > old_mtime
OR
7. verify original_mtime - 0.001 < p.stat().st_mtime < original_mtime + 0.001

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19715>
_______________________________________


More information about the Python-bugs-list mailing list