-
Notifications
You must be signed in to change notification settings - Fork 42
Description
We (over at https://github.com/nipy/nipy) have a customized doctest OutputChecker class for a few new directives - https://github.com/matthew-brett/nipy/blob/pytest/nipy/conftest.py#L152
I have tried to apply this output checker by monkey-patching doctest in conftest.py:
doctest.OutputChecker = NipyOutputCheckerI can see, with a debug test in a .py file, that shows me that, when I get to the doctest, doctest.OutputChecker is my checker.
https://github.com/matthew-brett/nipy/blob/pytest/nipy/algorithms/statistics/formula/formulae.py#L95
But the checkers check_output never gets called.
I wondered idly whether this is because y'all enforce your OutputChecker in DoctestModulePlus:
https://github.com/scientific-python/pytest-doctestplus/blob/main/pytest_doctestplus/plugin.py#L268
What is the best way to plumb in my OutputChecker, when using pytest-doctestplus?