Skip to content

Commit

Permalink
Merge pull request #242 from braingram/pytest_8p1p1
Browse files Browse the repository at this point in the history
MNT: pytest 8.1.1 compatibility
  • Loading branch information
bsipocz authored Mar 10, 2024
2 parents 9b747b8 + 81670e2 commit 1139325
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==================

- Compatibility with pytest 8.2. [#241]
- Compatibility with pytest 8.1.1 [#242]

1.2.0 (2024-03-04)
==================
Expand Down
3 changes: 2 additions & 1 deletion pytest_doctestplus/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')])
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1139325

Please sign in to comment.