diff --git a/pyproject.toml b/pyproject.toml index cf9c81b1..6ef650f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ [build-system] requires = [ - "setuptools == 84.1.0", + "setuptools == 84.2.1", "setuptools_scm[toml] == 10.3.4", "frequenz-repo-config[lib] == 0.19.0", ] @@ -38,7 +38,7 @@ email = "floss@frequenz.com" [project.optional-dependencies] dev-flake8 = [ - "flake8 == 7.4.1", + "flake8 == 7.5.0", "flake8-datetimez == 26.8.1", "flake8-docstrings == 1.7.0", "flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml @@ -57,31 +57,31 @@ dev-mkdocs = [ "mkdocs-include-markdown-plugin == 7.3.0", "mkdocs-literate-nav == 0.6.3", "mkdocs-macros-plugin == 1.5.0", - "mkdocs-material == 9.7.7", + "mkdocs-material == 9.8.1", "mkdocstrings[python] == 1.0.8", "mkdocstrings-python == 2.0.10", "pymdownx-superfence-filter-lines == 1.0.0", - "griffe==2.3.0", + "griffe==2.4.1", ] dev-mypy = [ # For checking the noxfile, docs/ script, and tests "frequenz-channels[dev-mkdocs,dev-noxfile,dev-pytest]", "mypy == 2.4.1", - "types-Markdown == 3.10.2.20260712", + "types-Markdown == 3.11.3.20261108", ] -dev-noxfile = ["nox == 2026.8.17", "frequenz-repo-config[lib] == 0.19.0"] +dev-noxfile = ["nox == 2026.10.20", "frequenz-repo-config[lib] == 0.19.0"] dev-pylint = [ # For checking the noxfile, docs/ script, and tests "frequenz-channels[dev-mkdocs,dev-noxfile,dev-pytest]", - "pylint == 4.0.9", + "pylint == 4.1.4", ] dev-pytest = [ "async-solipsism == 0.10", "frequenz-repo-config[extra-lint-examples] == 0.19.0", - "hypothesis == 6.168.3", - "pytest == 9.1.1", + "hypothesis == 6.170.15", + "pytest == 9.2.0", "pytest-asyncio == 1.5.0", - "pytest-mock == 3.16.0", + "pytest-mock == 3.17.0", ] dev = [ "frequenz-channels[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]", diff --git a/tests/test_receiver.py b/tests/test_receiver.py index 42b869cc..9e187d80 100644 --- a/tests/test_receiver.py +++ b/tests/test_receiver.py @@ -3,24 +3,9 @@ """Tests for the Receiver base class.""" -import pytest - from frequenz.channels import Receiver -def test_receiver_without_close_cannot_be_instantiated() -> None: +def test_close_is_abstract() -> None: """Test that a receiver subclass has to implement `close()`.""" - - class NoCloseReceiver(Receiver[int]): - """A receiver that doesn't implement `close()`.""" - - async def ready(self) -> bool: - """Return that the receiver is not ready.""" - return False - - def consume(self) -> int: - """Return a message.""" - return 0 - - with pytest.raises(TypeError, match=r"abstract method.*close"): - NoCloseReceiver() # type: ignore[abstract] # pylint: disable=abstract-class-instantiated + assert "close" in Receiver.__abstractmethods__