summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-06-14 12:26:52 (GMT)
committerGitHub <noreply@github.com>2017-06-14 12:26:52 (GMT)
commitc2a506e40e9135bfd17b59fffc62261dc95bc535 (patch)
treec07ac39cab5d072b8f7189b2f47d93241a303ed3
parent22d909f8c24bd7768df1a5bf0e52c597ea947cfb (diff)
downloadcpython-c2a506e40e9135bfd17b59fffc62261dc95bc535.zip
cpython-c2a506e40e9135bfd17b59fffc62261dc95bc535.tar.gz
cpython-c2a506e40e9135bfd17b59fffc62261dc95bc535.tar.bz2
[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 c94caca65cd38802243b5279cf85ee44ffb2abb8) * 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)
-rw-r--r--Lib/test/test_os.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 46ad209..8612ec9 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -622,8 +622,13 @@ class UtimeTests(unittest.TestCase):
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
+ # 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"