def test_cancel(self):
        reactor = FakeReactor()
        cancelled = []
        def error(f):
            cancelled.append(reactor.in_call_from_thread)
            cancelled.append(f)

        d = Deferred().addErrback(error)
        dr = EventualResult(d, _reactor=reactor)
        dr.cancel()
        self.assertTrue(cancelled[0])
        self.assertIsInstance(cancelled[1].value, CancelledError)
cancel() cancels the wrapped Deferred, running cancellation in the
dataset/ETHPy150Open itamarst/crochet/crochet/tests/test_api.py/EventualResultTests.test_cancel