[TIP] Invoking tests
fuzzyman at voidspace.org.uk
Wed Jul 28 05:08:14 PDT 2010
On 28/07/2010 13:05, Olemis Lang wrote:
> 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
>> 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)
Thanks - I might look at that to see which is the best way to integrate
unittest2. Unfortunately the answer may be "all of them".
merwork (Eric somebody-or-other) has provided me with a pure distutils
test command which I may go with instead whilst waiting for distutils2.
Once I've reached a sane stopping point with unittest plugins I will
READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
More information about the testing-in-python