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

Class SysPathsSnapshot

src/_pytest/pytester.py:647–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645
646
647class SysPathsSnapshot:
648 def __init__(self) -> None:
649 self.__saved = list(sys.path), list(sys.meta_path)
650
651 def restore(self) -> None:
652 sys.path[:], sys.meta_path[:] = self.__saved
653
654
655@final

Callers 5

test_restoreMethod · 0.90
_sys_snapshotFunction · 0.85
__init__Method · 0.85
inline_runMethod · 0.85

Calls

no outgoing calls

Tested by 5

test_restoreMethod · 0.72
_sys_snapshotFunction · 0.68
__init__Method · 0.68
inline_runMethod · 0.68