MCPcopy
hub / github.com/aio-libs/aiohttp / test_readuntil

Function test_readuntil

tests/test_parser_buffer.py:165–175  ·  view source on GitHub ↗
(buf)

Source from the content-addressed store, hash-verified

163
164
165def test_readuntil(buf):
166 p = buf.readuntil(b'\n', 4)
167 next(p)
168 p.send(b'123')
169 try:
170 p.send(b'\n456')
171 except StopIteration as exc:
172 res = exc.value
173
174 assert res == b'123\n'
175 assert b'456' == bytes(buf)
176
177
178def test_readuntil_exc(buf):

Callers

nothing calls this directly

Calls 2

readuntilMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected