Example #1
0
	def test_another_reverse(self):
		self.assertEqual(".sdrawkcab etirw ot ;drah s'tI", lab3.reverse("It's hard; to write backwards."))
Example #2
0
	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__())
Example #3
0
	def test_reverse(self):
		self.assertEqual("I'm full.", lab3.reverse(".lluf m'I"))
Example #4
0
 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")
Example #5
0
	def test_reverseletters(self):
		self.assertEqual("cba", lab3.reverse("abc"))
		self.assertEqual("!olleh", lab3.reverse("hello!"))
Example #6
0
	def test_reverse_error(self):
		self.assertRaises(TypeError, lambda: lab3.reverse(12345))
Example #7
0
	def test_reverse_exception(self):
		with self.assertRaises(Exception): lab3.reverse("I love you.")
Example #8
0
	def test_reverse_nameperiod(self):
		self.assertEqual(lab3.reverse("Name."), ".emaN")
Example #9
0
	def test_reverse_name(self):
		self.assertEqual(lab3.reverse("Name"), "emaN")
Example #10
0
	def test_reverse(self):
		self.assertEqual("lluf", lab3.reverse("full"))
		self.assertEqual("", lab3.reverse(3))