Test do-epic's chunk run in a repo, its stops and its judge model
This commit is contained in:
@@ -185,7 +185,7 @@ class StartingAnEpicsChunks(unittest.TestCase):
|
||||
(self.home / ".local/state/do-epic/ABC-12").write_text("", encoding="utf-8")
|
||||
found = start_chunks(self.epic(1, api=1), [issue("ABC-20", "repo:api")], None, Tmux())
|
||||
assert isinstance(found, Failure)
|
||||
self.assertRegex(found.reason, f"^cannot lock {self.home}/.local/state/do-epic/ABC-12(/starting)?: \\w")
|
||||
self.assertRegex(found.reason, f"^cannot lock {self.home}/.local/state/do-epic/ABC-12: \\w")
|
||||
|
||||
|
||||
class TheFirstPrompt(unittest.TestCase):
|
||||
@@ -208,7 +208,7 @@ class WindowsAcrossSessions(unittest.TestCase):
|
||||
self.assertEqual(run.calls, [["list-windows", "-a", "-F", f"#{{session_name}}\t#{{window_name}}\t#{{pane_dead}}\t#{{window_id}}\t#{{{tmux.ROOT}}}"]])
|
||||
|
||||
def test_without_a_tmux_server_there_are_none(self) -> None:
|
||||
self.assertEqual(tmux.everywhere(lambda args: subprocess.CompletedProcess(args, 1, "no server running\n", "")), [])
|
||||
self.assertEqual(tmux.everywhere(lambda args: subprocess.CompletedProcess(args, 1, "epic-ABC-12\tABC-20\t0\t@0\t/code/api\n", "")), [])
|
||||
|
||||
def test_a_started_chunk_joins_the_sessions_windows_as_running(self) -> None:
|
||||
found = tmux.start_chunk(tmux.Window("epic-ABC-12", "ABC-20", ""), "/code/api", {}, ["do-epic"], [tmux.Listed("ABC-20", "@0", True), tmux.Listed("ABC-21", "@1", False)], False, Tmux(("epic-ABC-12", "ABC-20", True, "/code/api"), ("epic-ABC-12", "ABC-21", False, "/code/api")))
|
||||
|
||||
Reference in New Issue
Block a user