diff --git a/docs/versionhistory.rst b/docs/versionhistory.rst index 5a05ef3..902d875 100644 --- a/docs/versionhistory.rst +++ b/docs/versionhistory.rst @@ -4,6 +4,11 @@ Version history This library adheres to `Semantic Versioning 2.0 `_. +**UNRELEASED** + +- Fixed test suite incompatibility with pytest 8.2 + (`#461 `_) + **4.2.1** (2023-03-24) - Fixed missing ``typing_extensions`` dependency for Python 3.12 diff --git a/tests/conftest.py b/tests/conftest.py index 823b36d..3a0f3ea 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,6 +4,7 @@ import sys import typing from itertools import count +from pathlib import Path import pytest import typing_extensions @@ -12,13 +13,15 @@ pytest_plugins = ["pytester"] -def pytest_ignore_collect(path, config): - match = version_re.search(path.basename) +def pytest_ignore_collect(collection_path: Path, config: pytest.Config) -> bool: + match = version_re.search(collection_path.name) if match: version = tuple(int(x) for x in match.groups()) if sys.version_info < version: return True + return False + @pytest.fixture def sample_set() -> set: