Example #1
0
 def test_hello(self):
     friend_name = "Pepe"
     assert hello(friend_name) == "Hello, %s!" % friend_name
Example #2
0
 def test_hello(self):
     self.assertTrue("Hello" in hello("Bob"))
Example #3
0
 def test_hello_no_arg(self):
     self.assertTrue("Hello" in hello())
Example #4
0
 def test_hello(self):
     self.assertEqual(hello('Mihai'), 'Hello, Mihai!')
Example #5
0
    def test_hello_outputs_correct_name(self):
        result = hello('John')

        self.assertEqual('Hello, John!', result)
Example #6
0
 def test_hello(self):
     self.assertEqual(hello("John"), "Hello, John!")
     self.assertEqual(hello(""), "Hello, !")
Example #7
0
 def test_hello_return_type(self):
     self.assertTrue(isinstance(hello("world"), str))
Example #8
0
def test_hello(friend, expected):
    h = hello(friend)
    assert h == "Hello, {}!".format(expected)