# testname.py # Walker M. White (wmw2) # August 31, 2012 """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 "application code" that invokes the test procedure when this module is run as an application.""" import cunittest # cunittest assert functions from name import * # function to be tested def test_last_name_first(): """Test procedure for last_name_first(n)""" cunittest.assert_equals('White, Walker', last_name_first('Walker White')) cunittest.assert_equals('White, Walker', last_name_first('Walker White')) # Application code if __name__ == '__main__': test_last_name_first() print 'Module name is working correctly'