def test_timer_cancellation(self):

        # Various lists for tracking callback stage
        timeout = .1
        callback = TimerCallback(timeout)
        timer = EventletConnection.create_timer(timeout, callback.invoke)
        timer.cancel()
        # Release context allow for timer thread to run.
        time.sleep(.2)
        timer_manager = EventletConnection._timers
        # Assert that the cancellation was honored
        self.assertFalse(timer_manager._queue)
        self.assertFalse(timer_manager._new_timers)
        self.assertFalse(callback.was_invoked())
Return a SUB instruction.
dataset/ETHPy150Open datastax/python-driver/tests/unit/io/test_eventletreactor.py/EventletTimerTest.test_timer_cancellation--crossover with--dataset/ETHPy150Open programa-stic/barf-project/barf/barf/core/reil/reil.py/ReilInstructionBuilder.gen_sub