'Test attempting to cancel the call in a callback.
AlreadyCalled should be raised, not for example a ValueError from
removing the call from Clock.calls. This requires call.called to be
set before the callback is called.'

def testAdvanceCancel(self):

    c = task.Clock()
    def cb():
        self.assertRaises(error.AlreadyCalled, call.cancel)
    call = c.callLater(1, cb)
    c.advance(1)
