mirror of
https://github.com/neuml/txtai.git
synced 2026-10-12 02:19:52 +00:00
Update test
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user