CIME.tests package
Submodules
CIME.tests.base module
CIME.tests.case_fake module
This module contains a fake implementation of the Case class that can be used for testing the tests.
- class CIME.tests.case_fake.CaseFake(case_root, create_case_root=True)[source]
Bases:
object
- copy(newcasename, newcaseroot)[source]
Create and return a copy of self, but with CASE and CASEBASEID set to newcasename, CASEROOT set to newcaseroot, and RUNDIR set appropriately.
- Args:
newcasename (str): new value for CASE newcaseroot (str): new value for CASEROOT
- create_clone(newcase, keepexe=False, mach_dir=None, project=None, cime_output_root=None, exeroot=None, rundir=None)[source]
Create a clone of the current case. Also creates the CASEROOT directory for the clone case (given by newcase).
- Args:
- newcase (str): full path to the new case. This directory should not
already exist; it will be created
keepexe (bool, optional): Ignored mach_dir (str, optional): Ignored project (str, optional): Ignored cime_output_root (str, optional): New CIME_OUTPUT_ROOT for the clone exeroot (str, optional): New EXEROOT for the clone rundir (str, optional): New RUNDIR for the clone
Returns the clone case object
- get_value(item)[source]
Get the value of the given item
Returns None if item isn’t set for this case
- Args:
item (str): variable of interest
- set_exeroot()[source]
Assumes CASEROOT is already set; sets an appropriate EXEROOT (nested inside CASEROOT)
CIME.tests.custom_assertions_test_status module
CIME.tests.scripts_regression_tests module
CIME.tests.test_sys_bless_tests_results module
CIME.tests.test_sys_build_system module
CIME.tests.test_sys_cime_case module
CIME.tests.test_sys_cime_performance module
CIME.tests.test_sys_create_newcase module
CIME.tests.test_sys_full_system module
CIME.tests.test_sys_grid_generation module
CIME.tests.test_sys_jenkins_generic_job module
CIME.tests.test_sys_manage_and_query module
CIME.tests.test_sys_query_config module
CIME.tests.test_sys_run_restart module
CIME.tests.test_sys_save_timings module
CIME.tests.test_sys_single_submit module
CIME.tests.test_sys_test_scheduler module
CIME.tests.test_sys_unittest module
CIME.tests.test_sys_user_concurrent_mods module
CIME.tests.test_sys_wait_for_tests module
CIME.tests.test_unit_aprun module
CIME.tests.test_unit_baselines_performance module
CIME.tests.test_unit_bless_test_results module
CIME.tests.test_unit_case module
CIME.tests.test_unit_case_fake module
This module contains unit tests of CaseFake
CIME.tests.test_unit_case_run module
CIME.tests.test_unit_case_setup module
CIME.tests.test_unit_compare_test_results module
CIME.tests.test_unit_compare_two module
CIME.tests.test_unit_config module
CIME.tests.test_unit_cs_status module
CIME.tests.test_unit_custom_assertions_test_status module
CIME.tests.test_unit_doctest module
CIME.tests.test_unit_expected_fails_file module
CIME.tests.test_unit_grids module
CIME.tests.test_unit_hist_utils module
CIME.tests.test_unit_locked_files module
CIME.tests.test_unit_nmlgen module
CIME.tests.test_unit_paramgen module
This module tests some functionality of CIME.ParamGen.paramgen’s ParamGen class
- class CIME.tests.test_unit_paramgen.DummyCase[source]
Bases:
object
A dummy Case class that mimics CIME class objects’ get_value method.
- class CIME.tests.test_unit_paramgen.TestParamGen(methodName='runTest')[source]
Bases:
TestCase
Tests some basic functionality of the CIME.ParamGen.paramgen’s ParamGen class
- test_match()[source]
Tests the default behavior of returning the last match and the optional behavior of returning the first match.
- test_outer_guards()[source]
Tests the reduce method on data with outer guards enclosing parameter definitions.
- class CIME.tests.test_unit_paramgen.TestParamGenXmlConstructor(methodName='runTest')[source]
Bases:
TestCase
A unit test class for testing ParamGen’s xml constructor.
- test_duplicate_entry_error()[source]
Test to make sure duplicate ids raise the correct error when the “no_duplicates” flag is True.
CIME.tests.test_unit_system_tests module
CIME.tests.test_unit_test_status module
CIME.tests.test_unit_two_link_to_case2_output module
CIME.tests.test_unit_user_mod_support module
CIME.tests.test_unit_user_nl_utils module
- class CIME.tests.test_unit_user_nl_utils.TestUserNLCopier(methodName='runTest')[source]
Bases:
TestCase
- assertFileContentsEqual(expected, filepath, msg=None)[source]
Asserts that the contents of the file given by ‘filepath’ are equal to the string given by ‘expected’. ‘msg’ gives an optional message to be printed if the assertion fails.
- write_user_nl_file(component, contents, suffix='')[source]
Write contents to a user_nl file in the case directory. Returns the basename (i.e., not the full path) of the file that is created.
For a component foo, with the default suffix of ‘’, the file name will be user_nl_foo
If the suffix is ‘_0001’, the file name will be user_nl_foo_0001