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

Method test_syntax_error_module

testing/test_session.py:75–80  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

73 assert "DID NOT RAISE" in out
74
75 def test_syntax_error_module(self, pytester: Pytester) -> None:
76 reprec = pytester.inline_runsource("this is really not python")
77 values = reprec.getfailedcollections()
78 assert len(values) == 1
79 out = str(values[0].longrepr)
80 assert out.find("not python") != -1
81
82 def test_exit_first_problem(self, pytester: Pytester) -> None:
83 reprec = pytester.inline_runsource(

Callers

nothing calls this directly

Calls 2

getfailedcollectionsMethod · 0.80
inline_runsourceMethod · 0.45

Tested by

no test coverage detected