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 = NipyOutputChecker
I 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?
We (over at https://github.com/nipy/nipy) have a customized doctest
OutputCheckerclass for a few new directives - https://github.com/matthew-brett/nipy/blob/pytest/nipy/conftest.py#L152I have tried to apply this output checker by monkey-patching
doctestinconftest.py:I can see, with a debug test in a
.pyfile, that shows me that, when I get to the doctest,doctest.OutputCheckeris my checker.https://github.com/matthew-brett/nipy/blob/pytest/nipy/algorithms/statistics/formula/formulae.py#L95
But the checkers
check_outputnever gets called.I wondered idly whether this is because y'all enforce your
OutputCheckerinDoctestModulePlus: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?