Hypothesis

Latest version: v6.104.0

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

Scan your dependencies

Page 60 of 198

6.12.0

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

This release automatically rewrites some simple filters, such as
``integers().filter(lambda x: x > 9)`` to the more efficient
``integers(min_value=10)``, based on the AST of the predicate.

We continue to recommend using the efficient form directly wherever
possible, but this should be useful for e.g. :pypi:`pandera` "``Checks``"
where you already have a simple predicate and translating manually
is really annoying. See :issue:`2701` for ideas about floats and
simple text strategies.

6.11.0

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

:func:`hypothesis.target` now returns the ``observation`` value,
allowing it to be conveniently used inline in expressions such as
``assert target(abs(a - b)) < 0.1``.

6.10.1

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

This patch fixes a deprecation warning if you're using recent versions
of :pypi:`importlib-metadata` (:issue:`2934`), which we use to load
:ref:`third-party plugins <entry-points>` such as `Pydantic's integration
<https://pydantic-docs.helpmanual.io/hypothesis_plugin/>`__.
On older versions of :pypi:`importlib-metadata`, there is no change and
you don't need to upgrade.

6.10.0

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

This release teaches the :doc:`Ghostwriter <ghostwriter>` to read parameter
types from Sphinx, Google, or Numpy-style structured docstrings, and improves
some related heuristics about how to test scientific and numerical programs.

6.9.2

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

This release improves the :doc:`Ghostwriter's <ghostwriter>` handling
of exceptions, by reading ``:raises ...:`` entries in function docstrings
and ensuring that we don't suppresss the error raised by test assertions.

6.9.1

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

This patch updates our autoformatting tools, improving our code style without any API changes.

Page 60 of 198

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.