From 7d245dcdce9e7ff07829f8bd46ea4ced050def42 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Wed, 18 Nov 2026 23:22:18 +0100 Subject: [PATCH] Test a filing spelt as a flag, one under --chunk, unreadable settings and an unreadable records section --- bin/do_epic/test_findings.py | 8 +++++++- bin/do_epic/test_main.py | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/bin/do_epic/test_findings.py b/bin/do_epic/test_findings.py index c6ff4d78..e4c36e05 100644 --- a/bin/do_epic/test_findings.py +++ b/bin/do_epic/test_findings.py @@ -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)) diff --git a/bin/do_epic/test_main.py b/bin/do_epic/test_main.py index 7beb70f1..276496ac 100644 --- a/bin/do_epic/test_main.py +++ b/bin/do_epic/test_main.py @@ -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.")