Method: pylint.testutils.utils._test_sys_path
Calls: 6, Exceptions: 0, Paths: 2Back
Path 1: 5 calls (0.83)
None (5)
None (5)
1@contextlib.contextmanager
2def _test_sys_path(
3 replacement_sys_path: list[str] | None = None,
4) -> Generator[None, None, None]:
5 original_path = sys.path
6 try:
7 if replacement_sys_path is not None:
8 sys.path = copy(replacement_sys_path)
9 yield
10 finally:
11 sys.path = original_path
Path 2: 1 calls (0.17)
['.', '/home'] (1)
None (1)
1@contextlib.contextmanager
2def _test_sys_path(
3 replacement_sys_path: list[str] | None = None,
4) -> Generator[None, None, None]:
5 original_path = sys.path
6 try:
7 if replacement_sys_path is not None:
8 sys.path = copy(replacement_sys_path)
9 yield
10 finally:
11 sys.path = original_path