Skip to content

Commit

Permalink
Test coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Feb 29, 2024
1 parent 63fa402 commit ba13ab9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integration_tests/index/test_memory_index.py
Expand Up @@ -443,6 +443,9 @@ def test_mem_ds_archive_purge(mem_eo3_data: tuple):
assert ls8_id not in active_ids
assert wo_id in active_ids
assert archived_ids == []
# And archive wo_ds again
dc.index.datasets.archive((wo_id,))
assert list(dc.index.datasets.get_all_dataset_ids(False)) == []


def test_mem_ds_search_and_count(mem_eo3_data: tuple):
Expand Down
12 changes: 12 additions & 0 deletions integration_tests/index/test_search_eo3.py
Expand Up @@ -500,6 +500,18 @@ def test_search_returning_rows_eo3(index,
assert 1.31 < results[0].cloud_shadow < 1.32
assert 34.58 < results[0].sun_azimuth < 34.59

results = list(index.datasets.search_returning(
[],
custom_offsets={
"cloud_shadow": ["properties", "fmask:cloud_shadow"],
"sun_azimuth": ["properties", "eo:sun_azimuth"]
},
platform='landsat-8',
instrument='OLI_TIRS',
))
assert len(results) == 1
assert 1.31 < results[0].cloud_shadow < 1.32

index.datasets.archive_location(dataset.id, uri) # Test of deprecated method
index.datasets.remove_location(dataset.id, uri) # Test of deprecated method

Expand Down

0 comments on commit ba13ab9

Please sign in to comment.