From 81670e2380b78476572d8d90ef8920135a8471b7 Mon Sep 17 00:00:00 2001 From: Brett Date: Sat, 9 Mar 2024 09:51:20 -0500 Subject: [PATCH] adjust consider_namespace_packages pytest version threshold --- CHANGES.rst | 1 + pytest_doctestplus/plugin.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index f877229..8f2b184 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,7 @@ ================== - Compatibility with pytest 8.2. [#241] +- Compatibility with pytest 8.1.1 [#242] 1.2.0 (2024-03-04) ================== diff --git a/pytest_doctestplus/plugin.py b/pytest_doctestplus/plugin.py index df33e44..c365a44 100644 --- a/pytest_doctestplus/plugin.py +++ b/pytest_doctestplus/plugin.py @@ -32,6 +32,7 @@ PYTEST_GE_5_4 = _pytest_version >= Version('5.4') PYTEST_GE_7_0 = _pytest_version >= Version('7.0') PYTEST_GE_8_0 = _pytest_version >= Version('8.0') +PYTEST_GE_8_1_1 = _pytest_version >= Version('8.1.1') PYTEST_GE_8_2 = any([_pytest_version.is_devrelease, _pytest_version.is_prerelease, _pytest_version >= Version('8.2')]) @@ -265,7 +266,7 @@ def collect(self): from _pytest.pathlib import import_path mode = self.config.getoption("importmode") - if PYTEST_GE_8_2: + if PYTEST_GE_8_1_1: consider_namespace_packages = self.config.getini("consider_namespace_packages") module = import_path(fspath, mode=mode, root=self.config.rootpath, consider_namespace_packages=consider_namespace_packages)