Skip to content

Commit aa9009a

Browse files
committed
refactor!(pytest): Rename to pytest_doctest_docutils
1 parent f640fbf commit aa9009a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/doctest/pytest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ pytest README.md
1616
## API
1717

1818
```{eval-rst}
19-
.. automodule:: pytest_sphinx
19+
.. automodule:: pytest_doctest_docutils
2020
:members:
2121
:show-inheritance:
2222
:undoc-members:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ lint = [
100100
]
101101

102102
[tool.poetry.plugins.pytest11]
103-
sphinx = "pytest_sphinx"
103+
sphinx = "pytest_doctest_docutils"
104104

105105
[tool.mypy]
106106
strict = true

src/pytest_sphinx.py renamed to src/pytest_doctest_docutils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""pytest_sphinx
1+
"""pytest_doctest_docutils
22
33
pytest plugin for doctest w/ reStructuredText and markdown
44
@@ -45,10 +45,10 @@ def pytest_unconfigure() -> None:
4545

4646
def pytest_collect_file(
4747
file_path: Path, parent: pytest.Collector
48-
) -> Optional["SphinxDoctestFile"]:
48+
) -> Optional["DocTestDocutilsFile"]:
4949
config = parent.config
5050
if _is_doctest(config, file_path, parent):
51-
return SphinxDoctestFile.from_parent(parent, path=file_path) # type: ignore
51+
return DocTestDocutilsFile.from_parent(parent, path=file_path) # type: ignore
5252
return None
5353

5454

@@ -137,7 +137,7 @@ def _get_runner(
137137
)
138138

139139

140-
class SphinxDocTestRunner(doctest.DocTestRunner):
140+
class DocutilsDocTestRunner(doctest.DocTestRunner):
141141
def summarize( # type: ignore
142142
self, out: "_Out", verbose: Optional[bool] = None
143143
) -> Tuple[int, int]:
@@ -169,7 +169,7 @@ def _DocTestRunner__patched_linecache_getlines(
169169
return self.save_linecache_getlines(filename, module_globals) # type: ignore
170170

171171

172-
class SphinxDoctestFile(pytest.Module):
172+
class DocTestDocutilsFile(pytest.Module):
173173
def collect(self) -> Iterable[DoctestItem]:
174174
setup()
175175

0 commit comments

Comments
 (0)