Skip to content

Commit

Permalink
modified test_qpe.py to also test time
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfidan committed Mar 11, 2024
1 parent ae9de6b commit a7c33bc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests_ci/qpe/test_qpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ def test_qpe():
qpe_field = qpe.data

# Assertions
assert qpe_field.shape == (640, 710) or qpe_field.shape == (1,640, 710)
assert len(np.unique(qpe_field)) > 2
# Data
assert 'radar_estimated_rain_rate' in qpe.fields
assert qpe.fields['radar_estimated_rain_rate']['data'].shape == (1,640, 710)
assert len(np.unique(qpe.fields['radar_estimated_rain_rate']['data'])) > 2

# Time
assert qpe.time['units'] == 'seconds since 2022-09-28T05:05:00Z'
assert qpe.time['data'] == [0, 300]

shutil.rmtree(str(Path(cwd, model)))

0 comments on commit a7c33bc

Please sign in to comment.