Skip to content

Commit be26a60

Browse files
authored
hopefully fix regressions
1 parent ae01246 commit be26a60

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/distance/test_distance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ def test_similar_array(scorer):
5959
"""
6060
assert (
6161
scorer.normalized_similarity(
62-
array("w", "the wonderful new york mets"),
63-
array("w", "the wonderful new york mets"),
62+
array("w", "the wonderful new york mets".encode("utf-32")),
63+
array("w", "the wonderful new york mets".encode("utf-32")),
6464
)
6565
== 1.0
6666
)
67-
assert scorer.normalized_similarity("the wonderful new york mets", array("w", "the wonderful new york mets")) == 1.0
68-
assert scorer.normalized_similarity(array("w", "the wonderful new york mets"), "the wonderful new york mets") == 1.0
67+
assert scorer.normalized_similarity("the wonderful new york mets", array("w", "the wonderful new york mets").encode("utf-32")) == 1.0
68+
assert scorer.normalized_similarity(array("w", "the wonderful new york mets").encode("utf-32"), "the wonderful new york mets") == 1.0
6969

7070

7171
@pytest.mark.parametrize("scorer", all_scorer_modules)

tests/test_fuzz.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ def test_array(scorer):
262262
"""
263263
# todo add support in pure python implementation
264264
assert scorer(
265-
array("w", "the wonderful new york mets"),
266-
array("w", "the wonderful new york mets"),
265+
array("w", "the wonderful new york mets").encode("utf-32"),
266+
array("w", "the wonderful new york mets").encode("utf-32"),
267267
)
268-
assert scorer("the wonderful new york mets", array("w", "the wonderful new york mets"))
269-
assert scorer(array("w", "the wonderful new york mets"), "the wonderful new york mets")
268+
assert scorer("the wonderful new york mets", array("w", "the wonderful new york mets").encode("utf-32"))
269+
assert scorer(array("w", "the wonderful new york mets").encode("utf-32"), "the wonderful new york mets")
270270

271271

272272
@pytest.mark.parametrize("scorer", scorers)

0 commit comments

Comments
 (0)