Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyiceberg/catalog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def load_catalog(name: Optional[str] = None, **properties: Optional[str]) -> Cat

catalog_type = None
if provided_catalog_type and isinstance(provided_catalog_type, str):
catalog_type = CatalogType[provided_catalog_type.upper()]
catalog_type = CatalogType(provided_catalog_type.lower())
elif not provided_catalog_type:
catalog_type = infer_catalog_type(name, conf)

Expand Down
4 changes: 4 additions & 0 deletions tests/catalog/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ def given_catalog_has_a_table(
)


def test_load_catalog_in_memory() -> None:
assert load_catalog("catalog", type="in-memory")


def test_load_catalog_impl_not_full_path() -> None:
with pytest.raises(ValueError) as exc_info:
load_catalog("catalog", **{"py-catalog-impl": "CustomCatalog"})
Expand Down