Answer prose round 1: 0 🔴, 16 🟡; say position not rank, split the changelog entry, tighten messages and details

This commit is contained in:
2026-10-16 03:38:06 +02:00
parent 5fc6fdd2c1
commit 7827ff2f05
9 changed files with 51 additions and 41 deletions
+4 -2
View File
@@ -178,7 +178,7 @@ class Rank(unittest.TestCase):
def test_asks_to_drop_a_goal_weights_table_from_a_table_with_moves(self):
weighted = TODO.replace("## Items\n", "| Goal | W |\n|---|---|\n| 1 | 1.00 |\n\n## Items\n")
self.assertEqual(self.ranked(weighted), Failure("todo.md holds a goal weights table beside a Moves column; drop the table, since rank_todo.py weighs each achieve goal by its rank in README.md"))
self.assertEqual(self.ranked(weighted), Failure("todo.md holds a goal weights table beside a Moves column; drop the table, since rank_todo.py weighs each achieve goal by its position in README.md"))
def test_refuses_a_formula_that_is_more_than_arithmetic_over_the_scores(self):
for formula in ("__import__('os')", "R.real", "X + 1", "C + 1", "A + V", "G + V", "W * V", "R ^ 2", "R +", "R / (S - 2)", "R\x00", "1" * 400, " + ".join(["R"] * 300), "-" * 100000 + "R", "10 ** 10 ** 10", "(-8) ** (1 / 3)", "0 ** -1"):
@@ -252,7 +252,9 @@ class OldShape(unittest.TestCase):
def test_refuses_a_table_with_both_moves_and_goals(self):
both = OLD_SHAPE.replace("| Goals | Score |\n|---|", "| Goals | Moves | Score |\n|---|---|").replace(" | 0 |\n", " | 1 by 1 | 0 |\n")
self.assertEqual(self.ranked(both), Failure("todo.md's items table has the column A, G, Goals, a column of the old shape, which Moves replaced; drop it"))
self.assertEqual(self.ranked(both), Failure("todo.md's items table has A, G and Goals, columns of the old shape that Moves replaced; drop them"))
one = TODO.replace("| Moves | Score |\n|---|", "| Moves | G | Score |\n|---|---|").replace(" | 0 |\n", " | 1 | 0 |\n")
self.assertEqual(self.ranked(one), Failure("todo.md's items table has G, a column of the old shape that Moves replaced; drop it"))
def test_names_the_goals_column_a_table_misspells_by_its_shape(self):
misspelt = TODO.replace("| C | Moves |", "| C | Move |")