示例#1
0
    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())
示例#2
0
 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())
示例#3
0
 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())
示例#4
0
 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())