'If a custom reason is passed to ``timeout`` and the Deferred does not
fire within the timeout interval, it is made to fire with the custom
reason once the timeout interval elapses.'

def test_times_out_with_reason(self):

    reason = CustomException(self.id())
    deferred = timeout(self.clock, self.deferred, self.timeout, reason)
    self.clock.advance(self.timeout)
    self.assertEqual(reason, self.failureResultOf(deferred, CustomException).value)
