Answer stability round 1: 1 🔴, 1 🟡 (0 misread); refuse to count a report whose headings hold a mark in another form, and test the hook's report lookup
CI / tests (pull_request) Successful in 3m12s
CI / tests (pull_request) Successful in 3m12s
This commit is contained in:
@@ -43,9 +43,17 @@ class RoundReport(unittest.TestCase):
|
||||
|
||||
def test_names_a_blocking_report_that_heads_no_finding_as_its_format_asks(self):
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
(pathlib.Path(temp) / "prose-round-1.md").write_text("BLOCK\n\n## 🟡 Should fix\n\n### 1. `a.md:1`: worse\n")
|
||||
(pathlib.Path(temp) / "prose-round-1.md").write_text("BLOCK\n\n- 🟡 `a.md:1`: worse\n")
|
||||
unread = findings_in(standing_report(pathlib.Path(temp), "prose", 1))
|
||||
self.assertIsInstance(unread, Failure)
|
||||
self.assertEqual(unread.reason, f"{temp}/prose-round-1.md says BLOCK but opens no finding with `### 🔴` or `### 🟡`; count its findings by hand")
|
||||
(pathlib.Path(temp) / "prose-round-1.md").write_text("APPROVE\n")
|
||||
self.assertEqual(findings_in(standing_report(pathlib.Path(temp), "prose", 1)), Findings(0, 0, 0))
|
||||
|
||||
def test_names_a_report_whose_headings_it_cannot_count(self):
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
(pathlib.Path(temp) / "prose-round-1.md").write_text("BLOCK\n\n### 1. 🟡 `a.md:1`: worse\n")
|
||||
unread = findings_in(standing_report(pathlib.Path(temp), "prose", 1))
|
||||
self.assertIsInstance(unread, Failure)
|
||||
self.assertTrue(unread.reason.startswith(f"{temp}/prose-round-1.md cannot be counted: its heading `### 1. 🟡"), unread.reason)
|
||||
self.assertTrue(unread.reason.endswith("; count its findings by hand"), unread.reason)
|
||||
|
||||
Reference in New Issue
Block a user