Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
curquiza committed Jan 11, 2024
1 parent a91bd4e commit 58ad336
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/index/test_index_search_meilisearch.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# pylint: disable=invalid-name

import pytest


def test_basic_search(index_with_documents):
"""Tests search with a simple query."""
Expand Down Expand Up @@ -458,12 +456,12 @@ def test_attributes_to_search_on_search_no_match(index_with_documents):
)
assert response["hits"] == []

# Commented because of https://github.com/meilisearch/meilisearch-python/issues/901
# @pytest.mark.usefixtures("enable_vector_search")
# def test_vector_search(index_with_documents_and_vectors):
# response = index_with_documents_and_vectors().search(
# "How to Train Your Dragon", opt_params={"vector": [0.1, 0.2]}
# )

@pytest.mark.usefixtures("enable_vector_search")
def test_vector_search(index_with_documents_and_vectors):
response = index_with_documents_and_vectors().search(
"How to Train Your Dragon", opt_params={"vector": [0.1, 0.2]}
)

assert response["hits"][0]["id"] == "287947"
assert response["vector"] == [0.1, 0.2]
# assert response["hits"][0]["id"] == "287947"
# assert response["vector"] == [0.1, 0.2]

0 comments on commit 58ad336

Please sign in to comment.