Commit a chunk's changes to the config's folder in its own repo
CI / tests (pull_request) Failing after 2m33s
CI / tests (pull_request) Failing after 2m33s
This commit is contained in:
@@ -927,6 +927,21 @@ class TodoRankCheck(unittest.TestCase):
|
||||
(self.config.parent / "todo.md").write_text("# todo\n")
|
||||
self.assertEqual(self.details(checkout), [f"own script checked {self.config.parent}/todo.md"])
|
||||
|
||||
def test_a_commit_in_the_configs_folder_checks_the_plan_it_keeps_there_once_it_changes(self):
|
||||
checkout = self.changed_plan(f"{self.folder}/clone", self.STUB)
|
||||
folder = str(self.config.parent)
|
||||
git(folder, "init", "-q", "-b", "main")
|
||||
self.assertEqual(self.details(folder), [], "the plan is the checkout's todo.md, which a commit here doesn't hold")
|
||||
self.config.write_text(self.config.read_text().replace('"checkout:todo.md"', '"folder:todo.md"'))
|
||||
(self.config.parent / "todo.md").write_text("# todo\n")
|
||||
self.assertEqual(self.details(folder), [f"own script checked {folder}/todo.md"], "checked with the checkout's own rank_todo.py, as a commit there would be")
|
||||
git(folder, "add", "-A")
|
||||
git(folder, "commit", "-q", "-m", "plan")
|
||||
self.assertEqual(self.details(folder), [], "committed, so unchanged")
|
||||
self.config.write_text("checkout = 3\n")
|
||||
(self.config.parent / "todo.md").write_text("# changed\n")
|
||||
self.assertEqual(self.details(folder), [], "a config to fix doesn't block the commit that fixes it")
|
||||
|
||||
def test_a_plan_in_a_folder_of_the_checkout_is_checked_once_it_changes(self):
|
||||
checkout = self.changed_plan(f"{self.folder}/clone", self.STUB)
|
||||
self.config.write_text(self.config.read_text().replace('"checkout:todo.md"', '"checkout:plan/todo.md"'))
|
||||
|
||||
Reference in New Issue
Block a user