Answer stability round 1: 0 🔴, 17 🟡 (0 misread); read line ends as before, drop a stale copy, say why a read failed, and test each failure the round named

This commit is contained in:
2026-11-14 00:25:16 +01:00
parent d15380249d
commit b2142ee620
14 changed files with 151 additions and 43 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ It prints `Filed item <ID> in <todo.md's path>.` It doesn't write anything where
finish removes the item's row and its detail. With --changelog it adds the bullet first under
CHANGELOG.md's ## Unreleased, or a ## heading that says unreleased, creating the section, or the
file, where missing. It refuses where that section holds ### subsections: add the bullet by hand.
Where CHANGELOG.md exists, finish needs --changelog or --no-changelog, so no bullet is left out by
Where CHANGELOG.md holds text, finish needs --changelog or --no-changelog, so no bullet is left out by
mistake. It prints `Finished item <ID> in <todo.md's path>.` It doesn't write anything while docs/decisions.md cites the item.
show reads only todo.md. It prints `From <todo.md's path>:`, then the items table's header and divider, item <ID>'s row, and its detail
+4
View File
@@ -188,6 +188,10 @@ class Finish(TodoItem):
self.assertEqual(self.run_main("finish", "2", "--changelog", "Tests are tight.")[0], 0)
self.assertEqual(self.changelog.read_text(), "# Changelog\n\n## Unreleased\n\n- Tests are tight.\n")
def test_needs_no_changelog_choice_where_the_project_has_no_changelog(self):
self.assertEqual(self.run_main("finish", "2"), (0, f"Finished item 2 in {self.todo}.\n", ""))
self.assertFalse(self.changelog.exists())
def test_needs_a_changelog_choice_where_a_changelog_exists(self):
self.changelog.write_text(CHANGELOG)
before = self.todo.read_text()