Test a filing spelt as a flag, one under --chunk, unreadable settings and an unreadable records section

This commit is contained in:
2026-11-18 23:22:18 +01:00
parent 29a78bc067
commit 7d245dcdce
2 changed files with 13 additions and 1 deletions
+7 -1
View File
@@ -77,8 +77,14 @@ class FilingAFinding(FindingsTest):
code, _, err, _ = self.run_with(["ABC-12", "--file", "Retry"])
self.assertEqual((code, err), (1, "cannot file the finding in the epic ABC-12: Jira answered 401\n"))
def test_stops_where_the_machines_settings_cannot_be_read(self) -> None:
(self.home / ".claude-projects/do-epic/config.toml").unlink()
code, out, err, _ = self.run_with(["ABC-12", "--file", "Retry"])
self.assertEqual((code, out, len(self.store.issues)), (1, "", 2))
self.assertIn("config.toml", err)
def test_prints_the_help_for_a_filing_spelt_wrong(self) -> None:
for argv in (["ABC-12", "--file"], ["ABC-12", "--file", "a", "b"], ["ABC-12", "--file", "a", "--label"], ["ABC-12", "--file", "a", "--labels", "x"], ["--file", "ABC-12", "a"], ["ABC-12", "--file", "--label", "x"]):
for argv in (["ABC-12", "--file"], ["ABC-12", "--file", "a", "b"], ["ABC-12", "--file", "a", "--label"], ["ABC-12", "--file", "a", "--labels", "x"], ["--file", "ABC-12", "a"], ["ABC-12", "--file", "--label", "x"], ["ABC-12", "--file", "--lable"], ["ABC-12", "--file", "a", "--label", "--x"], ["--chunk", "ABC-20", "ABC-12", "--file", "a"]):
with self.subTest(argv=argv):
code, out, err, _ = self.run_with(argv)
self.assertEqual((code, out, err, len(self.store.issues)), (1, "", main.HELP + "\n", 2))
+6
View File
@@ -148,6 +148,12 @@ class ACycleOfAChunkWithoutARepo(DoEpicTest):
(self.home / ".claude/CLAUDE.md").write_text("# Global\n", encoding="utf-8")
self.assertEqual(self.cycle().records, "From the epic ABC-12's description, ## Scoring:\nE + I, bar 4.\n\nFrom the epic ABC-12's description, ## Decisions:\n### Merges squash\nAlways.\n\nFrom ~/.claude/CLAUDE.md:\n# Global")
def test_stops_where_a_section_of_the_epics_records_cannot_be_read(self) -> None:
self.description = DESCRIPTION + "\n## Scoring\nA.\n\n## Scoring\nB.\n"
with self.assertRaises(AssertionError) as raised:
self.cycle()
self.assertIn("the epic ABC-12's description: the epic's description has ## Scoring more than once - the judge cannot read the records.", str(raised.exception))
def test_the_premises_are_the_epics_goals_and_audience(self) -> None:
self.assertEqual(self.cycle().premises, "the epic ABC-12's description:\n## Goals\nShip the import.\n\n## Audience\nThe client's team.")