Answer stability round 1: 0 🔴, 8 🟡; tests for a 10, the ID order, five nearest, a numeric file name, render and a plan without a table, and a live mutation recipe

This commit is contained in:
2026-10-13 11:49:10 +02:00
parent b0e9d206a2
commit 4e07db755b
5 changed files with 36 additions and 16 deletions
+11 -4
View File
@@ -179,10 +179,6 @@ class ScoringRunDue(unittest.TestCase):
self.assertIsNone(items("# todo\n"))
self.assertIsInstance(items(todo("| 0 | 0.1.0 | | **Do it.** | 1 | 1 | 3 | 1 | 1 | 1 | 9.0 |")), Failure)
def test_reads_a_table_from_before_c_joined_it(self):
legacy = "## Items\n\n| ID | Release | Exempt | Item | R | S | A | G | Goals | Score |\n|---|---|---|---|---|---|---|---|---|---|\n| 3 | 0.1.0 | | **Do it.** | 1 | 1 | 1 | 1 | 1 | 9.0 |\n"
self.assertEqual(items(legacy), [Item(3, (0, 1, 0), "", "**Do it.**", {"R": 1, "S": 1, "A": 1, "G": 1}, ("1",))])
def test_is_due_for_an_item_naming_the_floor(self):
plan = [item(1, (0, 1, 0), "**Lift the project to the Comprehension floor.**"), item(2, (0, 1, 0))]
self.assertEqual(scoring_run_due(plan, plan, [1], True), ["ships item 1, which names the comprehension floor"])
@@ -274,6 +270,17 @@ class LarvReviewTool(unittest.TestCase):
self.assertEqual(self.run_tool("needs-scoring-run").stdout, "No scoring run due.\n")
self.assertIn("todo.md's ID column", self.run_tool("needs-scoring-run", "item-85").stderr)
def test_reads_a_default_branch_plan_without_a_table_as_empty_and_refuses_a_checkout_without_one(self):
self.git("switch", "-q", "-c", "reshape", "main")
self.commit("Plan as a list", {"todo.md": "# todo\n\n- [ ] Do it.\n"})
self.git("push", "-q", "origin", "HEAD:main")
self.git("switch", "-q", "chunk")
self.assertEqual(self.run_tool("needs-scoring-run", "2").returncode, 0)
(self.checkout / "todo.md").write_text("# todo\n")
ran = self.run_tool("needs-scoring-run", "2")
self.assertEqual(ran.returncode, 1)
self.assertIn("the checkout's todo.md has no items table", ran.stderr)
def test_records_a_ruling_once_four_seats_settle_a_split(self):
lines = """\
PR #2 at {start}, against {start}