Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Apr 19, 2024
1 parent 78b0e0c commit 064fd90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion chromadb/test/property/test_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Metadatas,
Where,
WhereDocument,
Omitted,
)
import chromadb.test.property.strategies as strategies
import hypothesis.strategies as st
Expand Down Expand Up @@ -345,7 +346,7 @@ def test_empty_filter(api: ServerAPI) -> None:
n_results=3,
)
assert res["ids"] == [[], []]
assert res["embeddings"] is None
assert isinstance(res["embeddings"], Omitted)
assert res["distances"] == [[], []]
assert res["metadatas"] == [[], []]

Expand Down
8 changes: 4 additions & 4 deletions chromadb/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import chromadb
from chromadb.api.fastapi import FastAPI
from chromadb.api.types import QueryResult, EmbeddingFunction, Document
from chromadb.api.types import QueryResult, EmbeddingFunction, Document, Omitted
from chromadb.config import Settings
import chromadb.server.fastapi
import pytest
Expand Down Expand Up @@ -92,7 +92,7 @@ def test_persist_index_loading(api_fixture, request):
if (key in includes) or (key == "ids"):
assert len(nn[key]) == 1
else:
assert nn[key] is None
assert isinstance(nn[key], Omitted)


@pytest.mark.parametrize("api_fixture", [local_persist_api])
Expand All @@ -119,7 +119,7 @@ def __call__(self, input):
if (key in includes) or (key == "ids"):
assert len(nn[key]) == 1
else:
assert nn[key] is None
assert isinstance(nn[key], Omitted)


@pytest.mark.parametrize("api_fixture", [local_persist_api])
Expand Down Expand Up @@ -1173,7 +1173,7 @@ def test_persist_index_loading_params(api, request):
if (key in includes) or (key == "ids"):
assert len(nn[key]) == 1
else:
assert nn[key] is None
assert isinstance(nn[key], Omitted)


def test_add_large(api):
Expand Down

0 comments on commit 064fd90

Please sign in to comment.