From a99a98c504ec3b4f092a0770c15930f002bf9cbf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 23 Oct 2026 04:23:52 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20stability=20round=201:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20test=20the=20checkout=20a?= =?UTF-8?q?=20round-cap=20breach=20names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/rule_hook/test_rule_hook.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/rule_hook/test_rule_hook.py b/bin/rule_hook/test_rule_hook.py index 363b5d1c..47ce8e23 100644 --- a/bin/rule_hook/test_rule_hook.py +++ b/bin/rule_hook/test_rule_hook.py @@ -108,6 +108,12 @@ class CommandBreaches(unittest.TestCase): def test_a_round_title_past_round_3_breaks_round_cap(self): self.assertEqual(checked("git commit -m 'Answer stability round 4: 0 🔴, 1 🟡; fix the parser'"), ["round-cap"]) self.assertEqual(checked("git commit -m 'Answer stability round 3: 0 🔴, 1 🟡; fix the parser'"), []) + + def test_a_round_cap_breach_names_the_commit_s_checkout(self): + command = "git -C /x commit -m 'Answer stability round 4: 0 🔴, 1 🟡; fix'" + self.assertEqual([(breach.rule, breach.directory) for breach in command_breaches(command, simple_commands(command, "/r", "/h"), "/h")], [("round-cap", "/x")]) + + def test_an_override_quoting_the_human_s_yes_lets_a_round_past_the_cap_through(self): command = "git commit -m 'Answer stability round 4: 0 🔴, 1 🟡; fix' # rule-override round-cap: the human answered 'yes, one more'" self.assertFalse(verdict(command_breaches(command, simple_commands(command, "/r", "/h"), "/h"), command, False, True).blocked)