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

Method __init__

src/_pytest/pytester.py:634–636  ·  view source on GitHub ↗
(self, preserve: Optional[Callable[[str], bool]] = None)

Source from the content-addressed store, hash-verified

632
633class SysModulesSnapshot:
634 def __init__(self, preserve: Optional[Callable[[str], bool]] = None) -> None:
635 self.__preserve = preserve
636 self.__saved = dict(sys.modules)
637
638 def restore(self) -> None:
639 if self.__preserve:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected