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

Method test_syntax_error_in_module

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

Source from the content-addressed store, hash-verified

72 reprec.assertoutcome(passed=1)
73
74 def test_syntax_error_in_module(self, pytester: Pytester) -> None:
75 modcol = pytester.getmodulecol("this is a syntax error")
76 with pytest.raises(modcol.CollectError):
77 modcol.collect()
78 with pytest.raises(modcol.CollectError):
79 modcol.collect()
80
81 def test_module_considers_pluginmanager_at_import(self, pytester: Pytester) -> None:
82 modcol = pytester.getmodulecol("pytest_plugins='xasdlkj',")

Callers

nothing calls this directly

Calls 2

getmodulecolMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected