Skip to content

Commit

Permalink
Merge pull request #166 from scipy/register_assert_rewrite
Browse files Browse the repository at this point in the history
BUG: pytest register_assert_rewrites of internal modules
  • Loading branch information
ev-br authored Jun 22, 2024
2 parents efa2d59 + 77a045e commit ce8ef5b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scipy_doctest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@

__version__ = "1.3dev0"

try:
# register internal modules with pytest; obscure errors galore otherwise
import pytest
pytest.register_assert_rewrite(
"scipy_doctest.conftest", "scipy_doctest.impl", "scipy_doctest.util",
"scipy_doctest.frontend", "scipy_doctest.plugin"
)
except ModuleNotFoundError:
# pytest is optional, so nothing to do
pass


from .impl import DTChecker, DTFinder, DTParser, DTRunner, DebugDTRunner, DTConfig # noqa
from .frontend import testmod, testfile, find_doctests, run_docstring_examples # noqa

0 comments on commit ce8ef5b

Please sign in to comment.