Test that a report counts a 🔴 beside a 🟡, and that BLOCK after a blank line still blocks
CI / tests (pull_request) Successful in 3m49s
CI / tests (pull_request) Successful in 3m49s
This commit is contained in:
@@ -27,6 +27,8 @@ class RoundReport(unittest.TestCase):
|
||||
self.assertEqual(findings_in(standing_report(folder, "prose", 1)), Findings(0, 1, 0))
|
||||
(folder / "prose-round-1-rerun.md").write_text("BLOCK\n\n### 🔴 [misread] a\n")
|
||||
self.assertEqual(findings_in(standing_report(folder, "prose", 1)), Findings(1, 0, 1))
|
||||
(folder / "prose-round-1-rerun.md").write_text("BLOCK\n\n### 🔴 a\n\n### 🟡 b\n")
|
||||
self.assertEqual(findings_in(standing_report(folder, "prose", 1)), Findings(1, 1, 0))
|
||||
|
||||
def test_names_a_missing_report(self):
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
@@ -43,7 +45,7 @@ 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- 🟡 `a.md:1`: worse\n")
|
||||
(pathlib.Path(temp) / "prose-round-1.md").write_text("\nBLOCK\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")
|
||||
|
||||
Reference in New Issue
Block a user