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

Function test_feed_parser_stop

tests/test_stream_parser.py:223–232  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

221
222
223def test_feed_parser_stop(loop):
224 def p(out, buf):
225 yield # chunk
226
227 stream = parsers.StreamParser(loop=loop)
228 stream.set_parser(p)
229
230 stream.feed_data(b'line1')
231 assert stream._parser is None
232 assert b'' == bytes(stream._buffer)
233
234
235def test_feed_eof_exc(loop):

Callers

nothing calls this directly

Calls 2

set_parserMethod · 0.95
feed_dataMethod · 0.95

Tested by

no test coverage detected