Skip to content

Commit

Permalink
feat: add sybil doctests
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Jul 17, 2024
1 parent 4d9c8ff commit 6ee5e4a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""Doctest configuration."""

from doctest import ELLIPSIS, NORMALIZE_WHITESPACE

from sybil import Sybil
from sybil.parsers.rest import DocTestParser, PythonCodeBlockParser, SkipParser

pytest_collect_file = Sybil(
parsers=[
DocTestParser(optionflags=NORMALIZE_WHITESPACE | ELLIPSIS),
PythonCodeBlockParser(),
SkipParser(),
],
patterns=["*.rst", "*.py"],
).pytest()
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies = [
test = [
"pytest >=6",
"pytest-cov >=3",
"sybil",
]
dev = [
"pytest >=6",
Expand Down

0 comments on commit 6ee5e4a

Please sign in to comment.