Unittest testing assert*() calls rather than methods?
python.list at tim.thechases.com
Wed Sep 28 10:16:59 EDT 2011
While I asked this on the Django list as it happened to be with
some Django testing code, this might be a more generic Python
question so I'll ask here too.
When performing unittest tests, I have a number of methods of the
data = (
... #bunch of tests for fence-post errors
for test, result in data:
When I run my tests, I only get a tick for running one the one
test (test_foo), not the len(data) tests that were actually
performed. Is there a way for unittesting to report the number
of passed-assertions rather than the number of test-methods run?
More information about the Python-list