Skip to content

Commit

Permalink
DOC/TST: better descriptions of prev test
Browse files Browse the repository at this point in the history
  • Loading branch information
fedarko committed Dec 27, 2024
1 parent ae5da7a commit f2ce87b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions wotplot/tests/test_make_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]

Expand All @@ -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,
Expand Down

0 comments on commit f2ce87b

Please sign in to comment.