Skip to content

Commit

Permalink
Fixes black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Feb 22, 2024
1 parent 9d7f460 commit 90fa227
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CIME/tests/test_unit_case_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
from CIME.case.case_run import TERMINATION_TEXT
from CIME.case.case_run import _post_run_check


def _case_post_run_check():
case = mock.MagicMock()

# RUNDIR, COMP_INTERFACE, COMP_CPL, COMP_ATM, COMP_OCN, MULTI_DRIVER
case.get_value.side_effect = (
"/tmp/run", "mct",
"cpl", "satm", "socn",
False
)
case.get_value.side_effect = ("/tmp/run", "mct", "cpl", "satm", "socn", False)

# COMP_CLASSES
case.get_values.return_value = ("CPL", "ATM", "OCN")

return case


class TestCaseSubmit(unittest.TestCase):
@mock.patch("os.stat")
@mock.patch("os.path.isfile")
Expand All @@ -45,5 +43,8 @@ def test_post_run_check_no_termination(self, isfile, stat):
case = _case_post_run_check()

with self.assertRaises(CIMEError):
with mock.patch("builtins.open", mock.mock_open(read_data="I DONT HAVE A TERMINATION MESSAGE")) as mock_file:
with mock.patch(
"builtins.open",
mock.mock_open(read_data="I DONT HAVE A TERMINATION MESSAGE"),
) as mock_file:
_post_run_check(case, "1234")

0 comments on commit 90fa227

Please sign in to comment.