Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Add test for missing SQLite ANN coverage

davidmezzettif3ceece76a8b
diff --git a/test/python/testann/testdense.py b/test/python/testann/testdense.py
index f98384e5..94cc77c9 100644
--- a/test/python/testann/testdense.py
+++ b/test/python/testann/testdense.py
@@ -22,7 +22,7 @@ from txtai.ann.dense.ggml import GGMLTensors
from txtai.serialize import SerializeFactory
-# pylint: disable=R0904
+# pylint: disable=C0302,R0904
class TestDense(unittest.TestCase):
"""
Dense ANN tests.
@@ -675,7 +675,6 @@ class TestDense(unittest.TestCase):
# Test saving to a new path
model = self.backend("sqlite")
- expected = model.count() - 1
# Test save variations
index = os.path.join(tempfile.gettempdir(), "ann.sqlite.existing")
@@ -683,6 +682,10 @@ class TestDense(unittest.TestCase):
# Save new
model.save(index)
+ # Test saving to a new path
+ model = self.backend("sqlite")
+ expected = model.count() - 1
+
# Delete id
model.delete([0])