当前位置: 首页>>代码示例>>Python>>正文


Python system_tests_common.SystemTestsCommon类代码示例

本文整理汇总了Python中CIME.SystemTests.system_tests_common.SystemTestsCommon的典型用法代码示例。如果您正苦于以下问题:Python SystemTestsCommon类的具体用法?Python SystemTestsCommon怎么用?Python SystemTestsCommon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SystemTestsCommon类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, case):
        """
        initialize an object interface to file env_test.xml in the case directory
        """
        SystemTestsCommon.__init__(self, case, expected=["TEST"])

        self._pio_types = self._case.get_env("run").get_valid_values("PIO_TYPENAME")
        self._stop_n = self._case.get_value("STOP_N")
开发者ID:mnlevy1981,项目名称:cime,代码行数:8,代码来源:erio.py

示例2: __init__

    def __init__(self,
                 case,
                 separate_builds,
                 run_two_suffix = 'test',
                 run_one_description = '',
                 run_two_description = ''):
        """
        Initialize a SystemTestsCompareTwo object. Individual test cases that
        inherit from SystemTestsCompareTwo MUST call this __init__ method.

        Args:
            case: case object passsed to __init__ method of individual
                test. This is the main case associated with the test.
            separate_builds (bool): Whether separate builds are needed for the
                two cases. If False, case2 uses the case1 executable.
            run_two_suffix (str, optional): Suffix appended to the case name for
                the second run. Defaults to 'test'. This can be anything other
                than 'base'.
            run_one_description (str, optional): Description printed to log file
                when starting the first run. Defaults to ''.
            run_two_description (str, optional): Description printed to log file
                when starting the second run. Defaults to ''.
        """
        SystemTestsCommon.__init__(self, case)

        self._separate_builds = separate_builds

        # run_one_suffix is just used as the suffix for the netcdf files
        # produced by the first case; we may eventually remove this, but for now
        # it is needed by the various component_*.sh scripts. run_two_suffix is
        # also used as the suffix for netcdf files, but more importantly is used
        # to create the case name for the clone case.
        #
        # NOTE(wjs, 2016-08-03) It is currently CRITICAL for run_one_suffix to
        # be 'base', because this is assumed for baseline comparison and
        # generation. Once that assumption is relaxed, then run_one_suffix can
        # be set in the call to the constructor just like run_two_suffix
        # currently is. Or, if these tools are rewritten to work without any
        # suffix, then run_one_suffix can be removed entirely.
        self._run_one_suffix = 'base'
        self._run_two_suffix = run_two_suffix.rstrip()
        expect(self._run_two_suffix != self._run_one_suffix,
               "ERROR: Must have different suffixes for run one and run two")

        self._run_one_description = run_one_description
        self._run_two_description = run_two_description

        # Save case for first run so we can return to it if we switch self._case
        # to point to self._case2
        self._case1 = self._case
        self._caseroot1 = self._get_caseroot()

        self._caseroot2 = self._get_caseroot2()
        # Initialize self._case2; it will get set to its true value in
        # _setup_cases_if_not_yet_done
        self._case2 = None

        self._setup_cases_if_not_yet_done()
开发者ID:cacraigucar,项目名称:cime-cacraig,代码行数:58,代码来源:system_tests_compare_two.py

示例3: __init__

    def __init__(self, case):
        """
        initialize an object interface to the PGN test
        """

        #perturbation values and number of perturbation strings should be same
        expect(len(prt)== len(prtstr),"Number of perturbation values ("+str(len(prt))+") are NOT " 
               "equal to number of perturbation strings("+ str(len(prtstr))+")")
        SystemTestsCommon.__init__(self, case)
开发者ID:srinathv,项目名称:cime,代码行数:9,代码来源:pgn.py

示例4: __init__

    def __init__(self, case):
        """
        initialize an object interface to the MVK test
        """
        SystemTestsCommon.__init__(self, case)

        if self._case.get_value("RESUBMIT") == 0 \
                and self._case.get_value("GENERATE_BASELINE") is False:
            self._case.set_value("COMPARE_BASELINE", True)
        else:
            self._case.set_value("COMPARE_BASELINE", False)
开发者ID:bertinia,项目名称:cime,代码行数:11,代码来源:mvk.py

示例5: run

    def run(self):
        self._case.set_value("CONTINUE_RUN",False)
        self._case.set_value("REST_OPTION","none")
        self._case.set_value("HIST_OPTION","$STOP_OPTION")
        self._case.set_value("HIST_N","$STOP_N")
        stop_n = self._case.get_value("STOP_N")
        stop_option = self._case.get_value("STOP_OPTION")

        self._case.flush()
        logger.info("doing an %d %s initial test, no restarts written" % (stop_n, stop_option))
        return SystemTestsCommon._run(self)
开发者ID:quantheory,项目名称:cime,代码行数:11,代码来源:sms.py

示例6: _ers_first_phase

    def _ers_first_phase(self):
        stop_n      = self._case.get_value("STOP_N")
        stop_option = self._case.get_value("STOP_OPTION")
        expect(stop_n > 0, "Bad STOP_N: %d" % stop_n)

        # Move to config_tests.xml once that's ready
        rest_n = stop_n/2 + 1
        self._case.set_value("REST_N", rest_n)
        self._case.set_value("REST_OPTION", stop_option)
        self._case.set_value("HIST_N", stop_n)
        self._case.set_value("HIST_OPTION", stop_option)
        self._case.set_value("CONTINUE_RUN", False)
        self._case.flush()

        expect(stop_n > 2, "ERROR: stop_n value %d too short"%stop_n)
        logger.info("doing an %s %s initial test with restart file at %s %s"
                    %(str(stop_n), stop_option, str(rest_n), stop_option))
        return SystemTestsCommon.run(self)
开发者ID:quantheory,项目名称:cime,代码行数:18,代码来源:ers.py

示例7: _ers_second_phase

    def _ers_second_phase(self):
        stop_n      = self._case.get_value("STOP_N")
        stop_option = self._case.get_value("STOP_OPTION")

        rest_n = stop_n/2 + 1
        stop_new = stop_n - rest_n
        expect(stop_new > 0, "ERROR: stop_n value %d too short %d %d"%(stop_new,stop_n,rest_n))

        self._case.set_value("STOP_N", stop_new)
        self._case.set_value("CONTINUE_RUN", True)
        self._case.set_value("REST_OPTION","never")
        self._case.flush()
        logger.info("doing an %s %s restart test"
                    %(str(stop_n), stop_option))
        success = SystemTestsCommon._run(self, "rest")

        # Compare restart file
        if success:
            return self._component_compare_test("base", "rest")
        else:
            return False
开发者ID:quantheory,项目名称:cime,代码行数:21,代码来源:ers.py

示例8: __init__

 def __init__(self, case):
     """
     initialize an object interface to the TSC test
     """
     SystemTestsCommon.__init__(self, case)
开发者ID:jtruesdal,项目名称:cime,代码行数:5,代码来源:tsc.py

示例9: __init__

 def __init__(self, case):
     """
     initialize an object interface to the ERI system test
     """
     SystemTestsCommon.__init__(self, case)
     self._testname = "ERI"
开发者ID:ekluzek,项目名称:cime,代码行数:6,代码来源:eri.py

示例10: __init__

 def __init__(self, case):
     """
     initialize a test object
     """
     SystemTestsCommon.__init__(self, case)
开发者ID:ekluzek,项目名称:cime,代码行数:5,代码来源:erp.py

示例11: __init__

 def __init__(self, case):
     """
     initialize an object interface to the SMS system test
     """
     SystemTestsCommon.__init__(self, case)
     case.load_env()
开发者ID:fischer-ncar,项目名称:cime,代码行数:6,代码来源:homme.py

示例12: __init__

 def __init__(self, case):
     """
     initialize an object interface to file env_test.xml in the case directory
     """
     SystemTestsCommon.__init__(self, case, expected=["TEST"])
开发者ID:cacraigucar,项目名称:cime-cacraig,代码行数:5,代码来源:seq.py

示例13: report

 def report(self):
     SystemTestsCommon.report(self)
开发者ID:quantheory,项目名称:cime,代码行数:2,代码来源:ers.py

示例14: __init__

 def __init__(self, case):
     """
     initialize an object interface to the NOC system test
     """
     #expectedrunvars = ["CONTINUE_RUN", "REST_OPTION", "HIST_OPTION", "HIST_N"]
     SystemTestsCommon.__init__(self, case)
开发者ID:cacraigucar,项目名称:cime-cacraig,代码行数:6,代码来源:noc.py


注:本文中的CIME.SystemTests.system_tests_common.SystemTestsCommon类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。