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

Function test_excinfo_no_sourcecode

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

Source from the content-addressed store, hash-verified

356
357
358def test_excinfo_no_sourcecode():
359 try:
360 exec("raise ValueError()")
361 except ValueError:
362 excinfo = _pytest._code.ExceptionInfo.from_current()
363 s = str(excinfo.traceback[-1])
364 assert s == " File '<string>':1 in <module>\n ???\n"
365
366
367def test_excinfo_no_python_sourcecode(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 1

from_currentMethod · 0.80

Tested by

no test coverage detected