diff --git a/CHANGES.rst b/CHANGES.rst index 1e2c3c6..0acb515 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,8 @@ 0.6.1 (unreleased) ================== -- No changes yet. +- Disabling the usage of the ``doctest_ignore_import_errors`` option to + ensure no behaviour changes compared to the 0.5.0 release. [#108] 0.6.0 (2020-04-30) diff --git a/pytest_doctestplus/plugin.py b/pytest_doctestplus/plugin.py index 1760da1..d3d2870 100644 --- a/pytest_doctestplus/plugin.py +++ b/pytest_doctestplus/plugin.py @@ -168,10 +168,12 @@ def collect(self): try: module = self.fspath.pyimport() except ImportError: - if self.config.getvalue("doctest_ignore_import_errors"): - pytest.skip("unable to import module %r" % self.fspath) - else: - raise + pytest.skip("unable to import module %r" % self.fspath) + # NOT USED: While correct, this breaks existing behavior. + # if self.config.getvalue("doctest_ignore_import_errors"): + # pytest.skip("unable to import module %r" % self.fspath) + # else: + # raise options = get_optionflags(self) | FIX