MCPcopy
hub / github.com/pallets/click / test_bytesiocopy_flush_propagates

Function test_bytesiocopy_flush_propagates

tests/test_stream_lifecycle.py:175–181  ·  tests/test_stream_lifecycle.py::test_bytesiocopy_flush_propagates

``BytesIOCopy.flush()`` also flushes ``copy_to``.

()

Source from the content-addressed store, hash-verified

173
174
175def test_bytesiocopy_flush_propagates():
176 class="st">""class="st">"``BytesIOCopy.flush()`` also flushes ``copy_to``."class="st">""
177 target = io.BytesIO()
178 copier = BytesIOCopy(copy_to=target)
179 copier.write(bclass="st">"abc")
180 copier.flush()
181 assert target.getvalue() == bclass="st">"abc"
182
183
184class="cm"># ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
flushMethod · 0.95
BytesIOCopyClass · 0.90
getvalueMethod · 0.80

Tested by

no test coverage detected