mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 04:15:11 +00:00
Fixed path in test
This commit is contained in:
1 parent
d4dedd5d84
commit
e6ae39ab1b
2 files changed
+4
-8
No files matched your search
@@ -738,9 +738,4 @@ class CSharpLanguageServer(SolidLanguageServer):
|
||||
|
||||
@override
|
||||
def _get_wait_time_for_cross_file_referencing(self) -> float:
|
||||
is_windows = platform.system() == "Windows"
|
||||
# seems like on windows initialization may take longer
|
||||
if is_windows:
|
||||
return 3
|
||||
else:
|
||||
return 1
|
||||
return 1
|
||||
@@ -1,6 +1,7 @@
|
||||
import os
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
from typing import cast
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
import pytest
|
||||
@@ -110,14 +111,14 @@ class TestCSharpLanguageServer:
|
||||
refs = language_server.request_references(file_path, sel_start["line"], sel_start["character"] + 1)
|
||||
|
||||
# Should find references in both Program.cs and Models/Person.cs
|
||||
ref_files = [ref.get("relativePath", "") for ref in refs]
|
||||
ref_files = cast(list[str], [ref.get("relativePath", "") for ref in refs])
|
||||
print(f"Found references: {refs}")
|
||||
print(f"Reference files: {ref_files}")
|
||||
|
||||
# Check that we have references from both files
|
||||
assert any("Program.cs" in ref_file for ref_file in ref_files), "Should find reference in Program.cs"
|
||||
assert any(
|
||||
"Models/Person.cs" in ref_file for ref_file in ref_files
|
||||
os.path.join("Models", "Person.cs") in ref_file for ref_file in ref_files
|
||||
), "Should find reference in Models/Person.cs where Calculator.Subtract is called"
|
||||
|
||||
# check for a second time, since the first call may trigger initialization and change the state of the LS
|
||||
|
||||
Reference in new issue
Block a user