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

Function test_feed_eof_unhandled_eof

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

Source from the content-addressed store, hash-verified

267
268
269def test_feed_eof_unhandled_eof(loop):
270 def p(out, buf):
271 while True:
272 yield # read chunk
273
274 stream = parsers.StreamParser(loop=loop)
275 s = stream.set_parser(p)
276
277 stream.feed_data(b'line1')
278 stream.feed_eof()
279 assert not s.is_eof()
280 assert isinstance(s.exception(), RuntimeError)
281
282
283def test_feed_parser2(loop, lines_parser):

Callers

nothing calls this directly

Calls 5

set_parserMethod · 0.95
feed_dataMethod · 0.95
feed_eofMethod · 0.95
is_eofMethod · 0.45
exceptionMethod · 0.45

Tested by

no test coverage detected