Skip to content

Commit 7c107d8

Browse files
committed
Add test_list_datasets
1 parent 04ce890 commit 7c107d8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/datasets/test_remote.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,12 @@ def test_open_dataset(name):
3131
@pytest.mark.parametrize("name", remote.list_datasets())
3232
def test_dataset_keys(name):
3333
assert not name.endswith((".zarr", ".zip", ".nc")), "Dataset name should not have suffix"
34+
35+
36+
def test_list_datasets():
37+
tutorial_datasets = set(remote.list_datasets("tutorial"))
38+
testing_datasets = set(remote.list_datasets("testing"))
39+
all_datasets = set(remote.list_datasets("any"))
40+
assert tutorial_datasets.issubset(all_datasets)
41+
assert testing_datasets.issubset(all_datasets)
42+
assert tutorial_datasets | testing_datasets == all_datasets

0 commit comments

Comments
 (0)