(self)
| 196 | self.assertEqual(b'', stream._buffer) |
| 197 | |
| 198 | def test_read_exception(self): |
| 199 | stream = asyncio.StreamReader(loop=self.loop) |
| 200 | stream.feed_data(b'line\n') |
| 201 | |
| 202 | data = self.loop.run_until_complete(stream.read(2)) |
| 203 | self.assertEqual(b'li', data) |
| 204 | |
| 205 | stream.set_exception(ValueError()) |
| 206 | self.assertRaises( |
| 207 | ValueError, self.loop.run_until_complete, stream.read(2)) |
| 208 | |
| 209 | def test_invalid_limit(self): |
| 210 | with self.assertRaisesRegex(ValueError, 'imit'): |
nothing calls this directly
no test coverage detected