MCPcopy Index your code
hub / github.com/python/cpython / test_readuntil_bytearray

Method test_readuntil_bytearray

Lib/test/test_asyncio/test_streams.py:512–517  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

510 self.assertEqual(b'aaa', stream._buffer)
511
512 def test_readuntil_bytearray(self):
513 stream = asyncio.StreamReader(loop=self.loop)
514 stream.feed_data(b'some data\r\n')
515 data = self.loop.run_until_complete(stream.readuntil(bytearray(b'\r\n')))
516 self.assertEqual(b'some data\r\n', data)
517 self.assertEqual(b'', stream._buffer)
518
519 def test_readexactly_zero_or_less(self):
520 # Read exact number of bytes (zero or less).

Callers

nothing calls this directly

Calls 4

feed_dataMethod · 0.95
readuntilMethod · 0.95
run_until_completeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected