def METHOD_NAME(self):
    from gevent.queue import Queue, Empty
    def bad():
        q = Queue()
        print('switching out, then throwing in')
        try:
            q.get(block=True, timeout=0.1)
        except Empty:
            print("Got Empty")
        print('switching out')
        gevent.sleep(0.1)
        print('switched in')
    with self._make_and_start_server(locals={'bad': bad}) as server:
        with self._create_connection(server) as conn:
            conn.sendall(b'bad()\r\n')
            response = self._wait_for_prompt(conn)
            self._close(conn)
    response = response.replace('\r\n', '\n')
    self.assertEqual(
        'switching out, then throwing in\nGot Empty\nswitching out\nswitched in\n>>> ',
        response)