Example: https://github.com/astropy/pytest-doctestplus/blob/e1eea63ebbdb36ef759c5c90e9ccd40d1a289d55/tests/test_doctestplus.py#L15 It is legacy now and has been replaced by `pytester`. Blocked by: * Need to bump minversion of pytest to 6.2 or later.