Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sanders41 committed Jun 11, 2024
1 parent fde4461 commit b38e9fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tests/test_async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,9 @@ async def test_multi_search_ranking_score_threshold(async_client, async_index_wi
assert len(result[0].hits) > 0


@pytest.mark.parametrize("limit, offset", ((1, 1), (None, None)))
@pytest.mark.usefixtures("enable_vector_search")
async def test_similar_search(async_index_with_documents_and_vectors):
async def test_similar_search(limit, offset, async_index_with_documents_and_vectors):
index = await async_index_with_documents_and_vectors()
response = await index.search_similar_documents("287947")
response = await index.search_similar_documents("287947", limit=limit, offset=offset)
assert len(response.hits) >= 1
5 changes: 3 additions & 2 deletions tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,9 @@ def test_multi_search_ranking_score_threshold(client, index_with_documents):
assert len(result[0].hits) > 0


@pytest.mark.parametrize("limit, offset", ((1, 1), (None, None)))
@pytest.mark.usefixtures("enable_vector_search")
def test_similar_search(index_with_documents_and_vectors):
def test_similar_search(limit, offset, index_with_documents_and_vectors):
index = index_with_documents_and_vectors()
response = index.search_similar_documents("287947")
response = index.search_similar_documents("287947", limit=limit, offset=offset)
assert len(response.hits) >= 1

0 comments on commit b38e9fa

Please sign in to comment.