def testCallLaterCancelled(self):
        """
        Test that calls can be cancelled.
        """
        c = task.Clock()
        call = c.callLater(1, lambda a, b: None, 1, b=2)
        call.cancel()
        self.assertFalse(call.active())

        Test that calls can be cancelled.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_task.py