Test a filing spelt as a flag, one under --chunk, unreadable settings and an unreadable records section
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user