def METHOD_NAME(self):
    DELAY = 0.1
    state = []
    def test():
        try:
            state.append('start')
            eventlet.sleep(DELAY)
        except:
            state.append('except')
            # catching GreenletExit
            pass
        # when switching to hub, hub makes itself the parent of this greenlet,
        # thus after the function's done, the control will go to the parent
        eventlet.sleep(0)
        state.append('finished')
    g = eventlet.spawn(test)
    eventlet.sleep(DELAY / 2)
    self.assertEqual(state, ['start'])
    eventlet.kill(g)
    # will not get there, unless switching is explicitly scheduled by kill
    self.assertEqual(state, ['start', 'except'])
    eventlet.sleep(DELAY)
    self.assertEqual(state, ['start', 'except', 'finished'])