From 2c8ed1737d6769fe1ef5c96f8a2bd75b9899316a Mon Sep 17 00:00:00 2001 From: phernandez Date: Tue, 18 Feb 2025 20:45:47 -0600 Subject: [PATCH] chore: remove unused tests --- tests/api/test_search_router.py | 22 ---------------------- tests/mcp/test_tool_notes.py | 1 + tests/services/test_context_service.py | 12 ------------ tests/services/test_link_resolver.py | 8 -------- 4 files changed, 1 insertion(+), 42 deletions(-) diff --git a/tests/api/test_search_router.py b/tests/api/test_search_router.py index cd390f71..7577d024 100644 --- a/tests/api/test_search_router.py +++ b/tests/api/test_search_router.py @@ -104,28 +104,6 @@ async def test_search_with_date_filter(client, indexed_entity): assert len(search_results.results) == 0 -@pytest.mark.skip("search scoring is not implemented yet") -@pytest.mark.asyncio -async def test_search_scoring(client, indexed_entity): - """Test search result scoring.""" - # Exact match should score higher - exact_response = await client.post("/search/", json={"text": "TestComponent"}) - - # Partial match should score lower - partial_response = await client.post("/search/", json={"text": "test"}) - - assert exact_response.status_code == 200 - assert partial_response.status_code == 200 - - exact_result = SearchResponse.model_validate(exact_response.json()) - partial_result = SearchResponse.model_validate(partial_response.json()) - - exact_score = exact_result.results[0].score - partial_score = partial_result.results[0].score - - assert exact_score > partial_score - - @pytest.mark.asyncio async def test_search_empty(search_service, client): """Test search with no matches.""" diff --git a/tests/mcp/test_tool_notes.py b/tests/mcp/test_tool_notes.py index c40c911b..25dfb2fe 100644 --- a/tests/mcp/test_tool_notes.py +++ b/tests/mcp/test_tool_notes.py @@ -221,6 +221,7 @@ async def test_multiple_notes(app): assert "--- memory://test/note-3" in result assert "Content 3" in result + @pytest.mark.asyncio async def test_multiple_notes_pagination(app): """Test creating and managing multiple notes.""" diff --git a/tests/services/test_context_service.py b/tests/services/test_context_service.py index 1f4c1ea6..762694b1 100644 --- a/tests/services/test_context_service.py +++ b/tests/services/test_context_service.py @@ -128,18 +128,6 @@ async def test_build_context(context_service, test_graph): assert total_results == len(primary_results) + len(related_results) -@pytest.mark.skip("search prefix see:'https://sqlite.org/fts5.html#FTS5 Prefix Queries'") -@pytest.mark.asyncio -async def test_build_context_pattern(context_service, test_graph): - """Test permalink wildcard lookup.""" - # url = memory_url.validate_strings("memory://test/connected*") - # results = await context_service.build_context(url) - # matched_results = results["metadata"]["matched_results"] - # primary_results = results["primary_results"] - # related_results = results["related_results"] - # total_results = results["metadata"]["total_results"] - - @pytest.mark.asyncio async def test_build_context_not_found(context_service): """Test handling non-existent permalinks.""" diff --git a/tests/services/test_link_resolver.py b/tests/services/test_link_resolver.py index fac77d6c..165a70ba 100644 --- a/tests/services/test_link_resolver.py +++ b/tests/services/test_link_resolver.py @@ -92,14 +92,6 @@ async def test_exact_title_match(link_resolver, test_entities): assert entity.permalink == "components/core-service" -@pytest.mark.skip(reason="Fuzzy misspelling not yet implemented") -@pytest.mark.asyncio -async def test_fuzzy_title_match_misspelling(link_resolver): - # Test slight misspelling - result = await link_resolver.resolve_link("Core Servise") - assert result.permalink == "components/core-service" - - @pytest.mark.asyncio async def test_fuzzy_title_partial_match(link_resolver): # Test partial match