diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index 987607c0..d0bd87b0 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -196,6 +196,9 @@ class Blockers(unittest.TestCase): self.assertEqual(self.ranked(TODO.replace("## Items\n", "## Plan\n")).reason, "todo.md is not in the scored-table format; rank_todo.py --help shows a valid one") outside = TODO.replace("## Items\n\n", "## Items\n\n## Rows\n\n") self.assertEqual(self.ranked(outside).reason, "the items table sits under ## Rows, not ## Items; move it under ## Items") + table = TODO[TODO.index("| ID | Release |"):TODO.index("\n\n## Details")] + "\n" + above = table + "\n" + TODO.replace(table, "") + self.assertEqual(self.ranked(above).reason, "the items table sits under no ## heading, not ## Items; move it under ## Items") header = "| ID | Release | Blocked by | Exempt | Item | R | S | C | A | G | Goals | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n" self.assertEqual(todo_table.items(TODO + "\n" + header.replace("| Score |", "| Later |")), Failure("todo.md holds 2 tables whose header opens | ID | Release |; keep one items table")) repeated = TODO.replace("| Goals | Score |\n|---|", "| Goals | Score | Exempt |\n|---|---|").replace(" | 0 |\n", " | 0 | x |\n")