utpython runs unit tests in python.
it automatically discovers testcases by looking for files in the current directory whose names start with 'test'. Those files are loaded as modules. Any classes with names that start with 'test' and that have methods that start with 'test' are executed. Any free functions that start with 'test' are executed.
the output from test.bat should look like:
test.py(77) : ?(): FAILED: actual: '0' expected: '1' test.py(50) : test_bob(): FAILED: actual: '1' expected: '0' test.py(53) : test_jack(): FAILED: actual: '22' expected: '23' test.py(71) : test_bob(): FAILED: actual: 't2' expected: 'test1' test.py(0) : test_excp_test(): FAILED: threw exception: integer division or modulo by zero test.py(0) : test_excp_test2(): FAILED: threw exception: system.Exception test.py(0) : test_excp_test3(): FAILED: threw exception: myexception test.py(17) : test_nulls_in_strings(): FAILED: actual: '' expected: 'None' test.py(19) : test_nulls_in_strings(): FAILED: actual: 'None' expected: '' test.py(7) : test_simple(): FAILED: actual: '1' expected: '0' test.py(11) : test_simple(): FAILED: actual: 's1' expected: 's2' test.py(86) : test_strings(): FAILED: actual: 'x' expected: 'y' Number of Files : 1 Number of Classes : 2 Number of Functions : 6 Number of Methods : 3 Number of Asserts : 19 Number of Errors : 9 Number of Exceptions: 3
| Contact me about content on this page using john_web-at-arrizza-dot-com |
| For Web Master or site problems contact: webadmin-at-arrizza-dot-com |
| Copyright John Arrizza (c) 2001-2010 |