summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-06-13 21:48:27 (GMT)
committerGitHub <noreply@github.com>2017-06-13 21:48:27 (GMT)
commitc94caca65cd38802243b5279cf85ee44ffb2abb8 (patch)
tree25114d1f59a634b3645ab5f3ebae629535a9e4fb
parent184bd82ba8106785ba22f0d2477dbd08bef821fb (diff)
downloadcpython-c94caca65cd38802243b5279cf85ee44ffb2abb8.zip
cpython-c94caca65cd38802243b5279cf85ee44ffb2abb8.tar.gz
cpython-c94caca65cd38802243b5279cf85ee44ffb2abb8.tar.bz2
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.
-rw-r--r--Lib/test/test_os.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 4a21ff7..bc1b0ee 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -621,9 +621,12 @@ 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
- 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))