跳转到主要内容

Hypothesis属性测试的命令行界面

项目描述

hypothit

PyPI badge Documentation Status CI badge

Hypothesis属性测试的命令行界面

$ 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

致谢

此包是用Cookiecutteraudreyr/cookiecutter-pypackage创建的。

历史

0.1.0 (2019-05-01)

  • 首次发布在PyPI。

项目详情


下载文件

为您的平台下载文件。如果您不确定选择哪个,请了解安装包的更多信息。

源分布

hypothit-0.1.0.tar.gz (14.8 kB 查看哈希值)

上传时间:

构建分布

hypothit-0.1.0-py2.py3-none-any.whl (9.9 kB 查看哈希值)

上传于 Python 2 Python 3

由以下支持