Skip to content

Commit

Permalink
fix linting and test
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Feb 12, 2024
1 parent c14a054 commit a7943e2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
6 changes: 2 additions & 4 deletions integrations/pinecone/tests/test_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ def test_write_documents(self, document_store: PineconeDocumentStore):
assert document_store.write_documents(docs) == 1

@pytest.mark.skip(reason="Pinecone only supports UPSERT operations")
def test_write_documents_duplicate_fail(self, document_store: PineconeDocumentStore):
...
def test_write_documents_duplicate_fail(self, document_store: PineconeDocumentStore): ...

@pytest.mark.skip(reason="Pinecone only supports UPSERT operations")
def test_write_documents_duplicate_skip(self, document_store: PineconeDocumentStore):
...
def test_write_documents_duplicate_skip(self, document_store: PineconeDocumentStore): ...

def test_init_fails_wo_api_key(self, monkeypatch):
api_key = None
Expand Down
4 changes: 2 additions & 2 deletions integrations/pinecone/tests/test_emebedding_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_to_dict(mock_pinecone):
retriever = PineconeEmbeddingRetriever(document_store=document_store)
res = retriever.to_dict()
assert res == {
"type": "haystack_integrations.components.retrievers.pinecone.dense_retriever.PineconeEmbeddingRetriever",
"type": "haystack_integrations.components.retrievers.pinecone.embedding_retriever.PineconeEmbeddingRetriever",
"init_parameters": {
"document_store": {
"init_parameters": {
Expand All @@ -52,7 +52,7 @@ def test_to_dict(mock_pinecone):
@patch("haystack_integrations.document_stores.pinecone.document_store.pinecone")
def test_from_dict(mock_pinecone, monkeypatch):
data = {
"type": "haystack_integrations.components.retrievers.pinecone.dense_retriever.PineconeEmbeddingRetriever",
"type": "haystack_integrations.components.retrievers.pinecone.embedding_retriever.PineconeEmbeddingRetriever",
"init_parameters": {
"document_store": {
"init_parameters": {
Expand Down
33 changes: 11 additions & 22 deletions integrations/pinecone/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,45 +38,34 @@ def assert_documents_are_equal(self, received: List[Document], expected: List[Do
assert received_doc.embedding == pytest.approx(expected_doc.embedding)

@pytest.mark.skip(reason="Pinecone does not support comparison with null values")
def test_comparison_equal_with_none(self, document_store, filterable_docs):
...
def test_comparison_equal_with_none(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with null values")
def test_comparison_not_equal_with_none(self, document_store, filterable_docs):
...
def test_comparison_not_equal_with_none(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with dates")
def test_comparison_greater_than_with_iso_date(self, document_store, filterable_docs):
...
def test_comparison_greater_than_with_iso_date(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with null values")
def test_comparison_greater_than_with_none(self, document_store, filterable_docs):
...
def test_comparison_greater_than_with_none(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with dates")
def test_comparison_greater_than_equal_with_iso_date(self, document_store, filterable_docs):
...
def test_comparison_greater_than_equal_with_iso_date(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with null values")
def test_comparison_greater_than_equal_with_none(self, document_store, filterable_docs):
...
def test_comparison_greater_than_equal_with_none(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with dates")
def test_comparison_less_than_with_iso_date(self, document_store, filterable_docs):
...
def test_comparison_less_than_with_iso_date(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with null values")
def test_comparison_less_than_with_none(self, document_store, filterable_docs):
...
def test_comparison_less_than_with_none(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with dates")
def test_comparison_less_than_equal_with_iso_date(self, document_store, filterable_docs):
...
def test_comparison_less_than_equal_with_iso_date(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support comparison with null values")
def test_comparison_less_than_equal_with_none(self, document_store, filterable_docs):
...
def test_comparison_less_than_equal_with_none(self, document_store, filterable_docs): ...

@pytest.mark.skip(reason="Pinecone does not support the 'not' operator")
def test_not_operator(self, document_store, filterable_docs):
...
def test_not_operator(self, document_store, filterable_docs): ...

0 comments on commit a7943e2

Please sign in to comment.