[Python-ideas] Adding a test discovery into Python

Christian Heimes lists at cheimes.de
Sun Feb 1 23:29:21 CET 2009

Guilherme Polo schrieb:
> So.. is there any chance we can enter in agreement what features would
> be useful in a test discovery that could be included with Python ? I
> for myself do not have fancy wishes for this one, I would be happy
> with something that would collect unittests, inside packages and
> subpackages, with some fixed patterns and let me run them with
> test.test_support.run_unittests, or maybe something that would collect
> unittests and doctests and have something like run_tests in
> test.test_support. But then I believe this wouldn't be good enough to
> substitute any of the current tools, making the addition mostly
> useless.

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?


More information about the Python-ideas mailing list