Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.10"]
docutils-version: [ '0.18', '0.19' ]
steps:
- uses: actions/checkout@v3

Expand All @@ -23,7 +24,9 @@ jobs:
cache: 'poetry'

- name: Install dependencies
run: poetry install -E "docs test coverage lint format"
run: |
poetry install -E "docs test coverage lint format"
poetry run pip install docutils~=${{ matrix.docutils-version }}

- name: Print python versions
run: |
Expand Down
4 changes: 3 additions & 1 deletion src/doctest_docutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from packaging.specifiers import InvalidSpecifier, SpecifierSet
from packaging.version import Version

from docutils_compat import findall

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -325,7 +327,7 @@ def condition(node: Node) -> bool:
or isinstance(node, nodes.doctest_block)
)

for idx, node in enumerate(doc.traverse(condition)):
for idx, node in enumerate(findall(doc)(condition)): # type:ignore
logger.debug(f"() node: {node.astext()}")
assert isinstance(node, nodes.Element)
test_name = node.get("groups")
Expand Down