github HypothesisWorks/hypothesis hypothesis-python-6.62.0
Hypothesis for Python - version 6.62.0

latest releases: hypothesis-python-6.104.2, hypothesis-python-6.104.1, hypothesis-python-6.104.0...
18 months ago

A classic error when testing is to write a test function that can
never fail, even on inputs that aren't allowed or manually provided.
By analogy to the design pattern of:

@pytest.mark.parametrize("arg", [
..., # passing examples
pytest.param(..., marks=[pytest.mark.xfail]) # expected-failing input
])

we now support "@example(...).xfail()", with the same (optional)
"condition", "reason", and "raises" arguments as
"pytest.mark.xfail()".

Naturally you can also write ".via(...).xfail(...)", or
".xfail(...).via(...)", if you wish to note the provenance of
expected-failing examples.

The canonical version of these notes (with links) is on readthedocs.

Don't miss a new hypothesis release

NewReleases is sending notifications on new releases.