def test_another_reverse(self):
		self.assertEqual(".sdrawkcab etirw ot ;drah s'tI", lab3.reverse("It's hard; to write backwards."))
	def test_on_reverse(self):
		self.assertEqual("olleH", lab3.reverse("Hello").__str__())
		self.assertEqual("dLrOw oLleH", lab3.reverse("HelLo wOrLd").__str__())
		self.assertEqual("!OLLEH", lab3.reverse("HELLO!").__str__())
		self.assertEqual("", lab3.reverse(0).__str__())
	def test_reverse(self):
		self.assertEqual("I'm full.", lab3.reverse(".lluf m'I"))
 def test_reverse(self):
     self.assertEqual(lab3.reverse("aardvark"), "kravdraa")
     self.assertEqual(lab3.reverse("3245 4478"), "8744 5423")
     self.assertEqual(lab3.reverse(32454478), "")
     self.assertEqual(lab3.reverse("I HATE DINO!!!  "), "  !!!ONID ETAH I")
	def test_reverseletters(self):
		self.assertEqual("cba", lab3.reverse("abc"))
		self.assertEqual("!olleh", lab3.reverse("hello!"))
Exemple #6
0
	def test_reverse_error(self):
		self.assertRaises(TypeError, lambda: lab3.reverse(12345))
Exemple #7
0
	def test_reverse_exception(self):
		with self.assertRaises(Exception): lab3.reverse("I love you.")
Exemple #8
0
	def test_reverse_nameperiod(self):
		self.assertEqual(lab3.reverse("Name."), ".emaN")
Exemple #9
0
	def test_reverse_name(self):
		self.assertEqual(lab3.reverse("Name"), "emaN")
	def test_reverse(self):
		self.assertEqual("lluf", lab3.reverse("full"))
		self.assertEqual("", lab3.reverse(3))