MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / extract_traceback_frames

Function extract_traceback_frames

py/conftest.py:66–74  ·  view source on GitHub ↗

Extract frames from a traceback object.

(tb)

Source from the content-addressed store, hash-verified

64
65
66def extract_traceback_frames(tb):
67 """Extract frames from a traceback object."""
68 frames = []
69 while tb:
70 if hasattr(tb, "tb_frame") and hasattr(tb, "tb_lineno") and Path(tb.tb_frame.f_code.co_filename).exists():
71 # Skip frames without source files
72 frames.append((tb.tb_frame, tb.tb_lineno, getattr(tb, "tb_lasti", 0)))
73 tb = getattr(tb, "tb_next", None)
74 return frames
75
76
77def filter_frames(frames):

Callers 1

Calls 3

PathClass · 0.85
existsMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected