mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
Add unit tests for LspGraphBuilder class
- Implement comprehensive unit tests for the LspGraphBuilder class to validate its functionality in building code association graphs. - Tests cover various scenarios including single level graph expansion, max nodes and depth boundaries, concurrent expansion limits, document symbol caching, error handling during node expansion, and edge cases such as empty seed lists and self-referencing nodes. - Utilize pytest and asyncio for asynchronous testing and mocking of LspBridge methods.
This commit is contained in:
@@ -1,7 +1,34 @@
|
||||
"""codex-lens Language Server Protocol implementation."""
|
||||
"""LSP module for real-time language server integration.
|
||||
|
||||
from __future__ import annotations
|
||||
This module provides:
|
||||
- LspBridge: HTTP bridge to VSCode language servers
|
||||
- LspGraphBuilder: Build code association graphs via LSP
|
||||
- Location: Position in a source file
|
||||
|
||||
from codexlens.lsp.server import CodexLensLanguageServer, main
|
||||
Example:
|
||||
>>> from codexlens.lsp import LspBridge, LspGraphBuilder
|
||||
>>>
|
||||
>>> async with LspBridge() as bridge:
|
||||
... refs = await bridge.get_references(symbol)
|
||||
... graph = await LspGraphBuilder().build_from_seeds(seeds, bridge)
|
||||
"""
|
||||
|
||||
__all__ = ["CodexLensLanguageServer", "main"]
|
||||
from codexlens.lsp.lsp_bridge import (
|
||||
CacheEntry,
|
||||
Location,
|
||||
LspBridge,
|
||||
)
|
||||
from codexlens.lsp.lsp_graph_builder import (
|
||||
LspGraphBuilder,
|
||||
)
|
||||
|
||||
# Alias for backward compatibility
|
||||
GraphBuilder = LspGraphBuilder
|
||||
|
||||
__all__ = [
|
||||
"CacheEntry",
|
||||
"GraphBuilder",
|
||||
"Location",
|
||||
"LspBridge",
|
||||
"LspGraphBuilder",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user