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

Function filter_frames

py/conftest.py:77–85  ·  view source on GitHub ↗

Filter out frames from pytest internals.

(frames)

Source from the content-addressed store, hash-verified

75
76
77def filter_frames(frames):
78 """Filter out frames from pytest internals."""
79 skip_modules = ["pytest", "_pytest", "pluggy"]
80 filtered = []
81 for frame, lineno, lasti in reversed(frames):
82 mod_name = frame.f_globals.get("__name__", "")
83 if not any(skip in mod_name for skip in skip_modules):
84 filtered.append((frame, lineno, lasti))
85 return filtered
86
87
88def rebuild_traceback(frames):

Callers 1

Calls 2

getMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected