This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chelmite
Recipients chelmite
Date 2021-04-16.05:39:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618551542.77.0.0261778711624.issue43860@roundup.psfhosted.org>
In-reply-to
Content
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.)
History
Date User Action Args
2021-04-16 05:39:02chelmitesetrecipients: + chelmite
2021-04-16 05:39:02chelmitesetmessageid: <1618551542.77.0.0261778711624.issue43860@roundup.psfhosted.org>
2021-04-16 05:39:02chelmitelinkissue43860 messages
2021-04-16 05:39:01chelmitecreate