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

Function test_excinfo_exconly

testing/code/test_excinfo.py:320–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

318
319
320def test_excinfo_exconly():
321 excinfo = pytest.raises(ValueError, h)
322 assert excinfo.exconly().startswith("ValueError")
323 with pytest.raises(ValueError) as excinfo:
324 raise ValueError("hello\nworld")
325 msg = excinfo.exconly(tryshort=True)
326 assert msg.startswith("ValueError")
327 assert msg.endswith("world")
328
329
330def test_excinfo_repr_str() -> None:

Callers

nothing calls this directly

Calls 1

exconlyMethod · 0.80

Tested by

no test coverage detected