Honor explicitly selected custom storage backends
This commit is contained in:
parent
9c02d2ecf7
commit
87e4673ac6
1 changed files with 23 additions and 0 deletions
19
tests/test_configuration_regressions.py
Normal file
19
tests/test_configuration_regressions.py
Normal 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
|
||||
Loading…
Reference in a new issue