Coverage for mindsdb / integrations / handlers / duckdb_faiss_handler / test_faiss_handler.py: 0%
13 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from tests.unit.executor.test_knowledge_base import TestKB as BaseTestKB
4class TestFAISS(BaseTestKB):
5 "Run unit tests using FAISS handler as storage"
7 def _get_storage_table(self, kb_name):
8 try:
9 self.run_sql(f"""
10 DROP DATABASE faiss_{kb_name}
11 """)
12 except Exception:
13 pass
15 self.run_sql(f"""
16 CREATE DATABASE faiss_{kb_name}
17 WITH ENGINE = 'duckdb_faiss'
18 """)
20 try:
21 self.run_sql(f"""
22 drop table faiss_{kb_name}.kb_faiss
23 """)
24 except Exception:
25 pass
27 return f"faiss_{kb_name}.kb_faiss"