Answer product-owner round 1: 0 🔴, 1 🟡; list the known columns when one is unknown, and name each blocker ID the ranking drops

This commit is contained in:
2026-10-15 23:25:02 +02:00
parent 28a8741a10
commit a012f38617
2 changed files with 13 additions and 6 deletions
+6 -3
View File
@@ -155,7 +155,10 @@ class Blockers(unittest.TestCase):
def test_drops_a_blocker_the_table_no_longer_holds_as_finished(self):
finished = TODO.replace("| 4 | 0.1.0 | | security | **Rotate the leaked key.** | 9 | 2 | 3 | 1 | 1 | 2.1 | 0 |\n", "").replace("| 2 | 0.1.0 | |", "| 2 | 0.1.0 | 4 |")
self.assertIn("| 2 | 0.1.0 | | | **Tighten the tests.**", self.ranked(finished).text)
ranked = self.ranked(finished)
self.assertIn("| 2 | 0.1.0 | | | **Tighten the tests.**", ranked.text)
self.assertEqual(ranked.dropped, ["item 2: dropped 4 from its Blocked by; the table no longer holds it"])
self.assertEqual(self.ranked(ranked.text).dropped, [])
def test_refuses_a_blocker_in_a_later_release_a_loop_and_an_id_past_next_id(self):
cases = {
@@ -178,7 +181,7 @@ class Blockers(unittest.TestCase):
def test_refuses_a_column_it_does_not_know_rather_than_drop_it_and_asks_for_c_beside_blocked_by(self):
extra = TODO.replace("| Goals | Score |\n|---|", "| Goals | Score | Later |\n|---|---|").replace(" | 0 |\n", " | 0 | x |\n")
self.assertEqual(self.ranked(extra), Failure("todo.md's items table has the column Later, which this rank_todo.py does not know; move this machine to the release that added it"))
self.assertEqual(self.ranked(extra), Failure("todo.md's items table has the column Later, which this rank_todo.py does not know; its columns are ID, Release, Blocked by, Exempt, Item, R, S, C, A, G, Goals, Score. Rename it, or move this machine to the release that added it"))
self.assertEqual([item.id for item in todo_table.items(extra)], [1, 2, 3, 4, 5])
without_c = TODO.replace("| R | S | C |", "| R | S |").replace("|---|---|---|---|---|---|---|---|---|---|---|---|", "|---|---|---|---|---|---|---|---|---|---|---|")
without_c = re.sub(r"(\*\* \| \d+ \| \d+) \| \d+ \|", r"\1 |", without_c)
@@ -245,4 +248,4 @@ class ThisRepo(unittest.TestCase):
def test_todo_md_is_ranked_with_nothing_under_the_bar(self):
text = (ROOT / "todo.md").read_text(encoding="utf-8")
ranked = rank_todo.rank(text, (ROOT / "README.md").read_text(encoding="utf-8"), (ROOT / "docs" / "decisions.md").read_text(encoding="utf-8"))
self.assertEqual(ranked, rank_todo.Ranked(text, []))
self.assertEqual(ranked, rank_todo.Ranked(text, [], []))