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

Method test_read_line_breaks

tests/test_streams.py:115–125  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

113 self.assertEqual(b'', data)
114
115 def test_read_line_breaks(self):
116 # Read bytes without line breaks.
117 stream = self._make_one()
118 stream.feed_data(b'line1')
119 stream.feed_data(b'line2')
120
121 data = self.loop.run_until_complete(stream.read(5))
122 self.assertEqual(b'line1', data)
123
124 data = self.loop.run_until_complete(stream.read(5))
125 self.assertEqual(b'line2', data)
126
127 def test_read_eof(self):
128 # Read bytes, stop at eof.

Callers

nothing calls this directly

Calls 3

_make_oneMethod · 0.95
feed_dataMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected