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

Method test_readuntil_separator

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

Source from the content-addressed store, hash-verified

377 self.assertEqual(b'', stream._buffer)
378
379 def test_readuntil_separator(self):
380 stream = asyncio.StreamReader(loop=self.loop)
381 with self.assertRaisesRegex(ValueError, 'Separator should be'):
382 self.loop.run_until_complete(stream.readuntil(separator=b''))
383 with self.assertRaisesRegex(ValueError, 'Separator should be'):
384 self.loop.run_until_complete(stream.readuntil(separator=(b'',)))
385 with self.assertRaisesRegex(ValueError, 'Separator should contain'):
386 self.loop.run_until_complete(stream.readuntil(separator=()))
387
388 def test_readuntil_multi_chunks(self):
389 stream = asyncio.StreamReader(loop=self.loop)

Callers

nothing calls this directly

Calls 3

readuntilMethod · 0.95
assertRaisesRegexMethod · 0.80
run_until_completeMethod · 0.45

Tested by

no test coverage detected