(self)
| 173 | self.loop.run_until_complete(task) |
| 174 | |
| 175 | def test_task_class(self): |
| 176 | async def notmuch(): |
| 177 | return 'ok' |
| 178 | t = self.new_task(self.loop, notmuch()) |
| 179 | self.loop.run_until_complete(t) |
| 180 | self.assertTrue(t.done()) |
| 181 | self.assertEqual(t.result(), 'ok') |
| 182 | self.assertIs(t._loop, self.loop) |
| 183 | self.assertIs(t.get_loop(), self.loop) |
| 184 | |
| 185 | loop = asyncio.new_event_loop() |
| 186 | self.set_event_loop(loop) |
| 187 | t = self.new_task(loop, notmuch()) |
| 188 | self.assertIs(t._loop, loop) |
| 189 | loop.run_until_complete(t) |
| 190 | loop.close() |
| 191 | |
| 192 | def test_ensure_future_coroutine(self): |
| 193 | async def notmuch(): |
nothing calls this directly
no test coverage detected