MCPcopy 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

setUpMethod · 0.95
test_eggMethod · 0.45

Calls 2

strFunction · 0.85
removeMethod · 0.45

Tested by 3

test_eggMethod · 0.36