mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
chore: remove unused tests
This commit is contained in:
@@ -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."""
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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."""
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user