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

Function test_feed_eof_stop

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

Source from the content-addressed store, hash-verified

251
252
253def test_feed_eof_stop(loop):
254 def p(out, buf):
255 try:
256 while True:
257 yield # read chunk
258 except parsers.EofStream:
259 out.feed_eof()
260
261 stream = parsers.StreamParser(loop=loop)
262 s = stream.set_parser(p)
263
264 stream.feed_data(b'line1')
265 stream.feed_eof()
266 assert s._eof
267
268
269def test_feed_eof_unhandled_eof(loop):

Callers

nothing calls this directly

Calls 3

set_parserMethod · 0.95
feed_dataMethod · 0.95
feed_eofMethod · 0.95

Tested by

no test coverage detected