Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ save_cwd
Function
save_cwd
Lib/test/test_importlib/fixtures.py:37–42 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
35
36
@contextlib.contextmanager
37
def
save_cwd():
38
orig = os.getcwd()
39
try
:
40
yield
41
finally:
42
os.chdir(orig)
43
44
45
@contextlib.contextmanager
Callers
1
tempdir_as_cwd
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected