chore: import upstream snapshot with attribution
build / build (macos-latest) (push) Waiting to run
build / build (ubuntu-latest) (push) Waiting to run
build / build (windows-latest) (push) Waiting to run
minimal / deploy (push) Waiting to run

This commit is contained in:
wehub-resource-sync
2026-07-13 13:38:00 +08:00
commit 3a7c47b2a6
623 changed files with 133790 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
"""
Custom database tests
"""
import unittest
from txtai.database import DatabaseFactory
class TestCustom(unittest.TestCase):
"""
Custom database backend tests.
"""
def testCustomBackend(self):
"""
Test resolving a custom backend
"""
database = DatabaseFactory.create({"content": "txtai.database.SQLite"})
self.assertIsNotNone(database)
def testCustomBackendNotFound(self):
"""
Test resolving an unresolvable backend
"""
with self.assertRaises(ImportError):
DatabaseFactory.create({"content": "notfound.database"})