Drop DefaultPlan's unread ref, as architecture round 4's 🟢 asks

This commit is contained in:
2026-10-17 20:16:16 +02:00
parent 9a439a83bd
commit 10a283a5eb
2 changed files with 5 additions and 6 deletions
+4 -4
View File
@@ -733,11 +733,11 @@ class Routing(unittest.TestCase):
class RouteSources(unittest.TestCase):
def test_routes_on_the_plan_item_and_says_why_it_routes_on_the_projects_rung(self):
self.assertIsNone(main.plan_item(DefaultPlan("origin/main", "", NO_CUT)))
self.assertEqual(main.plan_item(DefaultPlan("origin/main", TODO, LastCut("v0.1.0", "", 3, [TODO]))).id, 3)
self.assertIsNone(main.plan_item(DefaultPlan("origin/main", TODO, LastCut("v0.2.0", "", 3, [TODO]))))
self.assertIsNone(main.plan_item(DefaultPlan("", NO_CUT)))
self.assertEqual(main.plan_item(DefaultPlan(TODO, LastCut("v0.1.0", "", 3, [TODO]))).id, 3)
self.assertIsNone(main.plan_item(DefaultPlan(TODO, LastCut("v0.2.0", "", 3, [TODO]))))
unreadable = Failure("git show origin/main:todo.md printed text that is not UTF-8")
for plan, said in ((DefaultPlan("origin/main", TODO.replace("| 4 | 2 | 3 |", "| x | 2 | 3 |"), NO_CUT), "routing on the project's rung: item 3's L 'x' is not a whole number from 1 to 4\n"), (DefaultPlan("origin/main", unreadable, NO_CUT), f"routing on the project's rung: {unreadable.reason}\n"), (Failure("no origin remote"), "routing on the project's rung: no origin remote\n")):
for plan, said in ((DefaultPlan(TODO.replace("| 4 | 2 | 3 |", "| x | 2 | 3 |"), NO_CUT), "routing on the project's rung: item 3's L 'x' is not a whole number from 1 to 4\n"), (DefaultPlan(unreadable, NO_CUT), f"routing on the project's rung: {unreadable.reason}\n"), (Failure("no origin remote"), "routing on the project's rung: no origin remote\n")):
with self.subTest(said=said):
with contextlib.redirect_stderr(io.StringIO()) as stderr:
self.assertIsNone(main.plan_item(plan))