MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_bad_getsource

Method test_bad_getsource

testing/code/test_code.py:145–153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143
144class TestExceptionInfo:
145 def test_bad_getsource(self) -> None:
146 try:
147 if False:
148 pass
149 else:
150 assert False
151 except AssertionError:
152 exci = ExceptionInfo.from_current()
153 assert exci.getrepr()
154
155 def test_from_current_with_missing(self) -> None:
156 with pytest.raises(AssertionError, match="no current exception"):

Callers

nothing calls this directly

Calls 2

from_currentMethod · 0.80
getreprMethod · 0.80

Tested by

no test coverage detected