def test_reverstring(): result = RS.Reverse_string('kenya') assert result == 'aynek'
def test_reverse_string(self): self.assertEquals(ReverseString.reverse_string("Hello"), 'olleH')
def palindrome(x): if ReverseString.reverseString2(x)==x: return True else: return False
def palindrome2(x): return ReverseString.reverseString2(x)==x #Now if you just added a check to see if it's a valid word, it's good to go (would need a word list for that).
def test_rev(self): result = ReverseString.rev("Hello there everyone") result2 = ReverseString.reverseList(result) self.assertEqual(result2, "olleH ereht enoyreve")
def test_rev3(self): result = ReverseString.rev("Day Time Year Month") result2 = ReverseString.reverseList(result) self.assertEqual(result2, "yaD emiT raeY htnoM")
def test_rev2(self): result = ReverseString.rev("My name is Adam") result2 = ReverseString.reverseList(result) self.assertEqual(result2, "yM eman si madA")