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

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