Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
@@ -168,33 +168,33 @@ class Store(unittest.TestCase):
|
||||
return ProjectConfig("acme", folder, top, paths)
|
||||
|
||||
def test_a_record_in_the_checkout_is_tracked_by_its_path_from_the_top(self):
|
||||
store = stores.store(self.config(pathlib.Path("/code/acme"), pathlib.Path("/home/me/.claude-projects/acme")), "decisions")
|
||||
store = stores.store(self.config(pathlib.Path("/code/acme"), pathlib.Path("/home/me/.config/build-release/acme")), "decisions")
|
||||
self.assertEqual((store.label, store.tracked), ("/code/acme/decisions.md", "decisions.md"))
|
||||
|
||||
def test_a_record_in_the_configs_folder_is_not_tracked(self):
|
||||
store = stores.store(self.config(pathlib.Path("/code/acme"), pathlib.Path("/home/me/.claude-projects/acme")), "changelog")
|
||||
self.assertEqual((store.label, store.tracked), ("/home/me/.claude-projects/acme/CHANGELOG.md", None))
|
||||
store = stores.store(self.config(pathlib.Path("/code/acme"), pathlib.Path("/home/me/.config/build-release/acme")), "changelog")
|
||||
self.assertEqual((store.label, store.tracked), ("/home/me/.config/build-release/acme/CHANGELOG.md", None))
|
||||
|
||||
def test_the_plan_is_not_a_record(self):
|
||||
with self.assertRaises(ValueError) as refused:
|
||||
stores.store(self.config(pathlib.Path("/code/acme"), pathlib.Path("/home/me/.claude-projects/acme")), "plan")
|
||||
stores.store(self.config(pathlib.Path("/code/acme"), pathlib.Path("/home/me/.config/build-release/acme")), "plan")
|
||||
self.assertEqual(str(refused.exception), "plan is not a record; the records are decisions, score-anchors, comprehension-history, reading-cost, changelog")
|
||||
|
||||
def test_a_record_on_a_confluence_page_is_that_page(self):
|
||||
page = Page("https://acme.atlassian.net", "2293761", "confluence:https://acme.atlassian.net/wiki/spaces/ENG/pages/2293761")
|
||||
config = ProjectConfig("acme", pathlib.Path("/home/me/.claude-projects/acme"), pathlib.Path("/code/acme"), {}, pathlib.Path("/home/me/acme.env"), pages={"decisions": page})
|
||||
config = ProjectConfig("acme", pathlib.Path("/home/me/.config/build-release/acme"), pathlib.Path("/code/acme"), {}, pathlib.Path("/home/me/acme.env"), pages={"decisions": page})
|
||||
self.assertEqual(stores.store(config, "decisions"), ConfluencePage(page, pathlib.Path("/home/me/acme.env")))
|
||||
|
||||
|
||||
class GoalsStore(unittest.TestCase):
|
||||
def test_goals_kept_as_a_file_are_that_file(self):
|
||||
top = pathlib.Path("/code/acme")
|
||||
store = stores.goals_store(ProjectConfig("acme", pathlib.Path("/home/me/.claude-projects/acme"), top, {"goals-and-audience": top / "README.md"}))
|
||||
store = stores.goals_store(ProjectConfig("acme", pathlib.Path("/home/me/.config/build-release/acme"), top, {"goals-and-audience": top / "README.md"}))
|
||||
self.assertEqual((store.label, store.tracked), ("/code/acme/README.md", "README.md"))
|
||||
|
||||
def test_goals_kept_in_jira_are_the_epics_description(self):
|
||||
epic = Epic("https://acme.atlassian.net", "ABC-12")
|
||||
store = stores.goals_store(ProjectConfig("acme", pathlib.Path("/home/me/.claude-projects/acme"), pathlib.Path("/code/acme"), {}, pathlib.Path("/home/me/acme.env"), goals_epic=epic))
|
||||
store = stores.goals_store(ProjectConfig("acme", pathlib.Path("/home/me/.config/build-release/acme"), pathlib.Path("/code/acme"), {}, pathlib.Path("/home/me/acme.env"), goals_epic=epic))
|
||||
self.assertEqual(store, EpicDescription(epic, pathlib.Path("/home/me/acme.env")))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user