[Python-ideas] Adding a test discovery into Python
aahz at pythoncraft.com
Mon Feb 2 00:37:41 CET 2009
On Sun, Feb 01, 2009, Christian Heimes wrote:
> I'm +1 for a simple (!) test discovery system. I'm emphasizing on simple
> because there are enough frameworks for elaborate unit testing.
> Such a tool should
> - find all modules and packages named 'tests' for a given package name
> - load all subclasses of unittest.TestCase from 'tests' module or
> '*/tests/test*.py' files
> - support some basic filtering for test cases or test functions
> Do we need more features?
Depends on whether the above features find doctests. In my previous job
(got laid off a month ago), I'd say that about eighty percent of test
suites were doctests (harder to guess the percentage by line counts), and
many of these were substantial. I think that doctests are one of the
killer Python features that make it easy to do testing, and I think it's
critical that all core testing tools support them.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Weinberg's Second Law: If builders built buildings the way programmers wrote
programs, then the first woodpecker that came along would destroy civilization.
More information about the Python-ideas