Skip to content

Commit

Permalink
Fixes broken test with shallow git clone
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Feb 6, 2024
1 parent af3d330 commit fb5ab4e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CIME/tests/test_unit_bless_test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,13 +798,21 @@ def test_baseline_root_none(self, get_test_status_files, TestStatus, Case):

assert not success

@mock.patch("CIME.utils.get_current_branch")
@mock.patch("CIME.bless_test_results.bless_namelists")
@mock.patch("CIME.bless_test_results.Case")
@mock.patch("CIME.bless_test_results.TestStatus")
@mock.patch("CIME.bless_test_results.get_test_status_files")
def test_baseline_name_none(
self, get_test_status_files, TestStatus, Case, bless_namelists
self,
get_test_status_files,
TestStatus,
Case,
bless_namelists,
get_current_branch,
):
get_current_branch.return_value = "master"

bless_namelists.return_value = (True, "")

get_test_status_files.return_value = [
Expand All @@ -819,6 +827,7 @@ def test_baseline_name_none(
case = Case.return_value.__enter__.return_value
case.get_value.side_effect = [None, None]

breakpoint()
success = bless_test_results(
None,
"/tmp/baselines",
Expand Down

0 comments on commit fb5ab4e

Please sign in to comment.