Delegate top-level adapter imports to adapters package.
Keep lazy loading in adapters/__init__.py as the single place to register new adapters. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
f092ca2022
commit
1f02195c27
@@ -93,3 +93,10 @@ def test_top_level_lazy_import_propagates_minio_import_error() -> None:
|
||||
):
|
||||
with pytest.raises(ImportError, match=r"python-repositories\[minio\]"):
|
||||
_ = python_repositories.MinioAdapter
|
||||
|
||||
|
||||
def test_adapters_subpackage_lazy_import_succeeds() -> None:
|
||||
"""Adapter subpackage imports delegate to the same lazy loader."""
|
||||
from python_repositories.adapters import RedisAdapter
|
||||
|
||||
assert RedisAdapter.__name__ == "RedisAdapter"
|
||||
|
||||
Reference in New Issue
Block a user