Kill the surviving mutants of the scoring and ranking

This commit is contained in:
2026-11-16 02:50:37 +01:00
parent 9d9c5a3352
commit 727ed70ecb
5 changed files with 56 additions and 5 deletions
+7
View File
@@ -227,6 +227,13 @@ class StatedScoring(unittest.TestCase):
assert not isinstance(scoring, Failure), scoring
self.assertEqual((scoring.bar, list(scoring.goals)), (1.5, ["1", "2", "2.1"]))
def test_weighs_code_health_by_the_history_and_the_floor_it_is_given(self):
for floor, under in ((DEFAULT_FLOOR, True), (decimal.Decimal("6.0"), False)):
with self.subTest(floor=floor):
scoring = stores.StatedScoring(Scoring("V", 1), MemoryStore("## Goals\n\n1. **Achieve:** A.\n"), MemoryStore(), MemoryStore(SCORED.format(overall="6.99")), floor).read()
assert not isinstance(scoring, Failure), scoring
self.assertEqual(scoring.weights["code health"] > scoring.weights["1"] * 2, under)
def test_a_goals_file_that_is_empty_or_cannot_be_read_fails(self):
for goals, reason in ((MemoryStore(), "the record in memory: missing or empty"), (MemoryStore(fails="Jira answered 403"), "Jira answered 403")):
with self.subTest(reason=reason):