MCPcopy Index your code
hub / github.com/python/cpython / write_all

Function write_all

Lib/test/test_pty.py:81–86  ·  view source on GitHub ↗
(fd, data)

Source from the content-addressed store, hash-verified

79
80
81def write_all(fd, data):
82 written = os.write(fd, data)
83 if written != len(data):
84 # gh-73256, gh-110673: It should never happen, but check just in case
85 raise Exception(f"short write: os.write({fd}, {len(data)} bytes) "
86 f"wrote {written} bytes")
87
88
89# Marginal testing of pty suite. Cannot do extensive 'do or fail' testing

Callers 3

test_openptyMethod · 0.85
test__copy_to_eachMethod · 0.85
write_declsFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…