Skip to content

Commit

Permalink
Update unittest for set_extrn_mdl_params.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielabdi-noaa committed May 3, 2022
1 parent e75a580 commit e58bb7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/WE2E/run_WE2E_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ exist or is not a directory:
#
#-----------------------------------------------------------------------
#
$ushdir/generate_FV3LAM_wflow.sh || \
$ushdir/generate_FV3LAM_wflow.py || \
print_err_msg_exit "\
Could not generate an experiment for the test specified by test_name:
test_name = \"${test_name}\""
Expand Down
13 changes: 3 additions & 10 deletions ush/set_extrn_mdl_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,9 @@ def set_extrn_mdl_params():
class Testing(unittest.TestCase):
def test_extrn_mdl_params(self):
set_extrn_mdl_params()
EXTRN_MDL_SYSBASEDIR_ICS = get_env_var("EXTRN_MDL_SYSBASEDIR_ICS")
COMIN = get_env_var("COMIN")
self.assertEqual(EXTRN_MDL_SYSBASEDIR_ICS,COMIN)
EXTRN_MDL_LBCS_OFFSET_HRS = get_env_var("EXTRN_MDL_LBCS_OFFSET_HRS")
self.assertEqual(EXTRN_MDL_LBCS_OFFSET_HRS,3)

def setUp(self):
set_env_var("MACHINE","HERA")
set_env_var("RUN_ENVIR","nco")
set_env_var("EXTRN_MDL_NAME_ICS","FV3GFS")
set_env_var("EXTRN_MDL_NAME_LBCS","FV3GFS")
set_env_var("EXTRN_MDL_SYSBASEDIR_ICS",None)
set_env_var("EXTRN_MDL_SYSBASEDIR_LBCS",None)
set_env_var("EXTRN_MDL_NAME_LBCS","RAP")
set_env_var("EXTRN_MDL_LBCS_OFFSET_HRS",None)
set_env_var("COMIN","/base/path/of/directory/containing/gfs/input/files")

0 comments on commit e58bb7a

Please sign in to comment.