diff --git a/bin/do_epic/test_do_epic.py b/bin/do_epic/test_do_epic.py index 1105e4d1..0050d614 100644 --- a/bin/do_epic/test_do_epic.py +++ b/bin/do_epic/test_do_epic.py @@ -67,6 +67,12 @@ class ConfigTest(unittest.TestCase): assert isinstance(found, DoEpicConfig), found self.assertEqual(found.sub_task_summary, "{label}: {Summary}") + def test_reads_a_template_that_ends_in_plain_text(self) -> None: + self.write(SETTINGS + 'sub-task-summary = "{Summary} for {label} in Jira"\n') + found = load(self.home) + assert isinstance(found, DoEpicConfig), found + self.assertEqual(found.sub_task_summary, "{Summary} for {label} in Jira") + def test_leaves_a_sub_tasks_summary_to_its_default_where_the_config_has_no_template(self) -> None: self.write() found = load(self.home) @@ -77,7 +83,7 @@ class ConfigTest(unittest.TestCase): for template, fault in ( ("4", "`sub-task-summary` is 4, not one line of text"), ("a\\nb {Summary}", "not one line of text"), - ("{label}", "`sub-task-summary` lacks {Summary}"), + ("{label}", "`sub-task-summary` lacks {Summary}, so every sub-task would get the same summary, such as `\"{label}: {Summary}\"`"), ("{label}: {Summary} {repo}", "`sub-task-summary` names {repo}, and only {label} and {Summary} are known"), ("{Summary:>9}", "`sub-task-summary` holds a field with a format or conversion"), ("{Summary", "`sub-task-summary` is '{Summary'"),