Hypothesis

Latest version: v6.122.3

Safety actively analyzes 688587 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 42 of 210

6.62.0

-------------------

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 :obj:`example(...).xfail() <hypothesis.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.

6.61.3

-------------------

This patch teaches our enhanced :func:`~typing.get_type_hints` function to
'see through' :obj:`~functools.partial` application, allowing inference
from type hints to work in a few more cases which aren't (yet!) supported
by the standard-library version.

6.61.2

-------------------

This patch improves our pretty-printing of failing examples, including
some refactoring to prepare for exciting future features.

6.61.1

-------------------

This patch brings our :func:`~hypothesis.provisional.domains` and
:func:`~hypothesis.strategies.emails` strategies into compliance with
:rfc:`RFC 5890 §2.3.1 <5890>`: we no longer generate parts-of-domains
where the third and fourth characters are ``--`` ("R-LDH labels"),
though future versions *may* deliberately generate ``xn--`` punycode
labels. Thanks to :pypi:`python-email-validator` for `the report
<https://github.com/JoshData/python-email-validator/issues/92>`__!

6.61.0

-------------------

This release improves our treatment of database keys, which based on (among other things)
the source code of your test function. We now post-process this source to ignore
decorators, comments, trailing whitespace, and blank lines - so that you can add
:obj:`example() <hypothesis.example>`\ s or make some small no-op edits to your code
without preventing replay of any known failing or covering examples.

6.60.1

-------------------

This patch updates our vendored `list of top-level domains <https://www.iana.org/domains/root/db>`__,
which is used by the provisional :func:`~hypothesis.provisional.domains` strategy.

Page 42 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.