In the newly added test_server_finishes_on_error
test for testserver.Server
, I changed the pass
in the except
block to raise
, to temporarily cause the test to fail. The two files in this gist
show the difference in output between letting the select.error
/socket.error
from interrupting
_accept_connection
be raised vs. suppressed.
In socket_interruption_suppressed.txt
, it is clear where the test failed - at the exception in the test function.
In socket_interruption_raised.txt
,
there is extra output that distracts from the real failure. The test server is functioning as it should -
allowing the server thread to be interrupted and exit gracefully when the test code leaves the with
block - so the error output in this case is misleading. Nothing went wrong in the test server; it simply