Пример #1
0
 def test_0123456789_returns_01234(self):
     actual = first_half("0123456789")
     expected = "01234"
     self.assertEqual(
         actual, expected,
         'Expected calling first_half() with "0123456789" to return "01234"'
     )
Пример #2
0
 def test_hellothere_returns_hello(self):
     actual = first_half("HelloThere")
     expected = "Hello"
     self.assertEqual(
         actual, expected,
         'Expected calling first_half() with "HelloThere" to return "Hello"'
     )
Пример #3
0
 def test_woohoo_returns_woo(self):
     actual = first_half("WooHoo")
     expected = "Woo"
     self.assertEqual(
         actual, expected,
         'Expected calling first_half() with "WooHoo" to return "Woo"')
Пример #4
0
 def test_kitten_returns_kit(self):
     actual = first_half("kitten")
     expected = "kit"
     self.assertEqual(
         actual, expected,
         'Expected calling first_half() with "kitten" to return "kit"')
Пример #5
0
 def test_blank_returns_blank(self):
     actual = first_half("")
     expected = ""
     self.assertEqual(actual, expected,
                      'Expected calling first_half() with "" to return ""')
Пример #6
0
 def test_ab_returns_a(self):
     actual = first_half("ab")
     expected = "a"
     self.assertEqual(
         actual, expected,
         'Expected calling first_half() with "ab" to return "a"')