Skip to content

Commit

Permalink
Fixes append_testlog
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Aug 22, 2024
1 parent 1ff7be4 commit 6e0a12c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CIME/SystemTests/mvk.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from CIME import test_status
from CIME import utils
from CIME.status import append_testlog
from CIME.SystemTests.system_tests_common import SystemTestsCommon
from CIME.case.case_setup import case_setup
from CIME.XML.machines import Machines
Expand Down Expand Up @@ -303,7 +304,7 @@ def update_testlog(self, test_name, case_name, evv_out_dir):
)
)

utils.append_testlog(comments, self._orig_caseroot)
append_testlog(comments, self._orig_caseroot)

def process_evv_output(self, evv_out_dir):
with open(os.path.join(evv_out_dir, "index.json")) as evv_f:
Expand Down
12 changes: 6 additions & 6 deletions CIME/tests/test_unit_system_tests_mvk.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def evv_test_config(case, config):

assert lines == ["var2 = value2\n"]

@mock.patch("CIME.SystemTests.mvk.utils.append_testlog")
@mock.patch("CIME.SystemTests.mvk.status.append_testlog")
@mock.patch("CIME.SystemTests.mvk.Machines")
def test_update_testlog(self, machines, append_testlog):
with contextlib.ExitStack() as stack:
Expand Down Expand Up @@ -246,7 +246,7 @@ def test_update_testlog(self, machines, append_testlog):
)

@mock.patch("CIME.SystemTests.mvk.utils.get_urlroot")
@mock.patch("CIME.SystemTests.mvk.utils.append_testlog")
@mock.patch("CIME.SystemTests.mvk.status.append_testlog")
@mock.patch("CIME.SystemTests.mvk.Machines")
def test_update_testlog_urlroot_None(self, machines, append_testlog, get_urlroot):
with contextlib.ExitStack() as stack:
Expand Down Expand Up @@ -287,7 +287,7 @@ def test_update_testlog_urlroot_None(self, machines, append_testlog, get_urlroot
)

@mock.patch("CIME.SystemTests.mvk.utils.get_htmlroot")
@mock.patch("CIME.SystemTests.mvk.utils.append_testlog")
@mock.patch("CIME.SystemTests.mvk.status.append_testlog")
@mock.patch("CIME.SystemTests.mvk.Machines")
def test_update_testlog_htmlroot(self, machines, append_testlog, get_htmlroot):
with contextlib.ExitStack() as stack:
Expand Down Expand Up @@ -462,7 +462,7 @@ def test_build_phase(self, build_indv, case_setup):
case_setup.assert_any_call(case, test_mode=False, reset=True)

@mock.patch("CIME.SystemTests.mvk.SystemTestsCommon._generate_baseline")
@mock.patch("CIME.SystemTests.mvk.utils.append_testlog")
@mock.patch("CIME.SystemTests.mvk.status.append_testlog")
@mock.patch("CIME.SystemTests.mvk.evv")
def test__generate_baseline(self, evv, append_testlog, _generate_baseline):
with contextlib.ExitStack() as stack:
Expand Down Expand Up @@ -530,7 +530,7 @@ def test__generate_baseline(self, evv, append_testlog, _generate_baseline):

assert files == ["test1.nc", "test2.nc"]

@mock.patch("CIME.SystemTests.mvk.utils.append_testlog")
@mock.patch("CIME.SystemTests.mvk.status.append_testlog")
@mock.patch("CIME.SystemTests.mvk.evv")
def test__compare_baseline_resubmit(self, evv, append_testlog):
with contextlib.ExitStack() as stack:
Expand Down Expand Up @@ -562,7 +562,7 @@ def test__compare_baseline_resubmit(self, evv, append_testlog):

_test_status.set_status.assert_any_call("BASELINE", "PASS")

@mock.patch("CIME.SystemTests.mvk.utils.append_testlog")
@mock.patch("CIME.SystemTests.mvk.status.append_testlog")
@mock.patch("CIME.SystemTests.mvk.evv")
def test__compare_baseline(self, evv, append_testlog):
with contextlib.ExitStack() as stack:
Expand Down

0 comments on commit 6e0a12c

Please sign in to comment.