From 933fd3f4e758365528ef2bdb676aa69a214581b8 Mon Sep 17 00:00:00 2001 From: Paul Sanders Date: Thu, 11 Jan 2024 13:39:58 -0500 Subject: [PATCH] Xfail test --- tests/index/test_index_search_meilisearch.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/index/test_index_search_meilisearch.py b/tests/index/test_index_search_meilisearch.py index 49723a8d..ad4443e4 100644 --- a/tests/index/test_index_search_meilisearch.py +++ b/tests/index/test_index_search_meilisearch.py @@ -1,5 +1,7 @@ # pylint: disable=invalid-name +import pytest + def test_basic_search(index_with_documents): """Tests search with a simple query.""" @@ -456,12 +458,14 @@ 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]} -# ) -# assert response["hits"][0]["id"] == "287947" -# assert response["vector"] == [0.1, 0.2] +@pytest.mark.xfail( + strict=True, reason="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]} + ) + assert response["hits"][0]["id"] == "287947" + assert response["vector"] == [0.1, 0.2]