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::
[buildout]
develop = .
parts = test
[test]
recipe = testr_recipe
script = test
which will have ./bin/test run using the .testr.conf in your root
dir.
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.
::
[test]
recipe = testr_recipe
enironment = testenv
[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::
[buildout]
parts = test testr
[testr]
recipe = testr_recipe
[test]
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.
Creating the .testr.conf automatically
--------------------------------------
Given that buildout knows most things about your project you can
have it create the .testr.conf for you.
[testr]
recipe = testr_recipe
test-packages = mypackage
interpreter = python
Future enhancments:
* Maybe automatically doing "testr init" when setting up the project, so that
./bin/test works straight away.
============
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::
[buildout]
develop = .
parts = test
[test]
recipe = testr_recipe
script = test
which will have ./bin/test run using the .testr.conf in your root
dir.
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.
::
[test]
recipe = testr_recipe
enironment = testenv
[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::
[buildout]
parts = test testr
[testr]
recipe = testr_recipe
[test]
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.
Creating the .testr.conf automatically
--------------------------------------
Given that buildout knows most things about your project you can
have it create the .testr.conf for you.
[testr]
recipe = testr_recipe
test-packages = mypackage
interpreter = python
Future enhancments:
* Maybe automatically doing "testr init" when setting up the project, so that
./bin/test works straight away.
Metadata
Release files for testr_recipe 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| testr_recipe-0.3.tar.gz | 4.0 kB | Without provenance | Details |
Release files / testr_recipe-0.3.tar.gz
| Download URL | testr_recipe-0.3.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07b77e9f044ce232e52862f20734c76b50d94a1e0a6574fc183ee2826ecedcd2
|
|
BLAKE2b-256 checksum How to use checksums |
0da6334d3008f35bf5ba80fec2522cdb638b4ad4dab6e5def5470b70b4eee7a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for testr_recipe 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.