Skip to content

Commit 65920ef

Browse files
committed
Issue #179/#211/#213 add tests for DriverVectorCube.get_dimension_names
1 parent f095480 commit 65920ef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

openeo_driver/datacube.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def get_dimension_names(self) -> List[str]:
546546
if self._cube is None:
547547
return [self.DIM_GEOMETRIES]
548548
else:
549-
return list(self._cube.dims)
549+
return list(str(d) for d in self._cube.dims)
550550

551551
def get_bounding_box(self) -> Tuple[float, float, float, float]:
552552
# TODO: cache bounding box?

tests/test_vectorcube.py

+1
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ def test_from_geodataframe_default(self, gdf):
439439
def test_from_geodataframe_columns_for_cube(self, gdf, columns_for_cube, expected_cube):
440440
vc = DriverVectorCube.from_geodataframe(gdf, columns_for_cube=columns_for_cube)
441441

442+
assert vc.get_dimension_names() == list(expected_cube["dims"])
442443
assert vc.to_internal_json() == {
443444
"geometries": DictSubSet(
444445
{

0 commit comments

Comments
 (0)