Example #1
0
 def test_overlap_1(self):
     self.assertAlmostEqual(overlap("levenshtein","leuwenhstijn"), 0.636, 3)
Example #2
0
 def test_overlap_identity(self):
     self.assertEqual(overlap("a","a"), 1.0)
Example #3
0
 def test_overlap_symmetry(self):
     self.assertEqual(overlap("ab","bc"), overlap("bc","ab"))
Example #4
0
 def test_overlap_empty_2(self):
     self.assertEqual(overlap("a",""), 0.0)
Example #5
0
 def test_overlap_empty_3(self):
     self.assertEqual(overlap("","a"), 0.0)
Example #6
0
 def test_overlap_1(self):
     self.assertAlmostEqual(overlap("levenshtein", "leuwenhstijn"), 0.636,
                            3)
Example #7
0
 def test_overlap_symmetry(self):
     self.assertEqual(overlap("ab", "bc"), overlap("bc", "ab"))
Example #8
0
 def test_overlap_identity(self):
     self.assertEqual(overlap("a", "a"), 1.0)
Example #9
0
 def test_overlap_empty_3(self):
     self.assertEqual(overlap("", "a"), 0.0)
Example #10
0
 def test_overlap_empty_2(self):
     self.assertEqual(overlap("a", ""), 0.0)