New submission from Steve Kelem <st...@kelem.net>:

The unittest module (and most other unittest modules) keep a count of the 
number of functional tests run, as defined by the number of times testXXXX is 
called.

I would like the option to count the number of times that assertXXXX is called.

I have to run many tests (in unittest's sense of the word), but each of the 
tests consists of iterating through an array of hundreds or thousands of 
individual test cases with their expected results. These check for corner 
cases, interior, exterior cases, and for mathematical accuracy. It doesn't make 
sense to make a separate test case for each test value, when iterating through 
an array of values, and calling AssertEquals (or whatever is called for) for 
each expected & actual value-pair.
Yes, the existing methodology tells me that a particular functional test works, 
but it is important to know whether it passed based on a single test value 
(because the test development is not done or the tester was lazy) or whether it 
passed thousands of tests and will give adequate coverage. (Yes that can be 
cheated too, but assume that the tests are developed in earnest.)

----------
components: Tests
messages: 391166
nosy: chelmite
priority: normal
severity: normal
status: open
title: unittest increment tests executed
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43860>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to