utpython : Unit Test driver for python using inspection

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.


Source files: http://arrizza.org/public-hg/arrizza.org-src/file/tip//ut/utpython

Changes

  1. Initial Release

Installation

  1. None.

Notes

The output from 'python utrun.py should look like:
  test_selftest.py(77) : (): FAILED: actual: '0' expected: '1'
  test_selftest.py(50) : test_bob(): FAILED: actual: '1' expected: '0'
  test_selftest.py(53) : test_jack(): FAILED: actual: '22' expected: '23'
  test_selftest.py(71) : test_bob(): FAILED: actual: 't2' expected: 'test1'
  test_selftest.py(0) : test_excp_test(): FAILED: threw exception: integer division or modulo by zero
  test_selftest.py(0) : test_excp_test2(): FAILED: threw exception: system.Exception
  test_selftest.py(0) : test_excp_test3(): FAILED: threw exception: ('m', 'y', 'e', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n')
  test_selftest.py(17) : test_nulls_in_strings(): FAILED: actual: '' expected: 'None'
  test_selftest.py(19) : test_nulls_in_strings(): FAILED: actual: 'None' expected: ''
  test_selftest.py(7) : test_simple(): FAILED: actual: '1' expected: '0'
  test_selftest.py(11) : test_simple(): FAILED: actual: 's1' expected: 's2'
  test_selftest.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 at domain1-at-arrizza-dot-com
Copyright John Arrizza (c) 2001-2013