CIME.tests.case_fake.CaseFake
- class CIME.tests.case_fake.CaseFake(case_root, create_case_root=True)[source]
Bases:
object
Methods
__init__
Initialize a new case object for the given case_root directory.
case_setup
Create and return a copy of self, but with CASE and CASEBASEID set to newcasename, CASEROOT set to newcaseroot, and RUNDIR set appropriately.
Create a clone of the current case.
flush
Get the value of the given item
load_env
Make directory given by RUNDIR
Assumes CASEROOT is already set; sets an appropriate EXEROOT (nested inside CASEROOT)
set_initial_test_values
Assumes CASEROOT is already set; sets an appropriate RUNDIR (nested inside CASEROOT)
Set the value of the given item to the given value
- 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)