[TIP] Invoking tests

Olemis Lang olemis at gmail.com
Wed Jul 28 05:05:37 PDT 2010

On Sat, Jul 24, 2010 at 1:28 PM, Michael Foord
<fuzzyman at voidspace.org.uk> wrote:
> On 24/07/2010 18:31, Joseph Heck wrote:
>> Is there a standard convention, or even a growing one, around where and
>> how to invoke the tests associated with a project? In many projects, I'm
>> seeing it bundled into a Make, a separate test.py script at the top level of
>> the project, etc to do the work.
>> I looked around for some common thing with setup.py, but didn't spot
>> anything there (granted, I didn't look hard). What's common and best
>> practice?
> Well, if you use unittest2 you can just use the unit2 test runner to run
> your tests:
> unit2 discover
> There *is* integration with the setuptools test command, but it isn't ideal
> as it uses unittest to run your unittest2 based tests (so things like test
> skips or expected failures aren't reported correctly).

It is always possible to use one of --test-suite , --test-loader or
--test-runner options in order to use any other test suite, loader,
runner (using setuptools>=0.7.xxx ;o)



Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

More information about the testing-in-python mailing list