pythonic库用于同一测试套件的quickcheck样式随机测试和smallcheck样式穷举测试。

doublecheck的Python项目详细描述


以两种不同方式进行基于属性的测试的库:

  1. “快速检查”-随机生成的输入
  2. “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’

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java程序运行时错误   JavaAndroidStudio:与往常一样,四舍五入到next.5或.0   apache使用Java以表单数据形式上载文件   带矢量的java Freeflight相机如何正确旋转?   java如何以编程方式检索有关当前项目的语言、操作系统、体系结构等信息   java Twitter4J tweet实体?   java PdfBox编码异常   java在拖动未装饰的舞台时,如何强制光标停留在窗口上   JavaSpring注释扫描优化   java无法通过IntelliJ Idea在tomcat上运行服务   java在生命周期中如何拦截请求?   java中的数组返回错误