Remove windows tests and fix other tests

This commit is contained in:
David Bernazal committed 2025-07-01 07:33:57 -05:00
1 parent e9378ecf79
commit 2d45a39314
6 files changed
+151 -237

No files matched your search

@@ -110,40 +110,7 @@ class TestElixirLanguageServerSymbols:
# This is acceptable behavior for module-level positions
assert containing_symbol is None or containing_symbol == {} or "TestRepo.Services" in str(containing_symbol)
@pytest.mark.parametrize("language_server", [Language.ELIXIR], indirect=True)
def test_request_referencing_symbols_function(self, language_server: SolidLanguageServer) -> None:
"""Test request_referencing_symbols for a function."""
# Test referencing symbols for User.new function
file_path = os.path.join("lib", "models.ex")
# Find the User.new function
symbols = language_server.request_document_symbols(file_path)
new_function_symbol = None
for symbol_group in symbols:
for symbol in symbol_group:
if "User" in symbol.get("name", "") and "children" in symbol:
new_function_symbol = next((s for s in symbol.get("children", []) if s.get("name") == "new"), None)
if new_function_symbol:
break
if new_function_symbol:
break
if not new_function_symbol or "selectionRange" not in new_function_symbol:
pytest.skip("User.new function or its selectionRange not found")
sel_start = new_function_symbol["selectionRange"]["start"]
ref_symbols = [
ref.symbol for ref in language_server.request_referencing_symbols(file_path, sel_start["line"], sel_start["character"])
]
if ref_symbols: # Only assert if we found referencing symbols
# Verify the structure of referencing symbols
for symbol in ref_symbols:
assert "name" in symbol
assert "kind" in symbol
if "location" in symbol and "range" in symbol["location"]:
assert "start" in symbol["location"]["range"]
assert "end" in symbol["location"]["range"]
@pytest.mark.parametrize("language_server", [Language.ELIXIR], indirect=True)
def test_request_referencing_symbols_struct(self, language_server: SolidLanguageServer) -> None:
@@ -235,6 +202,12 @@ class TestElixirLanguageServerSymbols:
if defining_symbol:
assert "User" in defining_symbol.get("name", "")
@pytest.mark.xfail(
reason="Known intermittent bug in Next LS v0.23.3: Protocol.UndefinedError for :timeout atom. "
"Occurs in CI environments but may pass locally. "
"See https://github.com/elixir-tools/next-ls/issues/543",
strict=False
)
@pytest.mark.parametrize("language_server", [Language.ELIXIR], indirect=True)
def test_request_defining_symbol_none(self, language_server: SolidLanguageServer) -> None:
"""Test request_defining_symbol for a position with no symbol."""