diff --git a/screen_locker/tests/test_temperature.py b/screen_locker/tests/test_temperature.py index 56fb92b..7b97a8a 100644 --- a/screen_locker/tests/test_temperature.py +++ b/screen_locker/tests/test_temperature.py @@ -138,11 +138,13 @@ class TestNothingEscapesTheFetch: def test_the_whole_check_is_bounded_by_the_hard_timeout(self) -> None: """The user's requirement: at most 5s, then lock regardless. - The bound is the default argument, so it is pinned to 5s here and the - mechanism is timed at 0.1s: the same guarantee without 5 real seconds. + The bound is the default argument, so it is pinned to at most 5s here + and the mechanism is timed at 0.1s: the same guarantee without 5 real + seconds. """ default = signature(fetch_current_temp_with_status).parameters["hard_timeout"] - assert default.default == HARD_TIMEOUT_SECONDS == 5.0 + assert default.default == HARD_TIMEOUT_SECONDS + assert HARD_TIMEOUT_SECONDS <= 5.0 hang = threading.Event() with patch( "screen_locker._temperature._fetch_current_temp_celsius_unbounded",