Merge origin/main into item-441

This commit is contained in:
2026-11-19 01:37:46 +01:00
49 changed files with 2178 additions and 324 deletions
+12 -4
View File
@@ -131,21 +131,21 @@ class EpicStoreContract:
other = self.filed(store, store.epic_key, "Ship the later thing.")
closed = self.filed(store, store.epic_key, "Close the old thing.")
self.close(store, closed, "Done")
self.assertEqual([store.finish(key), store.finish(closed)], [None, None])
self.assertEqual([store.finish_issue(key), store.finish_issue(closed)], [None, None])
self.assertEqual({issue.key: issue.done for issue in self.issues(store)}, {key: True, other: False, closed: True})
def test_finishes_a_sub_task_of_a_child_issue_and_leaves_its_parent_open(self) -> None:
store = self.new_store()
child = self.filed(store, store.epic_key, "Count the runs.")
task = self.filed(store, child, "Count them in the api.")
self.assertIsNone(store.finish(task))
self.assertIsNone(store.finish_issue(task))
self.assertEqual({issue.key: issue.done for issue in self.issues(store)}, {child: False, task: True})
def test_refuses_to_finish_an_issue_outside_the_epic(self) -> None:
store = self.new_store()
child = self.filed(store, store.epic_key, "Count the runs.")
self.assertIsInstance(store.finish("ZZZ-1"), Failure)
self.assertIsInstance(store.finish("not a key"), Failure)
self.assertIsInstance(store.finish_issue("ZZZ-1"), Failure)
self.assertIsInstance(store.finish_issue("not a key"), Failure)
self.assertEqual([issue.done for issue in self.issues(store)], [False])
def test_posts_comments_on_a_child_issue_in_order(self) -> None:
@@ -164,6 +164,14 @@ class EpicStoreContract:
self.assertIsInstance(store.comment("ZZZ-1", "Hello."), Failure)
self.assertEqual([self.comments_on(store, key) for key in (child, task)], [[], []])
def test_closes_the_epic_once_its_summary_is_posted_and_refuses_a_blank_one(self) -> None:
store = self.new_store()
self.assertEqual(store.closed(), False)
self.assertIsInstance(store.close(" \n"), Failure)
self.assertEqual((store.closed(), self.comments_on(store, "ABC-12")), (False, []))
self.assertEqual(store.close("## Shipped\n\nThe import.\n"), None)
self.assertEqual((store.closed(), self.comments_on(store, "ABC-12")), (True, ["## Shipped\n\nThe import."]))
def test_reads_an_issue_without_scores_or_blockers_as_one_with_none(self) -> None:
store = self.new_store()
key = self.filed(store, store.epic_key, "Count the runs.")