Skip to main content

buildout recipe to create scripts to run testrepository.

Project description

testr recipe

This allows you to easily add a testrepository script to your buildout
project. This really only means that the user doesn't have to have
testr on their path, and they can just use ./bin/test or simlar.

This works very similarly to zc.recipe.testrunner, and in fact borrows
most of its code from there.

A sample buildout configuration would be::

develop = .
parts = test

recipe = testr_recipe
script = test

which will have ./bin/test run using the .testr.conf in your root

These are the options you can use:

* script: define the name of the script to create, if not passed
then the name of the section will be used.
* working-directory: if somewhere other than the root of the project
should be used.
* environment: the name of a section containing pairs of values to
put in the environment for the test run, e.g.


recipe = testr_recipe
enironment = testenv

foo = bar
zap = zang

* initialization: a string containing python code to put in the test
script before testr is run.
* executable: the python executable to put in the #! of the script.
* defaults: a list of options to prepend sys.argv for testr.
These are specified as Python source for an expression yielding a list,
typically a list literal. One thing you can do with this is::

parts = test testr

recipe = testr_recipe

recipe = testr_recipe
defaults = ["run"]

which will make ./bin/test run the tests, and allow you to use
./bin/testr to access all the features of testr.

Future enhancments:

* Maybe automatically doing "testr init" when setting up the project, so that
./bin/test works straight away.
* Automatically generate a .testr.conf using standard mechanisms.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for testr_recipe, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size testr_recipe-0.2-py2.6.egg (5.4 kB) File type Egg Python version 2.6 Upload date Hashes View
Filename, size testr_recipe-0.2.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page