Code
Hub
Workspaces
Connect your AI tool
Indexed graphs
Engine
MCP
copy
hub
/
github.com/pytest-dev/pytest
/ saved_fd
Function
saved_fd
testing/test_capture.py:1133–1139 · testing/test_capture.py::saved_fd
(fd)
Source
from the content-addressed store, hash-verified
1131
1132
@contextlib.contextmanager
1133
def
saved_fd(fd):
1134
new_fd = os.dup(fd)
1135
try
:
1136
yield
1137
finally:
1138
os.dup2(new_fd, fd)
1139
os.close(new_fd)
1140
1141
1142
class
TestStdCapture:
Callers
3
test_simple_resume_suspend
Method · 0.85
test_fdcapture_invalid_fd_with_fd_reuse
Method · 0.85
test_fdcapture_invalid_fd_without_fd_reuse
Method · 0.85
Calls
1
close
Method · 0.45
Tested by
no test coverage detected