diff --git a/pyproject.toml b/pyproject.toml index 523b3a21..4c43b133 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,30 +43,30 @@ dev-flake8 = [ "pydoclint == 0.5.9", "pydocstyle == 6.3.0", ] -dev-formatting = ["black == 24.8.0", "isort == 5.13.2"] +dev-formatting = ["black == 24.10.0", "isort == 5.13.2"] dev-mkdocs = [ "Markdown == 3.7", - "black == 24.8.0", + "black == 24.10.0", "frequenz-repo-config[lib] == 0.10.0", "markdown-callouts == 0.4.0", "markdown-svgbob == 202406.1023", "mike == 2.1.3", "mkdocs-gen-files == 0.5.0", - "mkdocs-include-markdown-plugin == 7.0.0", + "mkdocs-include-markdown-plugin == 7.0.1", "mkdocs-literate-nav == 0.6.1", - "mkdocs-macros-plugin == 1.2.0", - "mkdocs-material == 9.5.39", - "mkdocstrings[python] == 0.26.1", - "mkdocstrings-python == 1.11.1", + "mkdocs-macros-plugin == 1.3.7", + "mkdocs-material == 9.5.44", + "mkdocstrings[python] == 0.27.0", + "mkdocstrings-python == 1.12.2", "pymdownx-superfence-filter-lines == 0.1.0", ] dev-mypy = [ # For checking the noxfile, docs/ script, and tests "frequenz-channels[dev-mkdocs,dev-noxfile,dev-pytest]", - "mypy == 1.11.2", + "mypy == 1.13.0", "types-Markdown == 3.7.0.20240822", ] -dev-noxfile = ["nox == 2024.4.15", "frequenz-repo-config[lib] == 0.10.0"] +dev-noxfile = ["nox == 2024.10.9", "frequenz-repo-config[lib] == 0.10.0"] dev-pylint = [ # For checking the noxfile, docs/ script, and tests "frequenz-channels[dev-mkdocs,dev-noxfile,dev-pytest]", @@ -75,7 +75,7 @@ dev-pylint = [ dev-pytest = [ "async-solipsism == 0.7", "frequenz-repo-config[extra-lint-examples] == 0.10.0", - "hypothesis == 6.112.2", + "hypothesis == 6.119.3", "pytest == 8.3.3", "pytest-asyncio == 0.24.0", "pytest-mock == 3.14.0", diff --git a/tests/test_timer.py b/tests/test_timer.py index c3fd3014..efd856ae 100644 --- a/tests/test_timer.py +++ b/tests/test_timer.py @@ -31,19 +31,12 @@ def event_loop() -> Iterator[async_solipsism.EventLoop]: loop.close() -_max_timedelta_microseconds = ( - int( - timedelta.max.total_seconds() * 1_000_000, - ) - - 1 -) +# 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) -_min_timedelta_microseconds = ( - int( - timedelta.min.total_seconds() * 1_000_000, - ) - + 1 -) +_min_timedelta_microseconds = int(timedelta.min.total_seconds() * 1_000_000 / 10) _calculate_next_tick_time_args = { "now": st.integers(),