Пример #1
0
 def test_char_rot_13(self):
     char1 = 'a'
     char2 = 'A'
     char3 = 'n'
     char4 = 'N'
     self.assertEqual(char.char_rot_13(char1), 'n')
     self.assertEqual(char.char_rot_13(char2), 'N')
     self.assertEqual(char.char_rot_13(char3), 'a')
     self.assertEqual(char.char_rot_13(char4), 'A')
Пример #2
0
    def test_rot1(self):
        x = 'g'
        self.assertEqual(char.char_rot_13(x), 't')

        pass
Пример #3
0
 def test_rot(self):
     x = 'a'
     self.assertEqual(char.char_rot_13(x), 'n')
Пример #4
0
 def test_rot_13_2(self):
     string = char.char_rot_13("N")
     self.assertEqual(string, "A")
Пример #5
0
 def test_rot_13_1(self):
     string = char.char_rot_13("a")
     self.assertEqual(string, "n")
Пример #6
0
 def test_char_rot_13_2(self):
     string = "A"
     rot_13 = char.char_rot_13(string)
     self.assertEqual(rot_13, "N")
Пример #7
0
 def test_char_rot_13_1(self):
     string = "a"
     rot_13 = char.char_rot_13(string)
     self.assertEqual(rot_13, "n")
Пример #8
0
def str_rot_13(string):
    new_list = [char_rot_13(elem) for elem in string]
    return ''.join(new_list)
Пример #9
0
 def test_char_rot_13_2(self):
     char_rot = char.char_rot_13('B')
     self.assertEqual(char_rot, 'O')
Пример #10
0
 def test_char_rot_13(self):
     char_rot = char.char_rot_13('a')
     self.assertEqual(char_rot, 'n')