diff --git a/chromadb/test/api/test_api_update.py b/chromadb/test/api/test_api_update.py new file mode 100644 index 00000000000..a1995e668c7 --- /dev/null +++ b/chromadb/test/api/test_api_update.py @@ -0,0 +1,10 @@ +import pytest +from chromadb.api import ClientAPI + + +def test_update_with_none_ids(client: ClientAPI) -> None: + client.reset() + collection = client.create_collection("test") + with pytest.raises(ValueError) as e: + collection.update(ids=None, embeddings=[[0.1, 0.2, 0.3]]) # type: ignore[arg-type] + assert "You must provide ids." in str(e) diff --git a/chromadb/test/api/test_api_upsert.py b/chromadb/test/api/test_api_upsert.py new file mode 100644 index 00000000000..5aced3f6980 --- /dev/null +++ b/chromadb/test/api/test_api_upsert.py @@ -0,0 +1,10 @@ +import pytest +from chromadb.api import ClientAPI + + +def test_upsert_with_none_ids(client: ClientAPI) -> None: + client.reset() + collection = client.create_collection("test") + with pytest.raises(ValueError) as e: + collection.upsert(ids=None, embeddings=[[0.1, 0.2, 0.3]]) # type: ignore[arg-type] + assert "You must provide ids." in str(e)