Add test for agent instantiation, including regression test for #1107

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-03-01 01:19:14 +01:00
1 parent be618a4653
commit 67d8173f1e
1 file changed
+12
+12
View File
@@ -105,6 +105,18 @@ def serena_agent(request: pytest.FixtureRequest, serena_config) -> Iterator[Sere
class TestSerenaAgent:
@pytest.mark.parametrize("project", [None, str(get_repo_path(Language.PYTHON)), "non_existent_path"])
def test_agent_instantiation(self, project: str | None):
"""
Tests agent instantiation for cases where
* no project is specified at startup
* a valid project path is specified at startup
* an invalid project path is specified at startup
All cases must not raise an exception.
"""
serena_config = SerenaConfig(gui_log_window=False, web_dashboard=False)
SerenaAgent(project=project, serena_config=serena_config)
@pytest.mark.parametrize(
"serena_agent,symbol_name,expected_kind,expected_file",
[