what test runner should I use?

Discussion in 'Python' started by Chris Withers, Jan 19, 2010.

  1. 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

    - should work with zc.buildout (preferably without a specialist recipe!)

    So far I've tried the following with the resultant problems:


    - requires a special recipe to be useful
    - now emits deprecation warnings from itself:
    - 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


    - 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?


    Chris Withers, Jan 19, 2010
    1. Advertisements

  2. Chris Withers

    Lacrima Guest

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

    parts = 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.
    Lacrima, Jan 21, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.