what test runner should I use?

Lacrima lacrima.maxim at gmail.com
Thu Jan 21 15:58:58 EST 2010


On Jan 19, 12:56 pm, Chris Withers <ch... at simplistix.co.uk> wrote:
> Hi All,
>
> I'm wondering what test runner I should use. Here's my list of requirements:
>
> - cross platform (I develop for and on Windows, Linux and Mac)
>
> - should not prevent tests from running with other test runners
>    (so no plugins/layers/etc that only work with one specific test
>     runner)
>
> - should work with zc.buildout (preferably without a specialist recipe!)
>
> So far I've tried the following with the resultant problems:
>
> zope.testing
>
>   - requires a special recipe to be useful
>   - now emits deprecation warnings from itself:
>    https://mail.zope.org/pipermail/zope-dev/2009-December/038965.html
>   - coverage support is baroque to put it politely
>
> twisted's trial
>
>   - only has old-style script definition in setup.py, so doesn't work
>     with buildout without hackery
>
>   - drops _twisted_trial folders all over the place and doesn't clear
>     them up
>
> nose
>
>   - can't see to get it to run only my packages tests, rather than
>     including the tests of packages my package depends on
>
>   - seems to be focused towards files rather than modules
>     (which makes it not play nicely with buildout)
>
>   - seems to be difficult to provide options to at configuration time
>     that can then be overridden on the command line
>
> I did also look at py.test's homepage but found it pretty scary.
>
> What other options do people recommend?
> Failing that, any ideas how to fix the problems above?
>
> cheers,
>
> Chris

Nose should work pretty well with buildout. You need this in your
buildout.cfg

[buildout]
parts = test

[test]
recipe = pbp.recipe.noserunner
eggs = yourpackage1 yourpackage2

This will generate test script (bin/test), which will search and run
tests only in packages, specified in eggs option.



More information about the Python-list mailing list