From 00eabb5574f57b813cb71dd29b6fd629405d1ef0 Mon Sep 17 00:00:00 2001 From: Elisa Anguita Date: Thu, 9 Jan 2025 11:45:52 -0300 Subject: [PATCH] test(pacer): enhance test by adding subTest for round-robin asserts --- cl/search/tests/test_pacer_bulk_fetch.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cl/search/tests/test_pacer_bulk_fetch.py b/cl/search/tests/test_pacer_bulk_fetch.py index c5ee60e6e6..ec5219a65a 100644 --- a/cl/search/tests/test_pacer_bulk_fetch.py +++ b/cl/search/tests/test_pacer_bulk_fetch.py @@ -240,8 +240,12 @@ def track_rounds_side_effect(remaining_courts, options, is_last_round): court_id = queue.recap_document.docket_entry.docket.court_id court_ids_this_round.append(court_id) - self.assertEqual( - len(court_ids_this_round), - len(set(court_ids_this_round)), - f"Round {round_index} had duplicate courts: {court_ids_this_round}", - ) + with self.subTest( + court_ids_this_round=court_ids_this_round, + round_index=round_index, + ): + self.assertEqual( + len(court_ids_this_round), + len(set(court_ids_this_round)), + f"Round {round_index} had duplicate courts: {court_ids_this_round}", + )