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

Class SysPathsSnapshot

src/_pytest/pytester.py:641–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639
640
641class SysPathsSnapshot:
642 def __init__(self) -> None:
643 self.__saved = list(sys.path), list(sys.meta_path)
644
645 def restore(self) -> None:
646 sys.path[:], sys.meta_path[:] = self.__saved
647
648
649_FileContent = tuple[str | bytes, ...] | list[str | bytes] | str | bytes

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