mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 08:32:02 +00:00
Relax constraints on testing to ensure they work in all cases.
This commit is contained in:
parent
ad3bb9bbab
commit
253e41ccad
@ -18,8 +18,10 @@ def test_chrono_system_clock():
|
||||
assert diff.days == 0
|
||||
assert diff.seconds == 0
|
||||
|
||||
# 50 milliseconds is a very long time to execute this
|
||||
assert diff.microseconds < 50000
|
||||
# We test that no more than about 0.5 seconds passes here
|
||||
# This makes sure that the dates created are very close to the same
|
||||
# but if the testing system is incredibly overloaded this should still pass
|
||||
assert diff.microseconds < 500000
|
||||
|
||||
|
||||
def test_chrono_system_clock_roundtrip():
|
||||
@ -111,4 +113,4 @@ def test_floating_point_duration():
|
||||
assert isinstance(time, datetime.timedelta)
|
||||
|
||||
assert time.seconds == 35
|
||||
assert time.microseconds == 525123
|
||||
assert 525122 <= time.microseconds <= 525123
|
||||
|
Loading…
Reference in New Issue
Block a user