Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2a506e

Browse files
authored
[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)
* bpo-30649: test_os tolerates 50 ms delta for utime (#2156) On Windows, tolerate a delta of 50 ms instead of 20 ms in test_utime_current() and test_utime_current_old() of test_os. On other platforms, reduce the delta from 20 ms to 10 ms. (cherry picked from commit c94caca) * bpo-30649: Revert utime delta in test_os (#2176) PPC64 Fedora 3.x buildbot requires at least a delta of 14 ms: revert the utime delta to 20 ms. I tried 10 ms, but test_os failed on the PPC64 Fedora 3.x buildbot. (cherry picked from commit 3402f72)
1 parent 22d909f commit c2a506e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_os.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,13 @@ def _test_utime_current(self, set_time):
622622

623623
if not self.support_subsecond(self.fname):
624624
delta = 1.0
625+
elif os.name == 'nt':
626+
# On Windows, the usual resolution of time.time() is 15.6 ms.
627+
# bpo-30649: Tolerate 50 ms for slow Windows buildbots.
628+
delta = 0.050
625629
else:
626-
# On Windows, the usual resolution of time.time() is 15.6 ms
630+
# bpo-30649: PPC64 Fedora 3.x buildbot requires
631+
# at least a delta of 14 ms
627632
delta = 0.020
628633
st = os.stat(self.fname)
629634
msg = ("st_time=%r, current=%r, dt=%r"

0 commit comments

Comments
 (0)