def test_asFuture(self):
        """
        L{defer.Deferred.asFuture} returns a L{asyncio.Future} which fires when
        the given L{defer.Deferred} does.
        """
        d = defer.Deferred()
        loop = new_event_loop()
        aFuture = d.asFuture(loop)
        self.assertEqual(aFuture.done(), False)
        d.callback(13)
        callAllSoonCalls(loop)
        self.assertEqual(self.successResultOf(d), None)
        self.assertEqual(aFuture.result(), 13)

        L{defer.Deferred.asFuture} returns a L{asyncio.Future} which fires when
        the given L{defer.Deferred} does.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_defer.py