Answer principles round 1: 0 🔴, 3 🟡 (0 misread); refuse a misread count above the findings, share the lower-bound rule, name score-outcomes' new list in the README
This commit is contained in:
@@ -4,7 +4,7 @@ import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
||||
|
||||
from round_titles import Counts, lacks_counts, past_cap, round_counts, round_findings
|
||||
from round_titles import Findings, lacks_counts, past_cap, round_counts, round_findings
|
||||
|
||||
|
||||
class Rounds(unittest.TestCase):
|
||||
@@ -32,22 +32,19 @@ class Cap(unittest.TestCase):
|
||||
|
||||
class RoundFindings(unittest.TestCase):
|
||||
def test_sums_the_counts_each_round_title_opens_with(self):
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡; flag a deleted test", "Answer prose round 1: 0 🔴, 3 🟡", "Merge origin/main"]), Counts(1, 5, None))
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡; flag a deleted test", "Answer prose round 1: 0 🔴, 3 🟡", "Merge origin/main"]), Findings(1, 5, None))
|
||||
|
||||
def test_knows_no_count_when_a_round_title_or_every_round_lacks_one(self):
|
||||
self.assertIsNone(round_findings(["Answer stability round 1: 1 🔴, 2 🟡; fix", "Answer prose round 1: fix the README"]))
|
||||
self.assertIsNone(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 fix"]))
|
||||
self.assertIsNone(round_findings(["Do the work"]))
|
||||
|
||||
def test_reads_the_counts_of_a_title_that_also_counts_misread_findings(self):
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (1 misread); fix", "Answer prose round 1: 0 🔴, 3 🟡 (0 misread)"]), Counts(1, 5, 1))
|
||||
|
||||
def test_sums_the_misread_findings_each_round_title_counts(self):
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (1 misread); fix", "Answer prose round 1: 0 🔴, 3 🟡 (2 misread)", "Merge origin/main"]), Counts(1, 5, 3))
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 0 🔴, 0 🟡 (0 misread)"]), Counts(0, 0, 0))
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (1 misread); fix", "Answer prose round 1: 0 🔴, 3 🟡 (2 misread)", "Merge origin/main"]), Findings(1, 5, 3))
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 0 🔴, 0 🟡 (0 misread)"]), Findings(0, 0, 0))
|
||||
|
||||
def test_knows_no_misread_count_when_a_round_title_lacks_one(self):
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (1 misread); fix", "Answer prose round 1: 0 🔴, 3 🟡; fix"]), Counts(1, 5, None))
|
||||
self.assertEqual(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (1 misread); fix", "Answer prose round 1: 0 🔴, 3 🟡; fix"]), Findings(1, 5, None))
|
||||
|
||||
|
||||
def test_finds_a_round_title_without_counts(self):
|
||||
@@ -55,6 +52,11 @@ class RoundFindings(unittest.TestCase):
|
||||
self.assertTrue(lacks_counts("Answer stability round 1: 0 🔴, 1 🟡; fix"))
|
||||
self.assertFalse(lacks_counts("Answer stability round 1: 0 🔴, 1 🟡 (0 misread); fix"))
|
||||
self.assertFalse(lacks_counts("Answer prose round 2: 0 🔴, 0 🟡 (0 misread)"))
|
||||
|
||||
def test_takes_a_title_counting_more_misread_findings_than_findings_as_lacking_its_counts(self):
|
||||
self.assertTrue(lacks_counts("Answer stability round 1: 1 🔴, 2 🟡 (4 misread); fix"))
|
||||
self.assertFalse(lacks_counts("Answer stability round 1: 1 🔴, 2 🟡 (3 misread); fix"))
|
||||
self.assertIsNone(round_findings(["Answer stability round 1: 1 🔴, 2 🟡 (4 misread); fix"]))
|
||||
self.assertFalse(lacks_counts("Answer the question"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user