基于假设属性测试的命令行界面

hypothit的Python项目详细描述


下击

PyPI badgeDocumentation StatusCI badge

基于假设属性测试的命令行界面

$ hypothit trial --given "a=integers()" --assume 'a!=0' "assert a==42"
from hypothesis import given, assume
from hypothesis.strategies import integers


@given(a=integers())
def inner(a):
    assume(a!=0)
    assert a==42

inner()

Falsifying example: inner(a=1)
Traceback (most recent call last):
File ".../hypothit/cli.py", line 90, in trial
    exec(src, g)
File "<string>", line 10, in <module>
File "<string>", line 6, in inner
File ".../hypothesis/core.py", line 1024, in wrapped_test
    raise the_error_hypothesis_found
File "<string>", line 8, in inner
AssertionError

学分

这个包是用Cookiecutter,&;audreyr/cookiecutter-pypackage剪切的。

历史记录

0.1.0(2019-05-01)

  • pypi上的第一个版本。

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

推荐PyPI第三方库


热门话题
正则表达式Java使用关键字拆分字符串   Neo4j Java API模式索引范围查找?   java访问JButton[]   java如何混淆tomcat日志文件中的请求属性   apache运行CGI Java程序   java从一个Eclipse插件开始,我如何通过编程使Eclipse编辑某个文件?   从php中的SQL数据库到Java中的多个值作为单独的变量   java如何在多个osgi捆绑包之间共享资源   datetime Java time,无法从历元秒解析年份   java无法在安卓应用程序中使用morpho指纹扫描仪设备捕获指纹   java使用groovy/ratpack发送电子邮件   javascript在jsp页面中添加验证,但在控制台中仍然显示一些错误   java如何修复com。mysql。jdbc。DocsConnectionPropsHelper   java AlertDialog dispatchTouchEvent