MCPcopy Index your code
hub / github.com/evalplus/evalplus / chdir

Function chdir

evalplus/eval/utils.py:63–74  ·  view source on GitHub ↗
(root)

Source from the content-addressed store, hash-verified

61
62@contextlib.contextmanager
63def chdir(root):
64 if root == ".":
65 yield
66 return
67 cwd = os.getcwd()
68 os.chdir(root)
69 try:
70 yield
71 except BaseException as exc:
72 raise exc
73 finally:
74 os.chdir(cwd)
75
76
77class TimeoutException(Exception):

Callers 1

create_tempdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected