def test_timeoutChainable(self):
        """
        L{defer.Deferred.addTimeout} returns its own L{defer.Deferred} so it
        can be called in a callback chain.
        """
        d = defer.Deferred().addTimeout(5, Clock()).addCallback(lambda _: "done")
        d.callback(None)
        self.assertEqual("done", self.successResultOf(d))

        L{defer.Deferred.addTimeout} returns its own L{defer.Deferred} so it
        can be called in a callback chain.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_defer.py