Let a project's config name a working branch per epic that chunks branch off and merge into
CI / tests (pull_request) Successful in 5m4s
CI / tests (pull_request) Successful in 5m4s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import unittest
|
||||
|
||||
from project_config.templates import BARE, branch_fault, branch_fits, branch_of, fits, summary_of, title_fault, Titles
|
||||
from project_config.templates import BARE, branch_fault, branch_fits, branch_of, epic_branch, epic_branch_fault, fits, summary_of, title_fault, Titles
|
||||
|
||||
|
||||
class TitleTest(unittest.TestCase):
|
||||
@@ -31,6 +31,17 @@ class TitleTest(unittest.TestCase):
|
||||
with self.subTest(template):
|
||||
self.assertIsNotNone(branch_fault(template))
|
||||
|
||||
def test_an_epic_branch_template_holds_one_epic_and_names_a_branch_git_accepts(self) -> None:
|
||||
for template in ("{epic}", "epic/{epic}"):
|
||||
with self.subTest(template):
|
||||
self.assertIsNone(epic_branch_fault(template))
|
||||
for template in ("develop", "{epic}/{epic}", "{id}", "epic {epic}", "-{epic}", "{epic}.lock", 3):
|
||||
with self.subTest(template):
|
||||
self.assertIsNotNone(epic_branch_fault(template))
|
||||
|
||||
def test_fills_an_epic_branch_with_the_epics_key(self) -> None:
|
||||
self.assertEqual(epic_branch("epic/{epic}", "ABC-123"), "epic/ABC-123")
|
||||
|
||||
def test_fills_a_branch_with_the_items_id(self) -> None:
|
||||
self.assertEqual(branch_of("item-{id}", 357), "item-357")
|
||||
self.assertEqual(branch_of("feature/PAY-{id}", 357), "feature/PAY-357")
|
||||
|
||||
Reference in New Issue
Block a user