Skip to content

Commit

Permalink
Merge pull request #1268 from Kaggle/rapidfuzz_test
Browse files Browse the repository at this point in the history
Add rapidfuzz existence test
  • Loading branch information
ryanholbrook committed Jun 30, 2023
2 parents 6ad0d7f + 4310e5b commit 15bd161
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_rapidfuzz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import unittest

# needed for the Word Error Rate metric:
# competitions/metrics/python/deployed_metrics/general_use_metrics/word_error_rate.py
import rapidfuzz

class TestRapidfuzz(unittest.TestCase):
def test_distance(self):
distance = rapidfuzz.distance.Levenshtein.distance(
'Levenshtein', 'Lenvinsten'
)

self.assertEqual(4, distance)

0 comments on commit 15bd161

Please sign in to comment.