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

Function filter_frames

py/conftest.py:78–86  ·  view source on GitHub ↗

Filter out frames from pytest internals.

(frames)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

getMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected