aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index d0e5d48..1d27e96 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1,5 +1,5 @@
import pytest
-from fuzzycat.utils import slugify_string, cut
+from fuzzycat.utils import slugify_string, cut, author_similarity_score
def test_slugify_string():
@@ -21,3 +21,8 @@ def test_cut():
assert cut(3, sep=',')("a,b,c") == ""
with pytest.raises(ValueError):
cut(3, sep=',', ignore_missing_column=False)("a,b,c") == ""
+
+def test_author_similarity_score():
+ assert author_similarity_score("", "") == 0.0
+ assert author_similarity_score("Gregor Samsa", "G. Samsa") == 0.42857142857142855
+ assert author_similarity_score("Geronimo Samsa", "G. Samsa") == 0.375