Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions integrations/pgvector/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# SPDX-License-Identifier: Apache-2.0

from dataclasses import replace

import pytest
from haystack.dataclasses.document import Document
from haystack.testing.document_store import FilterDocumentsTest
Expand Down Expand Up @@ -42,8 +44,9 @@ def assert_documents_are_equal(self, received: list[Document], expected: list[Do
else:
assert received_doc.embedding == pytest.approx(expected_doc.embedding)

received_doc.embedding, expected_doc.embedding = None, None
assert received_doc == expected_doc
received_doc_no_embedding = replace(received_doc, embedding=None)
expected_doc_no_embedding = replace(expected_doc, embedding=None)
assert received_doc_no_embedding == expected_doc_no_embedding

@pytest.mark.skip(reason="NOT operator is not supported in PgvectorDocumentStore")
def test_not_operator(self, document_store, filterable_docs): ...
Expand Down
Loading