Esempio n. 1
0
 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)
Esempio n. 2
0
 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)