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

Method test_connection

tests/sync/test_server.py:366–371  ·  view source on GitHub ↗

Server receives connection from client over a Unix socket.

(self)

Source from the content-addressed store, hash-verified

364@unittest.skipUnless(hasattr(socket, "AF_UNIX"), "this test requires Unix sockets")
365class UnixServerTests(EvalShellMixin, unittest.TestCase):
366 def test_connection(self):
367 """Server receives connection from client over a Unix socket."""
368 with temp_unix_socket_path() as path:
369 with run_unix_server(path):
370 with unix_connect(path) as client:
371 self.assertEval(client, "ws.protocol.state.name", "OPEN")
372
373
374@unittest.skipUnless(hasattr(socket, "AF_UNIX"), "this test requires Unix sockets")

Callers

nothing calls this directly

Calls 4

unix_connectFunction · 0.90
temp_unix_socket_pathFunction · 0.85
run_unix_serverFunction · 0.85
assertEvalMethod · 0.45

Tested by

no test coverage detected