diff --git a/CIME/test_scheduler.py b/CIME/test_scheduler.py index 99ed08f614c..6b62e2eec9d 100644 --- a/CIME/test_scheduler.py +++ b/CIME/test_scheduler.py @@ -364,12 +364,18 @@ def __init__( elif skip_tests_with_existing_baselines: tests_to_skip.append(test_name) expect( - allow_baseline_overwrite or len(existing_baselines) == 0 or skip_tests_with_existing_baselines, + allow_baseline_overwrite + or len(existing_baselines) == 0 + or skip_tests_with_existing_baselines, "Baseline directories already exists {}\n" - "Use -o or --skip-tests-with-existing-baselines to avoid this error".format(existing_baselines), + "Use -o or --skip-tests-with-existing-baselines to avoid this error".format( + existing_baselines + ), ) if skip_tests_with_existing_baselines: - test_names = [test for test in test_names if test not in tests_to_skip] + test_names = [ + test for test in test_names if test not in tests_to_skip + ] if self._config.sort_tests: _order_tests_by_runtime(test_names, self._baseline_root) diff --git a/CIME/tests/base.py b/CIME/tests/base.py index bd2c713b1bd..cf7cf993caf 100644 --- a/CIME/tests/base.py +++ b/CIME/tests/base.py @@ -264,7 +264,10 @@ def _create_test( if expect_cases_made: self.assertTrue(len(cases) > 0, "create_test made no cases") else: - self.assertTrue(len(cases) == 0, "create_test unexpectedly made {} case(s)".format(len(cases))) + self.assertTrue( + len(cases) == 0, + "create_test unexpectedly made {} case(s)".format(len(cases)), + ) return cases[0] if len(cases) == 1 else cases diff --git a/CIME/tests/test_sys_cime_case.py b/CIME/tests/test_sys_cime_case.py index eb2ca4c6773..27cec9a36c5 100644 --- a/CIME/tests/test_sys_cime_case.py +++ b/CIME/tests/test_sys_cime_case.py @@ -762,7 +762,8 @@ def test_skip_run_with_existing_baseline(self): ) self._testroot = os.path.join(orig_testroot, "case1") casedir_1 = self._create_test( - ["--output-root", "case1", "--skip-tests-with-existing-baselines"] + create_test_extra_args, + ["--output-root", "case1", "--skip-tests-with-existing-baselines"] + + create_test_extra_args, test_id=self._baseline_name, expect_cases_made=False, )