From 904850387e610fac8d79b942be848b3a1242c8b0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 13 Jun 2017 23:48:27 +0200 Subject: [PATCH 1/2] 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 c94caca65cd38802243b5279cf85ee44ffb2abb8) --- Lib/test/test_os.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 46ad2099a9f524..c6a777ab352666 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -622,9 +622,12 @@ def _test_utime_current(self, set_time): if not self.support_subsecond(self.fname): delta = 1.0 + elif os.name == 'nt': + # On Windows, the usual resolution of time.time() is 15.6 ms. + # bpo-30649: Tolerate 50 ms for slow Windows buildbots. + delta = 0.050 else: - # On Windows, the usual resolution of time.time() is 15.6 ms - delta = 0.020 + delta = 0.010 st = os.stat(self.fname) msg = ("st_time=%r, current=%r, dt=%r" % (st.st_mtime, current, st.st_mtime - current)) From 6b1309bb1d366cba11aa057471987b092123c966 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 14 Jun 2017 11:55:17 +0200 Subject: [PATCH 2/2] 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 3402f7268897db15053866e1e68404cfa0e02706) --- Lib/test/test_os.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index c6a777ab352666..8612ec9edb5356 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -627,7 +627,9 @@ def _test_utime_current(self, set_time): # bpo-30649: Tolerate 50 ms for slow Windows buildbots. delta = 0.050 else: - delta = 0.010 + # bpo-30649: PPC64 Fedora 3.x buildbot requires + # at least a delta of 14 ms + delta = 0.020 st = os.stat(self.fname) msg = ("st_time=%r, current=%r, dt=%r" % (st.st_mtime, current, st.st_mtime - current))