Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-dc-tools-tests' into fix-dc-…
Browse files Browse the repository at this point in the history
…tools-tests
  • Loading branch information
SpacemanPaul committed Jul 23, 2024
2 parents f7a063b + 2885c98 commit e74ff8e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions apps/dc_tools/tests/test_stac_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,19 @@ def test_landsat_stac_transform(landsat_stac, landsat_odc):

def filter_out_url_base_diffs(changes_in):
for path, old, new in changes_in:
if len(path) == 3 and path[0] == 'measurements' and path[2] == 'path':
if len(path) == 3 and path[0] == "measurements" and path[2] == "path":
# band path mismatch
if old.split('/')[-1] == new.split('/')[-1]:
if old.split("/")[-1] == new.split("/")[-1]:
# match apart from url base: ignore:
continue
yield path, old, new


def test_sentinel_stac_transform(sentinel_stac_old, sentinel_odc):
transformed_stac_doc = stac_transform(sentinel_stac_old)
doc_changes = list(filter_out_url_base_diffs(get_doc_changes(transformed_stac_doc, sentinel_odc)))
doc_changes = list(
filter_out_url_base_diffs(get_doc_changes(transformed_stac_doc, sentinel_odc))
)
assert len(doc_changes) == 1


Expand Down

0 comments on commit e74ff8e

Please sign in to comment.