Kill the mutants of do_epic/config.py that its tests missed
CI / tests (pull_request) Successful in 3m2s

This commit is contained in:
2026-11-18 12:41:51 +01:00
parent b5033abacc
commit aabbefaad5
2 changed files with 19 additions and 4 deletions
+15
View File
@@ -115,3 +115,18 @@ class ConfigTest(unittest.TestCase):
reason = self.failure()
for part in ("`jira-url` is", "`env-file` is missing", "`repoless-model` is"):
self.assertIn(part, reason)
self.assertIn("`env-file` is missing; `jira-url` is", reason, "joined by semicolons")
def test_names_the_models_on_the_ladder_where_the_model_is_off_it(self) -> None:
ladder = self.home / "ladder.json"
ladder.write_text('[{"model": "claude-sonnet-5-5", "effort": "low"}, {"model": "claude-opus-5-5", "effort": "low"}]', encoding="utf-8")
self.write(SETTINGS.replace("claude-opus-5-5", "claude-haiku-5-5"))
found = load(self.home, ladder)
assert isinstance(found, Failure), found
self.assertIn("not a model on the routing ladder: claude-opus-5-5, claude-sonnet-5-5.", found.reason)
def test_reads_the_rule_and_the_settings_as_utf8(self) -> None:
self.write(SETTINGS + 'language = "Svenska"\n', rule="Etiketten är repots namn.\n")
found = load(self.home)
assert isinstance(found, DoEpicConfig), found
self.assertEqual(found.repo_rule, "Etiketten är repots namn.\n")