Name each file of the setup as the setup's, and a config's as setup:<path>
CI / tests (pull_request) Successful in 4m42s

This commit is contained in:
2026-12-04 04:23:17 +01:00
parent eff57c1dfd
commit 6dd2787e7b
41 changed files with 220 additions and 156 deletions
+5 -3
View File
@@ -12,6 +12,7 @@ from project_config.doubles import CLIENT, JIRA_PLAN, JIRA_SCORING
from failure import Failure
from test_env import isolated_env
from project_config.main import located, title_templates
from loop_state.paths import RELEASE_ROOT
from project_config.templates import Titles
TOOL = pathlib.Path(__file__).resolve().parents[1] / "project-config"
@@ -50,8 +51,8 @@ class LoadTest(ConfigCase):
self.assertEqual(found.paths["plan"], folder / "todo.md")
self.assertEqual(found.paths["decisions"], folder / "docs" / "decisions.md")
self.assertEqual(found.paths["changelog"], self.checkout / "CHANGELOG.md")
self.assertEqual(found.paths["principles"], self.home / ".claude" / "principles")
self.assertEqual(found.paths["standards"], self.home / ".claude" / "skills" / "larv-review" / "standards")
self.assertEqual(found.paths["principles"], RELEASE_ROOT / "principles")
self.assertEqual(found.paths["standards"], RELEASE_ROOT / "skills" / "larv-review" / "standards")
self.assertEqual(tuple(found.paths), SETTINGS)
def test_the_build_epic_folder_is_no_projects_config_so_it_needs_no_checkout(self) -> None:
@@ -191,7 +192,7 @@ class LoadTest(ConfigCase):
self.assertIsNone(found.tracked("plan"), "the config's folder is outside the checkout")
def test_an_absolute_checkout_and_path_are_taken_as_written(self) -> None:
self.write("acme", CLIENT.replace("~/code/acme-billing", str(self.checkout)).replace("~/.claude/principles", "/srv/principles"))
self.write("acme", CLIENT.replace("~/code/acme-billing", str(self.checkout)).replace("setup:principles", "/srv/principles"))
found = load(self.checkout, self.checkout, self.home, {})
assert isinstance(found, ProjectConfig), found
self.assertEqual(found.paths["principles"], pathlib.Path("/srv/principles"))
@@ -235,6 +236,7 @@ class LoadTest(ConfigCase):
"a value that is not text": ("plan = 3\n", "`plan`"),
"a path that leaves the folder": ('plan = "folder:../other/todo.md"\n', "`plan`"),
"a path that leaves the checkout": ('plan = "checkout:../todo.md"\n', "`plan`"),
"a path that leaves the setup": ('plan = "setup:../todo.md"\n', "`plan`"),
"an empty path": ('plan = "folder:"\n', "`plan`"),
}
for case, (line, named) in cases.items():