mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
- Add test_lsp_client_send_request_not_connected - Add test_lsp_client_send_notification_not_connected - Mark 6.2 and 7.2 tasks complete in tasks.md
1.5 KiB
1.5 KiB
Implementation Tasks
1. Test Fixture Directory
- 1.1 Create tests/integration/fixtures/ directory
2. LSP Echo Server Fixture
- 2.1 Create tests/integration/fixtures/echo_lsp_server.py
- 2.2 Implement stdio-based server with Content-Length header parsing
- 2.3 Handle
initializerequest - respond with capabilities - 2.4 Handle
initializednotification - no<6E> response needed - 2.5 Handle
textDocument/didOpennotification - store document - 2.6 Handle
shutdownrequest - respond with null result - 2.7 Handle
exitnotification - terminate cleanly
3. LSP Integration Test File
- 3.1 Create tests/integration/test_lsp_integration.py
4. LSP Client Initialization Test
- 4.1 Add test for LSP client initial state (connected=False, etc.)
5. LSP Client connect_to_server() Test
- 5.1 Add test for connecting to echo LSP server
- 5.2 Verify subprocess is started
- 5.3 Verify reader and writer are set
- 5.4 Verify initialize/initialized handshake completes
6. LSP Client send_request() Test
- 6.1 Add test for sending request and receiving response
- 6.2 Add test for RuntimeError when not connected
7. LSP Client send_notification() Test
- 7.1 Add test for sending notification without waiting
- 7.2 Add test for RuntimeError when not connected
8. LSP Client shutdown() Test
- 8.1 Add test for clean shutdown
9. Verification
- 9.1 Run
uv run pytest tests/integration/ -v - 9.2 Verify all LSP integration tests pass