pythonic库用于同一测试套件的quickcheck样式随机测试和smallcheck样式穷举测试。
doublecheck的Python项目详细描述
以两种不同方式进行基于属性的测试的库:
- “快速检查”-随机生成的输入
- “smallcheck”-完全枚举的输入
这些测试方法以开创性的haskell库命名。两个 当一个属性被发现是 一些可能巨大而疯狂的随机输入驳斥了这一点,它通常是值得投资的。 找到最小反例的CPU时间。
此库是一个全新的正在进行的工作(有关日期,请参见提交日志),其中 问题:
- Does not have randomly generated strings just yet.
- No existential quantification yet, but smallcheck does allow it!
- Needs more thorough testing.
- Needs to be able to test that a property always throws an exception.
- Needs lots more combinators.
- Needs one-liner interface rather than checking status of test cases.
安装和使用
(待办事项:请详细描述。现在,请阅读doublecheck/gen.py和doublecheck/prop.py)
$ pip install doublecheck $ python >>> from doublecheck import * >>> ForAll(lambda i: i > 0, PosInts()).quickcheck(100000).status ‘Certain’
版权和许可证
版权所有2012-Kenneth Knowles
根据apache许可证2.0版(以下简称“许可证”)授权;您不能使用 此文件与许可证不符。您可以获得 许可证位于
http://www.apache.org/licenses/LICENSE-2.0
除非适用法律要求或书面同意,否则软件将被分发 根据许可证,是按“原样”分发的,没有保证或 任何形式的条件,无论是明示的还是默示的。查看许可证 管理许可下的权限和限制的特定语言。