Saturday, September 10. 2005
What I want from a (unit)test module
Comments
Display comments as
(Linear | Threaded)
Although it does not currently do what you want, you still might want to look a py.test, part of the "py lib" (http://codespeak.net/py/). It is easy to modify nearly any part of py.test with configuration files that can totally change the behaviour. Plus it has lots of other nifty features.
Phillip Eby wrote about the extensibility of Python's unittest module here:
http://dirtsimple.org/2005/08/ruby-gems-python-eggs-and-beauty-of.html
It seems to me that you could create a custom TestRunner that does what you want for the first requirement. The second requirement could probably be accomplished with a subclass of TestCase that counts up calls to its assertion methods.
Kevin
In py.test you can create a generator which yields individual tests, which can be used to much the same effect as monitoring every assert.
Add Comment
Owner login
