Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
647
class
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_restore
Method · 0.90
test_preserve_container
Method · 0.90
_sys_snapshot
Function · 0.85
__init__
Method · 0.85
inline_run
Method · 0.85
Calls
no outgoing calls
Tested by
5
test_restore
Method · 0.72
test_preserve_container
Method · 0.72
_sys_snapshot
Function · 0.68
__init__
Method · 0.68
inline_run
Method · 0.68