Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytest-dev/pytest
/ saved_fd
Function
saved_fd
testing/test_capture.py:1054–1060 ·
view source on GitHub ↗
(fd)
Source
from the content-addressed store, hash-verified
1052
1053
@contextlib.contextmanager
1054
def
saved_fd(fd):
1055
new_fd = os.dup(fd)
1056
try
:
1057
yield
1058
finally:
1059
os.dup2(new_fd, fd)
1060
os.close(new_fd)
1061
1062
1063
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