def test_runforever_exit(self): """ Tests that stopping a server from one greenlet causes serve_forever() to return. """ server = QdbServer(client_port=0, tracer_port=0) with Timeout(1, False): spawn_later(0.3, server.stop) # Stop the server in 0.3 seconds. server.serve_forever() self.assertFalse(server.is_running)
def test_runforever_exit(self): """ Tests that stopping a server from one greenlet causes serve_forever() to return. """ server = QdbServer( client_port=0, tracer_port=0 ) with Timeout(1, False): spawn_later(0.3, server.stop) # Stop the server in 0.3 seconds. server.serve_forever() self.assertFalse(server.is_running)