def test_sentence(self):
     self.assertEqual(reverse_str('This is a useful instance '
                                  'of Test-Driven Development.'),
                      '.tnempoleveD nevirD-tseT fo ecnatsni lufesu '
                      'a si sihT')
 def test_empty(self):
     self.assertEqual(reverse_str(''), '')
 def test_awesome(self):
     self.assertEqual(reverse_str('awesome'), 'emosewa')
 def test_race_car(self):
     self.assertEqual(reverse_str('race car'), 'rac ecar')
示例#5
0
 def test_empty(self):
     self.assertEqual(reverse_str(''), '')
 def test_single(self):
     self.assertEqual(reverse_str('q'), 'q')
示例#7
0
 def test_sentence(self):
     self.assertEqual(
         reverse_str('This is a useful instance '
                     'of Test-Driven Development.'),
         '.tnempoleveD nevirD-tseT fo ecnatsni lufesu '
         'a si sihT')
示例#8
0
 def test_busters(self):
     self.assertEqual(reverse_str('busters'), 'sretsub')
示例#9
0
 def test_race_car(self):
     self.assertEqual(reverse_str('race car'), 'rac ecar')
示例#10
0
 def test_awesome(self):
     self.assertEqual(reverse_str('awesome'), 'emosewa')
示例#11
0
 def test_single(self):
     self.assertEqual(reverse_str('q'), 'q')
示例#12
0
def test_reverse_sentence():
    assert reverse.reverse_str('this is a test') == 'tset a si siht'
示例#13
0
def test_reverse_string():
    assert reverse.reverse_str('brian') == 'nairb'