def test_empty_strings(self): distance = LevensteinMetric(3, 2, 4).distance("", "") self.assertEqual(distance, 0)
def test_regress2(self): distance = LevensteinMetric(3, 2, 4).distance("abracadabra", "abacaba") self.assertEqual(distance, 8)
def test_empty_vs_notempty_strings2(self): distance = LevensteinMetric(3, 2, 4).distance("abracadabra", "") self.assertEqual(distance, 22)
def test_change_letter(self): distance = LevensteinMetric(3, 2, 4).distance("abacaba", "abadaba") self.assertEqual(distance, 4)
def test_empty_vs_notempty_strings1(self): distance = LevensteinMetric(3, 2, 4).distance("", "abacaba") self.assertEqual(distance, 21)