Honor explicitly selected custom storage backends

This commit is contained in:
Andras Schmelczer 2026-10-27 19:51:37 +00:00
commit 87e4673ac6

View file

@ -0,0 +1,19 @@
from great_ai import ParallelTinyDbDriver, configure
from great_ai.context import get_context
from great_ai.large_file import LargeFileLocal
def test_explicit_custom_backends_are_preserved(isolated_context: None) -> None:
class CustomDatabase(ParallelTinyDbDriver):
pass
class CustomStorage(LargeFileLocal):
pass
configure(
tracing_database_factory=CustomDatabase,
large_file_implementation=CustomStorage,
disable_se4ml_banner=True,
)
assert isinstance(get_context().tracing_database, CustomDatabase)
assert get_context().large_file_implementation is CustomStorage