Update test

This commit is contained in:
davidmezzetti
2023-08-25 21:01:01 -04:00
parent a1b92e0a33
commit c911f3438f
-4
View File
@@ -172,8 +172,6 @@ class Common:
Test empty index
"""
print(self.__class__.__name__)
# Test search against empty index
embeddings = Embeddings({"path": "sentence-transformers/nli-mpnet-base-v2", "content": self.backend})
self.assertEqual(embeddings.search("test"), [])
@@ -519,8 +517,6 @@ class Common:
embeddings = Embeddings({"defaults": False, "content": self.backend, "objects": True})
embeddings.index([{"object": "binary data".encode("utf-8")}])
# embeddings.save("/tmp/a")
# Decode and test extracted object
obj = embeddings.search("select object from txtai where id = 0")[0]["object"]
self.assertEqual(str(obj.getvalue(), "utf-8"), "binary data")