1. Nicolas Grilly
  2. CherryPy


Christian Wyglendowski  committed 1fa9b1f

When individual tests were run with --help or -h as command line arguments a KeyboardInterrupt exception was raised and the test would hang until another KeyboardInterrupt was raised (i.e., by hitting Ctrl-C).

  • Participants
  • Parent commits 3c128d1
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/test/helper.py

View file
  • Ignore whitespace
     if conf is None:
         conf = {}
-    cherrypy.server.start_with_callback(_test_main_thread, *args, **kwargs)
+    try:
+        cherrypy.server.start_with_callback(_test_main_thread, *args, **kwargs)
+    except KeyboardInterrupt:
+        cherrypy.server.stop()
 def _test_main_thread():