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

Function pytest_configure

src/_pytest/unraisableexception.py:148–153  ·  view source on GitHub ↗
(config: Config)

Source from the content-addressed store, hash-verified

146
147
148def pytest_configure(config: Config) -> None:
149 prev_hook = sys.unraisablehook
150 deque: collections.deque[UnraisableMeta | BaseException] = collections.deque()
151 config.stash[unraisable_exceptions] = deque
152 config.add_cleanup(functools.partial(cleanup, config=config, prev_hook=prev_hook))
153 sys.unraisablehook = functools.partial(unraisable_hook, append=deque.append)
154
155
156def pytest_unconfigure(config: Config) -> None:

Callers

nothing calls this directly

Calls 1

add_cleanupMethod · 0.80

Tested by

no test coverage detected