Skip to content

Commit

Permalink
Merge pull request #271 from Carreau/assumes
Browse files Browse the repository at this point in the history
Don't assume config exists.
  • Loading branch information
bsipocz authored Nov 21, 2024
2 parents b48ba5a + 8779acd commit a0ec9b6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pytest_doctestplus/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,12 @@ def _is_numpy_ufunc(method):


def pytest_configure(config):
doctest_plugin = config.pluginmanager.getplugin('doctest')
run_regular_doctest = config.option.doctestmodules and not config.option.doctest_plus
doctest_plugin = config.pluginmanager.getplugin("doctest")
if not hasattr(config.option, "doctestmodules"):
return
run_regular_doctest = (
config.option.doctestmodules and not config.option.doctest_plus
)
if config.option.doctest_plus_generate_diff:
config.option.doctest_only = True
use_doctest_plus = config.getini(
Expand Down

0 comments on commit a0ec9b6

Please sign in to comment.