def test_overlap_1(self):
     self.assertAlmostEqual(overlap("levenshtein","leuwenhstijn"), 0.636, 3)
 def test_overlap_identity(self):
     self.assertEqual(overlap("a","a"), 1.0)
 def test_overlap_symmetry(self):
     self.assertEqual(overlap("ab","bc"), overlap("bc","ab"))
 def test_overlap_empty_2(self):
     self.assertEqual(overlap("a",""), 0.0)
 def test_overlap_empty_3(self):
     self.assertEqual(overlap("","a"), 0.0)
 def test_overlap_1(self):
     self.assertAlmostEqual(overlap("levenshtein", "leuwenhstijn"), 0.636,
                            3)
 def test_overlap_symmetry(self):
     self.assertEqual(overlap("ab", "bc"), overlap("bc", "ab"))
 def test_overlap_identity(self):
     self.assertEqual(overlap("a", "a"), 1.0)
 def test_overlap_empty_3(self):
     self.assertEqual(overlap("", "a"), 0.0)
Exemple #10
0
 def test_overlap_empty_2(self):
     self.assertEqual(overlap("a", ""), 0.0)