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

Function undo

src/_pytest/assertion/__init__.py:96–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 config.stash[assertstate_key].trace("installed rewrite import hook")
95
96 def undo() -> None:
97 hook = config.stash[assertstate_key].hook
98 if hook is not None and hook in sys.meta_path:
99 sys.meta_path.remove(hook)
100
101 config.add_cleanup(undo)
102 return hook

Callers 1

test_hook_tracingMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_hook_tracingMethod · 0.68