Kill the surviving mutants of the finish moves: the fake's status and refusal, an unreadable epic, and one more split item per finish

This commit is contained in:
2026-11-19 01:20:30 +01:00
parent e946d71a5e
commit 4cc39b8b20
4 changed files with 38 additions and 8 deletions
+14
View File
@@ -51,5 +51,19 @@ class Ranking(unittest.TestCase):
self.assertEqual(store.rank(str(child), "ZZZ-1"), Failure(f"ZZZ-1 is not one of the child issues of the epic ABC-12, so {child} is not ranked"))
class Finishing(unittest.TestCase):
def test_finishes_an_issue_to_the_status_done(self) -> None:
store = MemoryEpic("ABC-12")
key = store.file("ABC-12", "Count the runs.", "", ())
self.assertIsNone(store.finish(str(key)))
self.assertEqual([(issue.status, issue.done) for issue in store.issues], [("Done", True)])
def test_refuses_to_finish_an_issue_outside_the_epic_saying_so(self) -> None:
self.assertEqual(MemoryEpic("ABC-12").finish("ZZZ-1"), Failure("ZZZ-1 is not one of the child issues of the epic ABC-12, so it cannot be finished"))
def test_fails_to_finish_with_the_reason_given(self) -> None:
self.assertEqual(MemoryEpic("ABC-12", fails="Jira is down").finish("ABC-100"), Failure("Jira is down"))
if __name__ == "__main__":
unittest.main()