Answer stability round 1: 1 🔴, 6 🟡 (0 misread); say what a plan outside the checkout leaves undone in scoring-run-owed, the release standing and rank_todo.py
This commit is contained in:
@@ -57,6 +57,24 @@ class Main(unittest.TestCase):
|
||||
(folder / "decisions.md").write_bytes(b"\xff")
|
||||
self.assertEqual(self.run_main(), (1, f"{folder}/decisions.md: not UTF-8\n"))
|
||||
|
||||
def test_refuses_a_file_that_is_not_the_plan_the_config_names_and_a_checkout_no_config_names(self):
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
folder = configured(self, pathlib.Path(temp))
|
||||
self.enterContext(contextlib.chdir(temp))
|
||||
pathlib.Path(temp, "todo.md").write_text(TODO)
|
||||
pathlib.Path(temp, "README.md").write_text(README)
|
||||
other = pathlib.Path(temp, "another-project.md")
|
||||
other.write_text(TODO)
|
||||
code, said = self.run_main(str(other))
|
||||
self.assertEqual(code, 1)
|
||||
self.assertIn(f"{other} is not the plan", said)
|
||||
self.assertIn(str(pathlib.Path(temp, "todo.md").resolve()), said)
|
||||
self.assertEqual(other.read_text(), TODO, "a file ranked by another project's goals is not written")
|
||||
(folder / "config.toml").unlink()
|
||||
code, said = self.run_main()
|
||||
self.assertEqual(code, 1)
|
||||
self.assertIn("no config names the checkout", said)
|
||||
|
||||
def test_writes_the_ranked_file_yet_fails_on_an_item_under_the_bar(self):
|
||||
under = "item 2 scores 3.1, under the bar 4; delete it, or mark it with a reason the bar does not apply"
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
|
||||
Reference in New Issue
Block a user