Skip to content

Commit e03c41a

Browse files
committed
Revert "Use less extreme values for min and max timedelta in tests"
Tests failed because of the double conversion fixes in the previous commit, so we can remove this hack now. This reverts commit 1084381. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 27ceec4 commit e03c41a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

tests/test_timer.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,19 @@ def event_loop_policy() -> async_solipsism.EventLoopPolicy:
2727
return async_solipsism.EventLoopPolicy()
2828

2929

30-
# We give some extra room (dividing by 10) to the max and min to avoid flaky errors
31-
# failing when getting too close to the limits, as these are not realistic scenarios and
32-
# weird things can happen.
33-
_max_timedelta_microseconds = int(timedelta.max.total_seconds() * 1_000_000 / 10)
30+
_max_timedelta_microseconds = (
31+
int(
32+
timedelta.max.total_seconds() * 1_000_000,
33+
)
34+
- 1
35+
)
3436

35-
_min_timedelta_microseconds = int(timedelta.min.total_seconds() * 1_000_000 / 10)
37+
_min_timedelta_microseconds = (
38+
int(
39+
timedelta.min.total_seconds() * 1_000_000,
40+
)
41+
+ 1
42+
)
3643

3744
_calculate_next_tick_time_args = {
3845
"now": st.integers(),

0 commit comments

Comments
 (0)