Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
floatplane committed Dec 10, 2024
1 parent 96f1f4f commit a0956ac
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ def test_lancedb_delete() -> None:
assert store.get_table().count_rows() == 2


@pytest.mark.requires("lancedb")
def test_lancedb_delete_by_ids() -> None:
embeddings = FakeEmbeddings()

store = LanceDB(embedding=embeddings, id_key="pk")
ids = store.add_texts(["text 1", "text 2", "item 3"])
store.delete(ids=ids)
assert store.get_table().count_rows() == 0


@pytest.mark.requires("lancedb")
def test_lancedb_all_searches() -> None:
embeddings = FakeEmbeddings()
Expand Down

0 comments on commit a0956ac

Please sign in to comment.