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

Method __init__

src/_pytest/_code/code.py:361–376  ·  view source on GitHub ↗

Initialize from given python traceback object and ExceptionInfo.

(
        self,
        tb: TracebackType | Iterable[TracebackEntry],
    )

Source from the content-addressed store, hash-verified

359 """Traceback objects encapsulate and offer higher level access to Traceback entries."""
360
361 def __init__(
362 self,
363 tb: TracebackType | Iterable[TracebackEntry],
364 ) -> None:
365 """Initialize from given python traceback object and ExceptionInfo."""
366 if isinstance(tb, TracebackType):
367
368 def f(cur: TracebackType) -> Iterable[TracebackEntry]:
369 cur_: TracebackType | None = cur
370 while cur_ is not None:
371 yield TracebackEntry(cur_)
372 cur_ = cur_.tb_next
373
374 super().__init__(f(tb))
375 else:
376 super().__init__(tb)
377
378 def cut(
379 self,

Callers

nothing calls this directly

Calls 2

fFunction · 0.50
__init__Method · 0.45

Tested by

no test coverage detected