Fix path issue in test and request_dir_overview

This commit is contained in:
Michael Panchenko committed 2025-03-29 19:52:09 +01:00
1 parent 65791bf8a1
commit 1c4bfe8ed8
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -867,7 +867,7 @@ class LanguageServer:
for child in symbol["children"]:
assert "location" in child
assert "selectionRange" in child
path = Path(child["location"]["relativePath"]).resolve().relative_to(self.repository_root_path)
path = Path(child["location"]["absolutePath"]).resolve().relative_to(self.repository_root_path)
result[str(path)].append((
child["name"],
child["kind"],
+1 -1
View File
@@ -387,7 +387,7 @@ class TestLanguageServerSymbols:
def test_request_dir_overview(self, language_server: SyncLanguageServer, repo_path: Path):
"""Test that request_dir_overview returns correct symbol information for files in a directory."""
# Get overview of the examples directory
overview = language_server.request_dir_overview(str(repo_path / "test_repo"))
overview = language_server.request_dir_overview("test_repo")
# Verify that we have entries for both files
assert os.path.join("test_repo", "nested.py") in overview