From f2ce87be93a5588d85408992c77af835ba8aa061 Mon Sep 17 00:00:00 2001 From: Marcus Fedarko Date: Fri, 27 Dec 2024 17:34:40 -0500 Subject: [PATCH] DOC/TST: better descriptions of prev test --- wotplot/tests/test_make_utils.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wotplot/tests/test_make_utils.py b/wotplot/tests/test_make_utils.py index 42ca70e..307250d 100644 --- a/wotplot/tests/test_make_utils.py +++ b/wotplot/tests/test_make_utils.py @@ -131,13 +131,16 @@ def test_fill_match_cells(): } -def test_fill_match_cells_same_position_covered_twice_in_s2(mocker): +def test_fill_match_cells_redundant_common_substring_rc(mocker): gcs = mocker.patch("wotplot._make._get_common_substrings") gcs.return_value = [ (0, 0, 3), - # Add on an extra unneeded diagonal (the (0, 0, 3) accounts - # for matches at (0, 0), (1, 1), and (2, 2)) to verify it doesn't - # break stuff + # Add on an extra unneeded diagonal (the (0, 0, 3) already accounts + # for matches at (0, 0), (1, 1), and (2, 2), making (1, 1, 2) wholly + # unnecessary) to verify it doesn't break stuff. (Even though we will + # process some positions multiple times, we should still keep all of + # them as REV only -- this is something I was worried about making sure + # to handle correctly.) (1, 1, 2), ] @@ -152,6 +155,8 @@ def test_fill_match_cells_same_position_covered_twice_in_s2(mocker): md = {} _fill_match_cells(s1, s2, 1, md, yorder="TB", s2isrc=True, binary=False) + # The positions look a bit different from (0, 0), (1, 1), and (2, 2) + # because we've set s2isrc=True. assert md == { (2, 0): REV, (1, 1): REV,