def test_set_result_unless_cancelled(self): from asyncio import futures fut = asyncio.Future(loop=self.loop) fut.cancel() futures._set_result_unless_cancelled(fut, 2) self.assertTrue(fut.cancelled())
def test_set_result_unless_cancelled(self): fut = self._new_future(loop=self.loop) fut.cancel() futures._set_result_unless_cancelled(fut, 2) self.assertTrue(fut.cancelled())