Ejemplo n.º 1
0
 def test_one_away_change_char(self):
     string = "pale"
     string_perm = "bale"
     self.assertTrue(one_away(string, string_perm))
Ejemplo n.º 2
0
 def test_one_away_reomve_two_char(self):
     string = "pale"
     string_perm = "pa"
     self.assertFalse(one_away(string, string_perm))
Ejemplo n.º 3
0
 def test_one_away_add_char_diff_location(self):
     string = "pasle"
     string_perm = "pale"
     self.assertTrue(one_away(string, string_perm))
Ejemplo n.º 4
0
 def test_one_away_add_two_char(self):
     string = "pale"
     string_perm = "paless"
     self.assertFalse(one_away(string, string_perm))
Ejemplo n.º 5
0
 def test_one_away_add_char_diff_order(self):
     string = "pales"
     string_perm = "pale"
     self.assertTrue(one_away(string, string_perm))