modify get_formatted_name()but that would become tedious fortunatelypython provides an efficient way to automate the testing of function' output if we automate the testing of get_formatted_name()we can always be confident that the function will work when given the kinds of names we've written tests for unit tests and test cases the module unittest from the python standard library provides tools for testing your code unit test verifies that one specific aspect of function' behavior is correct test case is collection of unit tests that together prove that function behaves as it' supposed towithin the full range of situations you expect it to handle good test case considers all the possible kinds of input function could receive and includes tests to represent each of these situations test case with full coverage includes full range of unit tests covering all the possible ways you can use function achieving full coverage on large project can be daunting it' often good enough to write tests for your code' critical behaviors and then aim for full coverage only if the project starts to see widespread use passing test the syntax for setting up test case takes some getting used tobut once you've set up the test case it' straightforward to add more unit tests for your functions to write test case for functionimport the unittest module and the function you want to test then create class that inherits from unittest testcaseand write series of methods to test different aspects of your function' behavior here' test case with one method that verifies that the function get_formatted_name(works correctly when given first and last nametest_name_ function py import unittest from name_function import get_formatted_name class namestestcase(unittest testcase)"""tests for 'name_function py"" def test_first_last_name(self)"""do names like 'janis joplinwork?""formatted_name get_formatted_name('janis''joplin'self assertequal(formatted_name'janis joplin'unittest main(firstwe import unittest and the function we want to testget_formatted_ name(at we create class called namestestcasewhich will contain series of unit tests for get_formatted_name(you can name the class anything you testing your code