(self)
| 324 | self.assertIsInstance(f.exception(), RuntimeError) |
| 325 | |
| 326 | def test_yield_from_twice(self): |
| 327 | f = self._new_future(loop=self.loop) |
| 328 | |
| 329 | def fixture(): |
| 330 | yield 'A' |
| 331 | x = yield from f |
| 332 | yield 'B', x |
| 333 | y = yield from f |
| 334 | yield 'C', y |
| 335 | |
| 336 | g = fixture() |
| 337 | self.assertEqual(next(g), 'A') # yield 'A'. |
| 338 | self.assertEqual(next(g), f) # First yield from f. |
| 339 | f.set_result(42) |
| 340 | self.assertEqual(next(g), ('B', 42)) # yield 'B', x. |
| 341 | # The second "yield from f" does not yield f. |
| 342 | self.assertEqual(next(g), ('C', 42)) # yield 'C', y. |
| 343 | |
| 344 | def test_future_repr(self): |
| 345 | self.loop.set_debug(True) |
nothing calls this directly
no test coverage detected