File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
1
# pylint: disable=invalid-name
2
2
3
+ import pytest
4
+
3
5
4
6
def test_basic_search (index_with_documents ):
5
7
"""Tests search with a simple query."""
@@ -456,12 +458,14 @@ def test_attributes_to_search_on_search_no_match(index_with_documents):
456
458
)
457
459
assert response ["hits" ] == []
458
460
459
- # Commented because of https://github.com/meilisearch/meilisearch-python/issues/901
460
- # @pytest.mark.usefixtures("enable_vector_search")
461
- # def test_vector_search(index_with_documents_and_vectors):
462
- # response = index_with_documents_and_vectors().search(
463
- # "How to Train Your Dragon", opt_params={"vector": [0.1, 0.2]}
464
- # )
465
461
466
- # assert response["hits"][0]["id"] == "287947"
467
- # assert response["vector"] == [0.1, 0.2]
462
+ @pytest .mark .xfail (
463
+ strict = True , reason = "https://github.com/meilisearch/meilisearch-python/issues/901"
464
+ )
465
+ @pytest .mark .usefixtures ("enable_vector_search" )
466
+ def test_vector_search (index_with_documents_and_vectors ):
467
+ response = index_with_documents_and_vectors ().search (
468
+ "How to Train Your Dragon" , opt_params = {"vector" : [0.1 , 0.2 ]}
469
+ )
470
+ assert response ["hits" ][0 ]["id" ] == "287947"
471
+ assert response ["vector" ] == [0.1 , 0.2 ]
You can’t perform that action at this time.
0 commit comments