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

Function test_wait

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

Source from the content-addressed store, hash-verified

99
100
101def test_wait(buf):
102 p = buf.wait(3)
103 next(p)
104 p.send(b'1')
105 try:
106 p.send(b'234')
107 except StopIteration as exc:
108 res = exc.value
109
110 assert res == b'123'
111 assert b'1234' == bytes(buf)
112
113
114def test_wait_exc(buf):

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
sendMethod · 0.45

Tested by

no test coverage detected