Files
claude-config/bin/do_epic/test_landed.py
T
2026-12-03 13:25:03 +01:00

23 lines
693 B
Python

import pathlib
import sys
import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from do_epic.main import Landed, landed_in
class WhereTheWorkOfAFinishedChunkLanded(unittest.TestCase):
def test_it_landed_on_the_epics_working_branch_where_the_chunk_has_one(self) -> None:
self.assertEqual(landed_in("api", "ABC-12"), Landed.ON_EPIC_BRANCH)
def test_it_landed_on_the_default_branch_of_a_repo_without_one(self) -> None:
self.assertEqual(landed_in("api", None), Landed.ON_DEFAULT_BRANCH)
def test_a_chunk_without_a_repo_landed_nowhere(self) -> None:
self.assertEqual(landed_in(None, None), Landed.NOWHERE)
if __name__ == "__main__":
unittest.main()