From 0f3c4516a1a342c142009fea63abee64dbf3f334 Mon Sep 17 00:00:00 2001 From: Pey Lian Lim <2090236+pllim@users.noreply.github.com> Date: Thu, 30 Apr 2020 14:22:22 -0400 Subject: [PATCH 1/2] No error if import fails unconditionally --- pytest_doctestplus/plugin.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 From 7fc0c9af4c40442681562ae7594cfd4d3782c845 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Mon, 4 May 2020 01:18:50 -0700 Subject: [PATCH 2/2] Adding chaneglog [skip ci] --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)