Skip to content

Commit

Permalink
Adapt to changes in pytest8
Browse files Browse the repository at this point in the history
  • Loading branch information
twmr committed Feb 3, 2024
1 parent 382237b commit 8f067de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pytest_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ def collect(self) -> Iterator[_pytest.doctest.DoctestItem]:
text = self.fspath.read_text(encoding)
name = self.fspath.basename

optionflags = _pytest.doctest.get_optionflags(self) # type:ignore
optionflags = _pytest.doctest.get_optionflags(self.config) # type:ignore
runner = SphinxDocTestRunner(
verbose=False,
optionflags=optionflags,
Expand Down Expand Up @@ -570,7 +570,7 @@ def collect(self) -> Iterator[_pytest.doctest.DoctestItem]:
pytest.skip("unable to import module %r" % self.path)
else:
raise
optionflags = _pytest.doctest.get_optionflags(self) # type:ignore
optionflags = _pytest.doctest.get_optionflags(self.config) # type:ignore

class MockAwareDocTestFinder(doctest.DocTestFinder):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sphinx_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pytest
from _pytest.legacypath import Testdir
from py._path.local import LocalPath
from _pytest._py.path import LocalPath

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 8f067de

Please sign in to comment.