def test_execution(self):
        self.assertEqual(state, {})
        put_data('k', 'v')

        task = huey.dequeue()
        self.assertFalse('k' in state)

        huey.execute(task)
        self.assertEqual(state, {'k': 'v'})

        put_data('k', 'X')
        self.assertEqual(state, {'k': 'v'})

        huey.execute(huey.dequeue())
        self.assertEqual(state, {'k': 'X'})

        self.assertRaises(TypeError, huey.execute, huey.dequeue())
dataset/ETHPy150Open coleifer/huey/huey/tests/test_queue.py/TestHueyQueueAPIs.test_execution/original