Skip to content

Commit aa91371

Browse files
VictorVerhaertsoxofaan
authored andcommitted
removed caplog.clear and removed add_dim(bands) case
1 parent f8e1371 commit aa91371

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

openeo/rest/datacube.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,6 @@ def load_stac(
444444
# TODO: also apply spatial/temporal filters to metadata?
445445

446446
if isinstance(bands, list):
447-
if not metadata.has_band_dimension():
448-
metadata = metadata.add_dimension(
449-
name="bands",
450-
type="bands",
451-
label=None,
452-
)
453447
unknown_bands = [b for b in bands if not metadata.band_dimension.contains_band(b)]
454448
if len(unknown_bands) == 0:
455449
metadata = metadata.filter_bands(band_names=bands)

tests/rest/test_connection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,7 +2988,6 @@ def test_load_stac_band_filtering(self, con120, tmp_path, caplog, bands, expecte
29882988
assert caplog.text == ""
29892989
else:
29902990
assert expected_warning in caplog.text
2991-
caplog.clear()
29922991

29932992
def test_load_stac_band_filtering_no_requested_bands(self, con120, tmp_path):
29942993
stac_path = tmp_path / "stac.json"
@@ -3017,7 +3016,6 @@ def test_load_stac_band_filtering_no_metadata(self, con120, tmp_path, caplog):
30173016
"The specified bands ['B01', 'B02'] are not a subset of the bands [] found in the STAC metadata (unknown bands: ['B01', 'B02']). Using specified bands as is."
30183017
in caplog.text
30193018
)
3020-
caplog.clear()
30213019

30223020

30233021
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)