Skip to content

Commit

Permalink
Revert "Use less extreme values for min and max timedelta in tests"
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
llucax committed Nov 29, 2024
1 parent 27ceec4 commit e03c41a
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions tests/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ def event_loop_policy() -> async_solipsism.EventLoopPolicy:
return async_solipsism.EventLoopPolicy()


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

_min_timedelta_microseconds = int(timedelta.min.total_seconds() * 1_000_000 / 10)
_min_timedelta_microseconds = (
int(
timedelta.min.total_seconds() * 1_000_000,
)
+ 1
)

_calculate_next_tick_time_args = {
"now": st.integers(),
Expand Down

0 comments on commit e03c41a

Please sign in to comment.