Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbieker committed Nov 15, 2023
1 parent 61c6162 commit 6dd0ce5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,13 @@ def test_combine_uncombine_from_single_dataset(configuration_filename):
multiple_datasets = uncombine_from_single_dataset(dataset)
for key in multiple_datasets.keys():
for i in range(len(multiple_datasets[key].time_utc)):
assert datasets[key][i].equals(multiple_datasets[key].isel(time_utc=i))
# Assert that coordinates are the same
assert (
datasets[key][i].coords.keys()
== multiple_datasets[key].isel(time_utc=i).coords.keys()
)
# Assert that data for each of the coords is the same
for coord_key in datasets[key][i].coords.keys():
assert datasets[key][i][coord_key].equals(
multiple_datasets[key].isel(time_utc=i)[coord_key]
)

0 comments on commit 6dd0ce5

Please sign in to comment.