def test_reprWithChaining(self):
        """
        If a L{Deferred} C{a} has been fired, but is waiting on another
        L{Deferred} C{b} that appears in its callback chain, then C{repr(a)}
        says that it is waiting on C{b}.
        """
        a = defer.Deferred()
        b = defer.Deferred()
        b.chainDeferred(a)
        self.assertEqual(
            repr(a), "<Deferred at 0x%x waiting on Deferred at 0x%x>" % (
                id(a), id(b)))

        If a L{Deferred} C{a} has been fired, but is waiting on another
        L{Deferred} C{b} that appears in its callback chain, then C{repr(a)}
        says that it is waiting on C{b}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_defer.py