MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_shutdown

Method test_shutdown

tests/sync/test_server.py:283–289  ·  view source on GitHub ↗

Server provides a shutdown method.

(self)

Source from the content-addressed store, hash-verified

281 self.assertIsInstance(server.fileno(), int)
282
283 def test_shutdown(self):
284 """Server provides a shutdown method."""
285 with run_server() as server:
286 server.shutdown()
287 # Check that the server socket is closed.
288 with self.assertRaises(OSError):
289 server.socket.accept()
290
291 def test_handshake_fails(self):
292 """Server receives connection from client but the handshake fails."""

Callers

nothing calls this directly

Calls 3

run_serverFunction · 0.85
acceptMethod · 0.80
shutdownMethod · 0.45

Tested by

no test coverage detected