def test_case_1(self): self.assertEqual(program.levenshteinDistance("", ""), 0)
1 import program 2 import unittest 3 4 5 class TestProgram(unittest.TestCase): 6 7 def test_case_1(self): 8 self.assertEqual(program.levenshteinDistance("", ""), 0) 9 10 def test_case_2(self): 11 self.assertEqual(program.levenshteinDistance("", "abc"), 3) 12 13 def test_case_3(self): 14 self.assertEqual(program.levenshteinDistance("abc", "abc"), 0) 15 16
def test_case_14(self): self.assertEqual(program.levenshteinDistance("abc", "yabd"), 2)
def test_case_15(self): self.assertEqual(program.levenshteinDistance("xabc", "abcx"), 2)
def test_case_12(self): self.assertEqual(program.levenshteinDistance("cereal", "saturdzz"), 7)
def test_case_13(self): self.assertEqual( program.levenshteinDistance("abbbbbbbbb", "bbbbbbbbba"), 2)
def test_case_10(self): self.assertEqual(program.levenshteinDistance("biting", "mitten"), 4)
def test_case_9(self): self.assertEqual( program.levenshteinDistance("abcdefghij", "a234567890"), 9)
def test_case_7(self): self.assertEqual( program.levenshteinDistance("algoexpert", "algozexpert"), 1)
def test_case_4(self): self.assertEqual(program.levenshteinDistance("abc", "abx"), 1)
def test_case_2(self): self.assertEqual(program.levenshteinDistance("", "abc"), 3)