Skip to content

Commit

Permalink
+= tests - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Jul 29, 2024
1 parent a60aa9b commit 32d15d4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blue_geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization."

VERSION = "4.165.1"
VERSION = "4.166.1"

REPO_NAME = "blue-geo"

Expand Down
3 changes: 3 additions & 0 deletions blue_geo/catalog/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from blue_geo.catalog.classes import (
list_of_catalog_classes,
list_of_datacube_classes,
get_catalog,
get_catalog_class,
get_collections,
get_datacube,
get_datacube_class,
list_of_catalogs,
)
30 changes: 30 additions & 0 deletions blue_geo/tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
from blue_geo.catalog import (
list_of_catalog_classes,
list_of_datacube_classes,
get_catalog,
get_catalog_class,
get_datacube,
get_datacube_class,
get_collections,
list_of_catalogs,
)
from blue_geo.catalog.generic import GenericCatalog, GenericDatacube

Expand Down Expand Up @@ -45,6 +48,33 @@ def test_list_of_datacube_classes(
assert success


@pytest.mark.parametrize(
["catalog_name", "expected_catalog_class"],
[[catalog_name, catalog_class] for catalog_name, catalog_class in list_of_catalogs],
)
def test_get_catalog(
catalog_name: str,
expected_catalog_class: Type[GenericCatalog],
):
catalog = get_catalog(catalog_name)
assert isinstance(catalog, expected_catalog_class)


@pytest.mark.parametrize(
["catalog_name", "expected_catalog_class"],
[
[datacube_id, datacube_class]
for datacube_id, datacube_class in assets.datacubes.items()
],
)
def test_get_datacube_class(
catalog_name: str,
expected_catalog_class: Type[GenericDatacube],
):
catalog_class = get_catalog_class(catalog_name)
assert catalog_class == expected_catalog_class


@pytest.mark.parametrize(
["datacube_id", "expected_datacube_class"],
[
Expand Down

0 comments on commit 32d15d4

Please sign in to comment.