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

Function test_excinfo_from_exception_simple

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

Source from the content-addressed store, hash-verified

61
62
63def test_excinfo_from_exception_simple() -> None:
64 try:
65 raise ValueError
66 except ValueError as e:
67 assert e.__traceback__ is not None
68 info = _pytest._code.ExceptionInfo.from_exception(e)
69 assert info.type == ValueError
70
71
72def test_excinfo_from_exception_missing_traceback_assertion() -> None:

Callers

nothing calls this directly

Calls 1

from_exceptionMethod · 0.80

Tested by

no test coverage detected