def METHOD_NAME(self):
    p = gevent.spawn(util.wrap_errors(AssertionError, gevent.sleep), 2)
    gevent.sleep(0)  # wait for p to start, because actual order of switching is reversed
    switcher = gevent.spawn(p.switch, None)
    result = p.get()
    assert isinstance(result, AssertionError), result
    assert 'Invalid switch' in str(result), repr(str(result))
    switcher.kill()