# test_name.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 "script code" that invokes the test procedure when this module is run as an script.""" import cornelltest # cornelltest assert functions from name import * # function to be tested def test_last_name_first(): """Test procedure for last_name_first(n)""" cornelltest.assert_equals('White, Walker', last_name_first('Walker White')) cornelltest.assert_equals('White, Walker', last_name_first('Walker White')) # Script code # Will add if... in class lecture test_last_name_first() print 'Module name is working correctly'