Skip to content

Commit 4f431db

Browse files
committed
Add Svelte cases to parametrized tests in test_serena_agent.py
1 parent 33f1218 commit 4f431db

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

test/serena/test_serena_agent.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def serena_config():
5151
Language.HAXE,
5252
Language.LEAN4,
5353
Language.MSL,
54+
Language.SVELTE,
5455
]:
5556
repo_path = get_repo_path(language)
5657
if repo_path.exists():
@@ -142,8 +143,8 @@ def _assert_find_symbol(self, serena_agent: SerenaAgent, symbol_name: str, expec
142143
for s in symbols
143144
), f"Expected to find {symbol_name} ({expected_kind}) in {expected_file}"
144145
# testing retrieval of symbol info
145-
if serena_agent.get_active_lsp_languages() == [Language.KOTLIN]:
146-
# kotlin LS doesn't seem to provide hover info right now, at least for the struct we test this on
146+
if serena_agent.get_active_lsp_languages() in ([Language.KOTLIN], [Language.SVELTE]):
147+
# kotlin/svelte LS doesn't seem to provide hover info right now, at least for the symbols we test this on
147148
return
148149
for s in symbols:
149150
if s["kind"] in (SymbolKind.File.name, SymbolKind.Module.name):
@@ -204,6 +205,7 @@ def test_find_symbol_within_php_file(self, serena_agent: SerenaAgent) -> None:
204205
pytest.param(Language.HAXE, "Main", "Class", "Main.hx", marks=pytest.mark.haxe),
205206
pytest.param(Language.LEAN4, "add", "Method", "Helper.lean", marks=pytest.mark.lean4),
206207
pytest.param(Language.MSL, "greet", "Function", "main.mrc", marks=pytest.mark.msl),
208+
pytest.param(Language.SVELTE, "Game", "Class", os.path.join("src", "routes", "sverdle", "game.ts"), marks=pytest.mark.svelte),
207209
],
208210
indirect=["serena_agent"],
209211
)
@@ -313,6 +315,13 @@ def contains_ref_with_relative_path(refs, relative_path):
313315
),
314316
pytest.param(Language.LEAN4, "add", "Helper.lean", "Main.lean", marks=pytest.mark.lean4),
315317
pytest.param(Language.MSL, "format.coins", "utils.mrc", "main.mrc", marks=pytest.mark.msl),
318+
pytest.param(
319+
Language.SVELTE,
320+
"Game",
321+
os.path.join("src", "routes", "sverdle", "game.ts"),
322+
os.path.join("src", "routes", "sverdle", "+page.server.ts"),
323+
marks=pytest.mark.svelte,
324+
),
316325
],
317326
indirect=["serena_agent"],
318327
)

0 commit comments

Comments
 (0)