fremor.tests.test_cmor_run_subtool module
tests for fremor.cmor_run_subtool
- fremor.tests.test_cmor_run_subtool.test_cmip6_exp_with_cmip7_table_raises(tmp_path)
ValueError with clear message when CMIP6 experiment uses a CMIP7-format table.
- fremor.tests.test_cmor_run_subtool.test_cmip7_exp_with_cmip6_table_raises(tmp_path)
ValueError with clear message when CMIP7 experiment uses a CMIP6-format table.
- fremor.tests.test_cmor_run_subtool.test_cmor_run_subtool_raise_value_error()
test that ValueError raised when required args are absent
- fremor.tests.test_cmor_run_subtool.test_exp_config_cleanup()
Restores the CMIP6 experiment config to its pristine state after tests that mutate it in-place (e.g. grid / calendar updates).
The config is no longer tracked by git — it is materialized by a session-scoped conftest fixture — so we rewrite it from the canonical fixture data instead of running
git restore.
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case1(capfd)
fre cmor run, test-use case
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case1_output_compare_data(capfd)
I/O data-only comparison of test case1
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case1_output_compare_metadata(capfd)
I/O metadata-only comparison of test case1
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case2(capfd)
fre cmor run, test-use case2: filename variable != file variable should error. The sosV2 file has variable “sos” inside, but the varlist expects “sosV2” as the modeler variable name (in both the filename and inside the file). This mismatch should cause cmor_run_subtool to return a non-zero status.
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case3(capfd)
fre cmor run, test-use case3: mapped variable sea_sfc_salinity → sos
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case3_output_compare_data(capfd)
I/O data-only comparison of test case3 (mapped variable)
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_case3_output_compare_metadata(capfd)
I/O metadata-only comparison of test case3 (mapped variable)
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_empty_varlist()
fre cmor run, exception, variable list is empty
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_missing_mip_era(tmp_path)
KeyError when the exp config JSON has no mip_era entry.
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_no_exp_config()
fre cmor run, exception, json_exp_config DNE
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_opt_var_name_not_in_table()
fre cmor run, exception,
- fremor.tests.test_cmor_run_subtool.test_fre_cmor_run_subtool_unsupported_mip_era(tmp_path)
ValueError when mip_era is present but not CMIP6 or CMIP7.
- fremor.tests.test_cmor_run_subtool.test_setup_cmor_cmip_table_repo()
setup routine, make sure the recursively cloned tables exist
- fremor.tests.test_cmor_run_subtool.test_setup_fre_cmor_run_subtool(capfd)
The routine generates a netCDF file from an ascii (cdl) file. It also checks for a ncgen output file from prev pytest runs, removes it if it’s present, and ensures the new file is created without error.
- fremor.tests.test_cmor_run_subtool.test_setup_fre_cmor_run_subtool_case2(capfd)
make a copy of the input file to the slightly different name. checks for outputfile from prev pytest runs, removes it if it’s present. this routine also checks to make sure the desired input file is present
- fremor.tests.test_cmor_run_subtool.test_setup_fre_cmor_run_subtool_case3(capfd)
Generate the sea_sfc_salinity NetCDF file from CDL and clean up previous output.