Skip to content

Commit b3ebf5c

Browse files
committed
capture a general Exception
1 parent 190eabe commit b3ebf5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/inline/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,8 @@ def collect(self) -> Iterable[InlinetestItem]:
13951395
try:
13961396
# TODO: still need to find the right way to import without errors. mode=ImportMode.importlib did not work
13971397
module = import_path(self.path, root=self.config.rootpath)
1398-
except (ImportError, ModuleNotFoundError) as e:
1398+
except Exception as e:
1399+
# (ImportError, ModuleNotFoundError, TypeError, NameError, FileNotFoundError)
13991400
if self.config.getvalue("inlinetest_ignore_import_errors"):
14001401
pytest.skip("unable to import module %r" % self.path)
14011402
else:

0 commit comments

Comments
 (0)