构建用于创建zope.testing测试运行程序的配方
tranchitella.recipe.testrunner的Python项目详细描述
tranchitella.recipe.testrunner
此配方创建支持代码的zope.testing测试运行程序脚本 使用coveragepython库进行覆盖率分析。
使用量
配方支持以下选项:
鸡蛋
The eggs option specified a list of eggs to test given as one ore more setuptools requirement strings. Each string must be given on a separate line.
脚本名称
The script option gives the name of the script to generate, in the buildout bin directory. Of the option isn’t used, the part name will be used.
额外路径
One or more extra paths to include in the generated test script.
默认值
The defaults option lets you specify testrunner default options.
工作目录
The working-directory option lets to specify a directory where the tests will run. The testrunner will change to this directory when run. If the working directory is the empty string or not specified at all, the recipe will create a working directory among the parts.
环境
A set of environment variables that should be exported before starting the tests.
初始化
Provide initialization code to run before running tests.
相对路径
Use egg, test, and working-directory paths relative to the test script.
这是一个最小的“buildout.cfg”文件,用于创建测试运行程序:
[test] recipe = tranchitella.recipe.testrunner eggs = myapplication [test-coverage] recipe = tranchitella.recipe.testrunner eggs = myapplication defaults = ['--coverage-module', 'myapplication', '--coverage-branch']
更改
0.4(2010-08-24)
- 更新了代码以依赖于zope.testrunner而不是zope.testing。
0.3(2010-06-14)
- 添加了一个新选项(–coverage html)来运行html coverage命令
0.2(2010-04-22)
- 添加了一个新选项(–coverage annotate)来运行annotate coverage 命令。
- 添加了一个新选项(–coverage xml)来运行xml_report coverage命令。
0.1(2010-04-22)
- 第一个版本,从zc.recipe.testrunner派生。