(self)
| 577 | self.assertFalse(m_log.error.called) |
| 578 | |
| 579 | def test_wrap_future(self): |
| 580 | |
| 581 | def run(arg): |
| 582 | return (arg, threading.get_ident()) |
| 583 | ex = concurrent.futures.ThreadPoolExecutor(1) |
| 584 | f1 = ex.submit(run, 'oi') |
| 585 | f2 = asyncio.wrap_future(f1, loop=self.loop) |
| 586 | res, ident = self.loop.run_until_complete(f2) |
| 587 | self.assertTrue(asyncio.isfuture(f2)) |
| 588 | self.assertEqual(res, 'oi') |
| 589 | self.assertNotEqual(ident, threading.get_ident()) |
| 590 | ex.shutdown(wait=True) |
| 591 | |
| 592 | def test_wrap_future_future(self): |
| 593 | f1 = self._new_future(loop=self.loop) |
nothing calls this directly
no test coverage detected