Test Vicinity.delete method by verifying that the vector for a deleted item is not returned in subsequent queries. :param vicinity_with_basic_backend_and_store: A Vicinity instance.
(vicinity_with_basic_backend_and_store: Vicinity)
| 241 | |
| 242 | |
| 243 | def test_vicinity_delete_with_store(vicinity_with_basic_backend_and_store: Vicinity) -> None: |
| 244 | """ |
| 245 | Test Vicinity.delete method by verifying that the vector for a deleted item is not returned in subsequent queries. |
| 246 | |
| 247 | :param vicinity_with_basic_backend_and_store: A Vicinity instance. |
| 248 | """ |
| 249 | assert vicinity_with_basic_backend_and_store.vector_store is not None |
| 250 | # Delete "item2" from the Vicinity instance |
| 251 | vicinity_with_basic_backend_and_store.delete(["item2"]) |
| 252 | |
| 253 | # Ensure "item2" is no longer in the items list |
| 254 | assert "item2" not in vicinity_with_basic_backend_and_store.items |
| 255 | assert len(vicinity_with_basic_backend_and_store) == len(vicinity_with_basic_backend_and_store.vector_store) |
| 256 | |
| 257 | |
| 258 | def test_vicinity_insert_mismatched_lengths(vicinity_instance: Vicinity, query_vector: np.ndarray) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…