From 66457108c0df291cc3495591ca73765f4cf83013 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 22 Dec 2022 12:15:47 -0500 Subject: [PATCH] Restore doctests by utilizing importlib. Ref pytest-dev/pytest#3396. --- conftest.py | 5 ++++- pytest.ini | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index 3261c2f..d953efd 100644 --- a/conftest.py +++ b/conftest.py @@ -1 +1,4 @@ -collect_ignore = ['fabfile.py'] +collect_ignore = [ + 'fabfile.py', + 'jaraco/site/projecthoneypot/croakysteel.py', +] diff --git a/pytest.ini b/pytest.ini index 283f55a..83f1f66 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,7 +1,6 @@ [pytest] norecursedirs=dist build .tox .eggs -# disable doctests due to pytest-dev/pytest#3396 -# addopts=--doctest-modules +addopts=--doctest-modules --import-mode=importlib doctest_optionflags=ALLOW_UNICODE ELLIPSIS filterwarnings= # Ensure ResourceWarnings are emitted