(self)
| 436 | self.assertRaises(ValueError, t1.result) |
| 437 | |
| 438 | def test_exception_cancel(self): |
| 439 | stream = self._make_one() |
| 440 | |
| 441 | @asyncio.coroutine |
| 442 | def read_a_line(): |
| 443 | yield from stream.readline() |
| 444 | |
| 445 | t = asyncio.Task(read_a_line(), loop=self.loop) |
| 446 | test_utils.run_briefly(self.loop) |
| 447 | t.cancel() |
| 448 | test_utils.run_briefly(self.loop) |
| 449 | # The following line fails if set_exception() isn't careful. |
| 450 | stream.set_exception(RuntimeError('message')) |
| 451 | test_utils.run_briefly(self.loop) |
| 452 | self.assertIs(stream._waiter, None) |
| 453 | |
| 454 | def test_readany_eof(self): |
| 455 | stream = self._make_one() |
nothing calls this directly
no test coverage detected