-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests for upsert and update with none ids
- Loading branch information
1 parent
b872676
commit bc71c6c
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |