Answer principles round 1: 0 🔴, 2 🟡; test every guard, name a non-UTF-8 file name as an exit 1, fail on a malformed rev-parse

This commit is contained in:
2026-10-21 20:05:36 +02:00
parent 3fc6790bee
commit 3ae89c3acf
4 changed files with 44 additions and 18 deletions
+1 -1
View File
@@ -327,7 +327,7 @@ class Premises(unittest.TestCase):
(checkout.temp / "fake-bin" / "git").unlink()
run = checkout.run([worker()])
self.assertEqual((run.code, run.calls), (1, []))
self.assertEqual(run.stderr.strip(), "git rev-parse --show-toplevel could not start: [Errno 2] No such file or directory: 'git'")
self.assertTrue(run.stderr.startswith("git rev-parse --show-toplevel could not start: "), run.stderr)
def test_makes_no_worktree_for_a_readme_without_premises(self):
checkout = Checkout(self)