Harmonized pytest() and doctest() methods.