Skip to content

Commit

Permalink
cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Aug 15, 2023
1 parent 99ab6a4 commit 6b24ce8
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions tests/test_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,6 @@ def QRatio(*args, **kwargs):
fuzz.QRatio,
]

hashable_scorers = [
fuzz.ratio,
fuzz.partial_ratio,
fuzz.token_sort_ratio,
fuzz.token_set_ratio,
fuzz.token_ratio,
fuzz.partial_token_sort_ratio,
fuzz.partial_token_set_ratio,
fuzz.partial_token_ratio,
fuzz.WRatio,
fuzz.QRatio,
]


def test_no_processor():
assert fuzz.ratio("new york mets", "new york mets") == 100
assert fuzz.ratio("new york mets", "new YORK mets") != 100
Expand Down Expand Up @@ -263,7 +249,7 @@ def test_invalid_input(scorer):
scorer(1, 1)


@pytest.mark.parametrize("scorer", hashable_scorers)
@pytest.mark.parametrize("scorer", scorers)
def test_array(scorer):
"""
arrays should be supported and treated in a compatible way to strings
Expand All @@ -277,7 +263,7 @@ def test_array(scorer):
assert scorer(array("u", "the wonderful new york mets"), "the wonderful new york mets")


@pytest.mark.parametrize("scorer", hashable_scorers)
@pytest.mark.parametrize("scorer", scorers)
def test_bytes(scorer):
"""
bytes should be supported and treated in a compatible way to strings
Expand Down

0 comments on commit 6b24ce8

Please sign in to comment.