Simple Python Unit Test Runner
An intuitive command line and Python package interface for Python's unit testing framework with consistent behavior across Python versions.
sputr
sputr dirname
sputr filename.py
sputr dirname/filename.py
* may be used as a wildcard.
sputr test_name
sputr test_name_*
sputr.discover
returns a TestSuite.
import sputr
suite = sputr.discover(start_dir='.', pattern='test_*')
unittest.TextTestRunner().run(suite)
sputr.list_tests
converts a TestSuite to a list of TestCase objects which can be iterated over easily.
for test in sputr.list_tests(suite):
print test.id()