Skip to content

Commit 01b872e

Browse files
committed
add wrf nml test
1 parent 2bc48c3 commit 01b872e

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

tests/core/test_namelist.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,34 @@ def test_wps_namelist_verify_invalid():
2727
}
2828
}
2929
with pytest.raises(ValueError):
30-
gis4wrf.core.verify_namelist(namelist, 'wps')
30+
gis4wrf.core.verify_namelist(namelist, 'wps')
31+
32+
33+
def test_wrf_namelist_verify_valid():
34+
namelist = {
35+
'time_control': {
36+
'start_year': [2018, 2018],
37+
'interval_seconds': 21600,
38+
'input_from_file': [True, True],
39+
'restart': False,
40+
'restart_interval': 7200,
41+
'io_form_history': 2
42+
},
43+
'domains': {
44+
'time_step': 40,
45+
'max_dom': 2
46+
},
47+
'physics': {
48+
'physics_suite': 'CONUS'
49+
}
50+
}
51+
gis4wrf.core.verify_namelist(namelist, 'wrf')
52+
53+
def test_wrf_namelist_verify_invalid():
54+
namelist = {
55+
'time_control': {
56+
'start_year': ['2018']
57+
}
58+
}
59+
with pytest.raises(TypeError):
60+
gis4wrf.core.verify_namelist(namelist, 'wrf')

0 commit comments

Comments
 (0)