Skip to content

Commit

Permalink
capture a general Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetStreet committed Oct 19, 2023
1 parent 190eabe commit b3ebf5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inline/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,8 @@ def collect(self) -> Iterable[InlinetestItem]:
try:
# TODO: still need to find the right way to import without errors. mode=ImportMode.importlib did not work
module = import_path(self.path, root=self.config.rootpath)
except (ImportError, ModuleNotFoundError) as e:
except Exception as e:
# (ImportError, ModuleNotFoundError, TypeError, NameError, FileNotFoundError)
if self.config.getvalue("inlinetest_ignore_import_errors"):
pytest.skip("unable to import module %r" % self.path)
else:
Expand Down

0 comments on commit b3ebf5c

Please sign in to comment.