Ship the do-epic launcher, keep its transcripts out of the repo and in the backup list

This commit is contained in:
2026-11-18 22:36:02 +01:00
parent 776a852965
commit b769916928
5 changed files with 26 additions and 1 deletions
+10
View File
@@ -2,6 +2,7 @@ import contextlib
import dataclasses
import io
import pathlib
import subprocess
import sys
import tempfile
import unittest
@@ -58,6 +59,15 @@ class DoEpicTest(unittest.TestCase):
return code, out.getvalue(), err.getvalue()
class TheLauncher(unittest.TestCase):
def test_the_repo_ships_a_do_epic_that_prints_its_help(self) -> None:
launcher = pathlib.Path(__file__).resolve().parents[1] / "do-epic"
ran = subprocess.run([str(launcher), "--help"], capture_output=True, text=True, timeout=60)
self.assertEqual((ran.returncode, ran.stdout.split(" ", 2)[2]), (0, main.HELP + "\n"))
tracked = subprocess.run(["git", "ls-files", "--error-unmatch", launcher.name], capture_output=True, cwd=launcher.parent)
self.assertEqual(tracked.returncode, 0, "bin/do-epic is not in the repo; .gitignore lists what it keeps")
class TheCommand(DoEpicTest):
def test_prints_the_help_for_anything_but_one_epic_key(self) -> None:
for argv, code in ((["--help"], 0), (["-h"], 0), ([], 1), (["abc"], 1), (["ABC-12", "ABC-13"], 1), (["--chunk", "x", "ABC-12"], 1), (["--chunk", "ABC-12"], 1)):