Skip to content

Commit 15bd161

Browse files
authored
Merge pull request #1268 from Kaggle/rapidfuzz_test
Add rapidfuzz existence test
2 parents 6ad0d7f + 4310e5b commit 15bd161

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/test_rapidfuzz.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import unittest
2+
3+
# needed for the Word Error Rate metric:
4+
# competitions/metrics/python/deployed_metrics/general_use_metrics/word_error_rate.py
5+
import rapidfuzz
6+
7+
class TestRapidfuzz(unittest.TestCase):
8+
def test_distance(self):
9+
distance = rapidfuzz.distance.Levenshtein.distance(
10+
'Levenshtein', 'Lenvinsten'
11+
)
12+
13+
self.assertEqual(4, distance)

0 commit comments

Comments
 (0)