From 27d8632e99da62d7231d01af25d999026bf53b60 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 16 Oct 2026 18:14:50 +0200 Subject: [PATCH] =?UTF-8?q?Answer=20principles=20round=204:=200=20?= =?UTF-8?q?=F0=9F=94=B4,=201=20=F0=9F=9F=A1;=20test=20a=20tied=20outcomes?= =?UTF-8?q?=20side=20that=20unranked=20values=20would=20miss,=20and=20the?= =?UTF-8?q?=20levels'=20lowest=20values=20in=20a=20test=20of=20their=20own?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/loop_claude/test_loop_claude.py | 2 ++ bin/score_outcomes/test_score_outcomes.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index a7244ca6..ef450370 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -603,6 +603,8 @@ class Routing(unittest.TestCase): with self.subTest(item=item, likelihood=likelihood, escape_and_impact=escape_and_impact): with self.assertRaises(ValueError): Route(self.HIGH, item, likelihood, escape_and_impact) + + def test_takes_a_route_whose_item_holds_each_levels_lowest_value(self): self.assertEqual(Route(self.HIGH, 3, 1, 2).escape_and_impact, 2) def test_routes_nothing_on_an_item_without_e_or_i(self): diff --git a/bin/score_outcomes/test_score_outcomes.py b/bin/score_outcomes/test_score_outcomes.py index c0dd6cc1..193da944 100644 --- a/bin/score_outcomes/test_score_outcomes.py +++ b/bin/score_outcomes/test_score_outcomes.py @@ -95,6 +95,9 @@ class Report(unittest.TestCase): def test_ranks_ties_by_their_mean_rank(self): self.assertAlmostEqual(rank_correlation([1, 1, 2, 2, 2], [1, 2, 3, 4, 5]), 0.866, places=3) self.assertAlmostEqual(rank_correlation([1, 1, 2, 3], [1, 2, 3, 4]), 0.949, places=3) + self.assertAlmostEqual(rank_correlation([1, 2, 3, 4], [1, 1, 2, 3]), 0.949, places=3) + + def test_ranks_an_outcome_that_holds_two_values(self): self.assertAlmostEqual(rank_correlation([1, 2, 3, 4, 5], [1, 1, 2, 2, 2]), 0.866, places=3) def test_gives_how_well_l_e_and_i_each_order_chunks_by_review_rounds_and_red_findings(self):