Skip to content

Commit 1139325

Browse files
authored
Merge pull request #242 from braingram/pytest_8p1p1
MNT: pytest 8.1.1 compatibility
2 parents 9b747b8 + 81670e2 commit 1139325

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==================
33

44
- Compatibility with pytest 8.2. [#241]
5+
- Compatibility with pytest 8.1.1 [#242]
56

67
1.2.0 (2024-03-04)
78
==================

pytest_doctestplus/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
PYTEST_GE_5_4 = _pytest_version >= Version('5.4')
3333
PYTEST_GE_7_0 = _pytest_version >= Version('7.0')
3434
PYTEST_GE_8_0 = _pytest_version >= Version('8.0')
35+
PYTEST_GE_8_1_1 = _pytest_version >= Version('8.1.1')
3536
PYTEST_GE_8_2 = any([_pytest_version.is_devrelease,
3637
_pytest_version.is_prerelease,
3738
_pytest_version >= Version('8.2')])
@@ -265,7 +266,7 @@ def collect(self):
265266
from _pytest.pathlib import import_path
266267
mode = self.config.getoption("importmode")
267268

268-
if PYTEST_GE_8_2:
269+
if PYTEST_GE_8_1_1:
269270
consider_namespace_packages = self.config.getini("consider_namespace_packages")
270271
module = import_path(fspath, mode=mode, root=self.config.rootpath,
271272
consider_namespace_packages=consider_namespace_packages)

0 commit comments

Comments
 (0)