Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ add_sys_path
Method
add_sys_path
Lib/test/test_importlib/fixtures.py:77–82 ·
view source on GitHub ↗
(dir)
Source
from the content-addressed store, hash-verified
75
@staticmethod
76
@contextlib.contextmanager
77
def
add_sys_path(dir):
78
sys.path[:0] = [str(dir)]
79
try
:
80
yield
81
finally:
82
sys.path.remove(str(dir))
83
84
def
setUp(self):
85
super().setUp()
Callers
4
setUp
Method · 0.95
test_unique_distributions
Method · 0.45
test_egg
Method · 0.45
test_entry_points_unique_packages_normalized
Method · 0.45
Calls
2
str
Function · 0.85
remove
Method · 0.45
Tested by
3
test_unique_distributions
Method · 0.36
test_egg
Method · 0.36
test_entry_points_unique_packages_normalized
Method · 0.36