MCPcopy Create free account
hub / github.com/Kaggle/docker-python / test_initialize

Method test_initialize

tests/test_python_lsp_server.py:6–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4
5class TestPythonLspServer(unittest.TestCase):
6 def test_initialize(self):
7 server = subprocess.Popen(
8 'python -m pylsp --check-parent-process',
9 shell=True,
10 stdin=subprocess.PIPE,
11 stdout=subprocess.PIPE)
12
13 response = server.communicate(input=
14 b'Content-Length: 67\r\n'
15 b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
16 b'\r\n'
17 b'{"id": "a", "jsonrpc": "2.0", "method": "initialize", "params": {}}')[0]
18 assert 'capabilities' in response.decode('utf-8')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected