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

Method test_at_eof

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

Source from the content-addressed store, hash-verified

265 self.assertEqual(b'', stream._buffer)
266
267 def test_at_eof(self):
268 stream = asyncio.StreamReader(loop=self.loop)
269 self.assertFalse(stream.at_eof())
270
271 stream.feed_data(b'some data\n')
272 self.assertFalse(stream.at_eof())
273
274 self.loop.run_until_complete(stream.readline())
275 self.assertFalse(stream.at_eof())
276
277 stream.feed_data(b'some data\n')
278 stream.feed_eof()
279 self.loop.run_until_complete(stream.readline())
280 self.assertTrue(stream.at_eof())
281
282 def test_readline_limit(self):
283 # Read one line. StreamReaders are fed with data after

Callers

nothing calls this directly

Calls 7

at_eofMethod · 0.95
feed_dataMethod · 0.95
readlineMethod · 0.95
feed_eofMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
run_until_completeMethod · 0.45

Tested by

no test coverage detected