Skip to content

Commit

Permalink
add wrf nml test
Browse files Browse the repository at this point in the history
  • Loading branch information
letmaik committed Feb 12, 2022
1 parent 2bc48c3 commit 01b872e
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/core/test_namelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,34 @@ def test_wps_namelist_verify_invalid():
}
}
with pytest.raises(ValueError):
gis4wrf.core.verify_namelist(namelist, 'wps')
gis4wrf.core.verify_namelist(namelist, 'wps')


def test_wrf_namelist_verify_valid():
namelist = {
'time_control': {
'start_year': [2018, 2018],
'interval_seconds': 21600,
'input_from_file': [True, True],
'restart': False,
'restart_interval': 7200,
'io_form_history': 2
},
'domains': {
'time_step': 40,
'max_dom': 2
},
'physics': {
'physics_suite': 'CONUS'
}
}
gis4wrf.core.verify_namelist(namelist, 'wrf')

def test_wrf_namelist_verify_invalid():
namelist = {
'time_control': {
'start_year': ['2018']
}
}
with pytest.raises(TypeError):
gis4wrf.core.verify_namelist(namelist, 'wrf')

0 comments on commit 01b872e

Please sign in to comment.