Read the routing ladder from routing-ladder.json, which a project replaces with a file of its own in its config's folder
CI / tests (pull_request) Successful in 2m37s
CI / tests (pull_request) Successful in 2m37s
This commit is contained in:
@@ -9,8 +9,9 @@ import unittest.mock
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from failure import Failure
|
||||
from project_config.settings import held, load, ProjectConfig, SETTINGS
|
||||
from project_config.settings import held, load, ProjectConfig, SETTINGS, Unnamed
|
||||
from test_env import isolated_env
|
||||
from project_config.main import located
|
||||
|
||||
TOOL = pathlib.Path(__file__).resolve().parents[1] / "project-config"
|
||||
|
||||
@@ -119,6 +120,13 @@ class LoadTest(ConfigCase):
|
||||
self.assertIn(str(self.checkout), reason)
|
||||
self.assertIn("~/.claude-projects/<key>/config.toml", reason)
|
||||
|
||||
def test_tells_a_checkout_no_config_names_from_one_whose_config_is_faulty(self) -> None:
|
||||
self.assertIsInstance(load(self.checkout, self.checkout, self.home), Unnamed)
|
||||
self.assertIsInstance(located(str(self.checkout), self.home), Unnamed, "a folder that is no checkout has no config either")
|
||||
self.write("acme", CLIENT.replace('plan = "folder:todo.md"\n', ""))
|
||||
self.assertNotIsInstance(load(self.checkout, self.checkout, self.home), Unnamed)
|
||||
self.assertIn("`plan` is missing", self.failure())
|
||||
|
||||
def test_every_missing_setting_is_named(self) -> None:
|
||||
kept = "".join(line + "\n" for line in CLIENT.splitlines() if not line.startswith(("plan", "changelog", "principles")))
|
||||
self.write("acme", kept)
|
||||
|
||||
Reference in New Issue
Block a user