Beispiel #1
0
def test_insert():
    assert levenstein.dist("tree", "three") == 1
Beispiel #2
0
def test_different():
    assert levenstein.dist("java", "php") == 4
Beispiel #3
0
def test_equals():
    assert levenstein.dist("python", "python") == 0
Beispiel #4
0
def test_two_letters():
    assert levenstein.dist("boat", "board") == 2
Beispiel #5
0
 def test1(self):
     a = 'Lost'
     b = 'Ghost'
     self.assertEqual(dist(a, b), 3)
Beispiel #6
0
 def test4(self):
     a = 'OneTwoThree'
     b = 'FourFiveSix'
     self.assertEqual(dist(a, b), 11)
Beispiel #7
0
 def test3(self):
     a = 'It\'s alive'
     b = 'It\'s a lion'
     self.assertEqual(dist(a, b), 3)
Beispiel #8
0
 def test2(self):
     a = 'Two sodas'
     b = 'Foos ro dah'
     self.assertEqual(dist(a, b), 6)