Skip to content

armgit / txtai

Public Imported from GitHub
0

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

Update tests

davidmezzetti1e449cb9adca
diff --git a/test/python/testvectors.py b/test/python/testvectors.py
index 4a6650b4..e4afd37a 100644
--- a/test/python/testvectors.py
+++ b/test/python/testvectors.py
@@ -13,7 +13,8 @@ class TestVectors(unittest.TestCase):
Vectors tests
"""
- def setUp(self):
+ @staticmethod
+ def setUpClass():
"""
Test a WordVectors build.
"""
@@ -22,12 +23,23 @@ class TestVectors(unittest.TestCase):
path = os.path.join(tempfile.gettempdir(), "vectors")
# Save model path
- self.path = path + ".magnitude"
+ vectors = path + ".magnitude"
# Build word vectors, if they don't already exist
- if not os.path.exists(self.path):
+ if not os.path.exists(vectors):
WordVectors.build("LICENSE", 300, 3, path)
+ def setUp(self):
+ """
+ Test a WordVectors build.
+ """
+
+ # Word vectors path
+ path = os.path.join(tempfile.gettempdir(), "vectors")
+
+ # Save model path
+ self.path = path + ".magnitude"
+
def testLoad(self):
"""
Test loading word vectors