MCPcopy
hub / github.com/pytest-dev/pytest / test_failing_import

Method test_failing_import

testing/python/collect.py:21–24  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

19
20class TestModule:
21 def test_failing_import(self, pytester: Pytester) -> None:
22 modcol = pytester.getmodulecol("import alksdjalskdjalkjals")
23 with pytest.raises(Collector.CollectError):
24 modcol.collect()
25
26 def test_import_duplicate(self, pytester: Pytester) -> None:
27 a = pytester.mkdir("a")

Callers

nothing calls this directly

Calls 2

getmodulecolMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected