mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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.
This commit is contained in:
parent
184bd82ba8
commit
c94caca65c
1 changed files with 5 additions and 2 deletions
|
@ -621,9 +621,12 @@ class UtimeTests(unittest.TestCase):
|
||||||
|
|
||||||
if not self.support_subsecond(self.fname):
|
if not self.support_subsecond(self.fname):
|
||||||
delta = 1.0
|
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:
|
else:
|
||||||
# On Windows, the usual resolution of time.time() is 15.6 ms
|
delta = 0.010
|
||||||
delta = 0.020
|
|
||||||
st = os.stat(self.fname)
|
st = os.stat(self.fname)
|
||||||
msg = ("st_time=%r, current=%r, dt=%r"
|
msg = ("st_time=%r, current=%r, dt=%r"
|
||||||
% (st.st_mtime, current, st.st_mtime - current))
|
% (st.st_mtime, current, st.st_mtime - current))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue