Ejemplo n.º 1
0
 def test_numbers_as_input(self):
     self.assertFalse(is_palindrome(u"123123023"))
Ejemplo n.º 2
0
 def test_empty_string(self):
     self.assertFalse(is_palindrome(u""))
Ejemplo n.º 3
0
 def test_single_letter(self):
     self.assertTrue(is_palindrome(u"A"))
Ejemplo n.º 4
0
 def test_mixed_casing_input(self):
     self.assertTrue(is_palindrome(u"Air An aRIa."))
Ejemplo n.º 5
0
 def test_punctuation_in_input(self):
     self.assertTrue(is_palindrome(u"A man, a plan, a cat, a ham, a yak, a yam, a hat, " "a canal-Panama!"))
Ejemplo n.º 6
0
 def test_not_unicode_2(self):
     with self.assertRaises(AssertionError):
         is_palindrome(2)
Ejemplo n.º 7
0
 def test_not_unicode(self):
     with self.assertRaises(AssertionError):
         is_palindrome("A but tuba.")