MCPcopy Index your code
hub / github.com/python/mypy / chdir_manager

Function chdir_manager

mypyc/test/test_run.py:149–155  ·  view source on GitHub ↗
(target: str)

Source from the content-addressed store, hash-verified

147
148@contextlib.contextmanager
149def chdir_manager(target: str) -> Iterator[None]:
150 dir = os.getcwd()
151 os.chdir(target)
152 try:
153 yield
154 finally:
155 os.chdir(dir)
156
157
158class TestRun(MypycDataSuite):

Callers 2

run_caseMethod · 0.85
run_case_innerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…