Skip to content

Commit

Permalink
Remove 'Clone' from SystemTestsCompareTwo name
Browse files Browse the repository at this point in the history
It seems unnecessary to call out the implementation in the class name. I had
only added 'Clone' initially so it could live side-by-side with the old
implementation for a while.

Test suite: python -m unittest discover
Test baseline: N/A
Test namelist changes: N/A
Test status: N/A

Fixes: None

User interface changes?: No

Code review: None
  • Loading branch information
billsacks committed Aug 11, 2016
1 parent 15cbdea commit aa412ee
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
14 changes: 7 additions & 7 deletions utils/python/CIME/SystemTests/lii.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
(2) do a run with use_init_interp true (suffix init_interp_on)
"""

from CIME.SystemTests.system_tests_compare_two_clone import SystemTestsCompareTwoClone
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.XML.standard_module_setup import *
from CIME.SystemTests.test_utils.user_nl_utils import append_to_user_nl_files

logger = logging.getLogger(__name__)

class LII(SystemTestsCompareTwoClone):
class LII(SystemTestsCompareTwo):

def __init__(self, case):
SystemTestsCompareTwoClone.__init__(self, case,
separate_builds = False,
run_two_suffix = 'interp',
run_one_description = 'use_init_interp set to false',
run_two_description = 'use_init_interp set to true')
SystemTestsCompareTwo.__init__(self, case,
separate_builds = False,
run_two_suffix = 'interp',
run_one_description = 'use_init_interp set to false',
run_two_description = 'use_init_interp set to true')

def _common_setup(self):
self._case.set_value("CONTINUE_RUN",False)
Expand Down
10 changes: 5 additions & 5 deletions utils/python/CIME/SystemTests/rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
This test verifies that two identical runs give bit-for-bit results
"""

from CIME.SystemTests.system_tests_compare_two_clone import SystemTestsCompareTwoClone
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo

class REP(SystemTestsCompareTwoClone):
class REP(SystemTestsCompareTwo):

def __init__(self, case):
SystemTestsCompareTwoClone.__init__(self, case,
separate_builds = False,
run_two_suffix = 'rep2')
SystemTestsCompareTwo.__init__(self, case,
separate_builds = False,
run_two_suffix = 'rep2')

def _common_setup(self):
# TODO(wjs, 2016-07-27) Many of these settings are made for most tests -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
output.
In the __init__ method for your test, you MUST call
SystemTestsCompareTwoClone.__init__
SystemTestsCompareTwo.__init__
See the documentation of that method for details.
Classes that inherit from this are REQUIRED to implement the following methods:
Expand Down Expand Up @@ -31,7 +31,7 @@

logger = logging.getLogger(__name__)

class SystemTestsCompareTwoClone(SystemTestsCommon):
class SystemTestsCompareTwo(SystemTestsCommon):

def __init__(self,
case,
Expand All @@ -40,8 +40,8 @@ def __init__(self,
run_one_description = '',
run_two_description = ''):
"""
Initialize a SystemTestsCompareTwoClone object. Individual test cases that
inherit from SystemTestsCompareTwoClone MUST call this __init__ method.
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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

"""
This module contains unit tests of the core logic in SystemTestsCompareTwoClone.
This module contains unit tests of the core logic in SystemTestsCompareTwo.
"""

import unittest
Expand All @@ -10,7 +10,7 @@
import shutil
import tempfile

from CIME.SystemTests.system_tests_compare_two_clone import SystemTestsCompareTwoClone
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
import CIME.test_status as test_status
from CIME.SystemTests.tests.case_fake import CaseFake

Expand Down Expand Up @@ -61,7 +61,7 @@
# It logs what stubbed-out methods have been called in its log attribute; this
# is a list of Call objects (see above for their definition).

class SystemTestsCompareTwoFake(SystemTestsCompareTwoClone):
class SystemTestsCompareTwoFake(SystemTestsCompareTwo):
def __init__(self,
case1,
run_one_suffix = 'base',
Expand Down Expand Up @@ -95,7 +95,7 @@ def __init__(self,
# SystemTestsCompareTwo.__init__
assert(run_one_suffix == 'base')

SystemTestsCompareTwoClone.__init__(
SystemTestsCompareTwo.__init__(
self,
case1,
separate_builds = False,
Expand Down Expand Up @@ -173,8 +173,8 @@ def _component_compare_test(self, suffix1, suffix2):
# _component_compare_test. Then the test verification would include
# verification that TestStatus is set correctly for the COMPARE
# phase. But that seems more about testing _component_compare_test than
# testing SystemTestsCompareTwoClone itself, so I don't see much added
# value of that.
# testing SystemTestsCompareTwo itself, so I don't see much added value
# of that.

self.log.append(Call(METHOD_component_compare_test,
{'suffix1': suffix1, 'suffix2': suffix2}))
Expand All @@ -184,7 +184,7 @@ def _check_for_memleak(self):

# ------------------------------------------------------------------------
# Fake implementations of methods that are typically provided by
# SystemTestsCompareTwoClone
# SystemTestsCompareTwo
#
# Since we're overriding these, their functionality is untested here!
# (Though note that _link_to_case2_output is tested elsewhere.)
Expand Down Expand Up @@ -221,7 +221,7 @@ def _case_two_setup(self):
# Test class itself
# ========================================================================

class TestSystemTestsCompareTwoClone(unittest.TestCase):
class TestSystemTestsCompareTwo(unittest.TestCase):

def setUp(self):
# create a sandbox in which case directories can be created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@

"""
This module contains unit tests of the method
SystemTestsCompareTwoClone._link_to_case2_output
SystemTestsCompareTwo._link_to_case2_output
"""

import unittest
import os
import shutil
import tempfile
from CIME.SystemTests.system_tests_compare_two_clone import SystemTestsCompareTwoClone
from CIME.SystemTests.system_tests_compare_two import SystemTestsCompareTwo
from CIME.SystemTests.tests.case_fake import CaseFake

# ========================================================================
# Fake version of SystemTestsCompareTwo that overrides some functionality for
# the sake of unit testing
# ========================================================================

class SystemTestsCompareTwoFake(SystemTestsCompareTwoClone):
class SystemTestsCompareTwoFake(SystemTestsCompareTwo):
def __init__(self,
case1,
run_two_suffix = 'test'):

SystemTestsCompareTwoClone.__init__(
SystemTestsCompareTwo.__init__(
self,
case1,
separate_builds = False,
Expand Down

0 comments on commit aa412ee

Please sign in to comment.