# test2.py # Walker M. White (wmw2) # August 30, 2016 """Unit test for the module name This module illustrates what a unit test should look like. It is testing a single function in the module name, and therefore has a single test procedure. It also has a segment of "script code" that invokes the test procedure when this module is run as an script.""" import cornelltest # cornelltest assert functions import name # function to be tested def test_last_name_first(): """Test procedure for last_name_first(n)""" print 'Testing last_name_first' # Test case 1 result = name.last_name_first('Walker White') cornelltest.assert_equals('White, Walker',result) # Test case 2 result = name.last_name_first('Walker White') cornelltest.assert_equals('White, Walker',result) # Script code #test_last_name_first() print 'Module name is working correctly'