Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 171 of 210

3.48.0

Not secure
-------------------

This release improves some "unhappy paths" when using Hypothesis
with the standard library :mod:`python:unittest` module:

- Applying :func:`given <hypothesis.given>` to a non-test method which is
overridden from :class:`python:unittest.TestCase`, such as ``setUp``,
raises :attr:`a new health check <hypothesis.HealthCheck.not_a_test_method>`.
(:issue:`991`)
- Using :meth:`~python:unittest.TestCase.subTest` within a test decorated
with :func:`given <hypothesis.given>` would leak intermediate results
when tests were run under the :mod:`python:unittest` test runner.
Individual reporting of failing subtests is now disabled during a test
using :func:`given <hypothesis.given>`. (:issue:`1071`)
- :func:`given <hypothesis.given>` is still not a class decorator, but the
error message if you try using it on a class has been improved.

As a related improvement, using :class:`django:django.test.TestCase` with
:func:`given <hypothesis.given>` instead of
:class:`hypothesis.extra.django.TestCase` raises an explicit error instead
of running all examples in a single database transaction.

3.47.0

Not secure
-------------------

:obj:`~hypothesis.settings.register_profile` now accepts keyword arguments
for specific settings, and the parent settings object is now optional.
Using a ``name`` for a registered profile which is not a string was never
suggested, but it is now also deprecated and will eventually be an error.

3.46.2

Not secure
-------------------

This release removes an unnecessary branch from the code, and has no user-visible impact.

3.46.1

Not secure
-------------------

This changes only the formatting of our docstrings and should have no user-visible effects.

3.46.0

Not secure
-------------------

:func:`~hypothesis.strategies.characters` has improved docs about
what arguments are valid, and additional validation logic to raise a
clear error early (instead of e.g. silently ignoring a bad argument).
Categories may be specified as the Unicode 'general category'
(eg ``'Nd'``), or as the 'major category' (eg ``['N', 'Lu']``
is equivalent to ``['Nd', 'Nl', 'No', 'Lu']``).

In previous versions, general categories were supported and all other
input was silently ignored. Now, major categories are supported in
addition to general categories (which may change the behaviour of some
existing code), and all other input is deprecated.

3.45.5

Not secure
-------------------

This patch improves strategy inference in ``hypothesis.extra.django``
to account for some validators in addition to field type - see
:issue:`1116` for ongoing work in this space.

Specifically, if a :class:`~django:django.db.models.CharField` or
:class:`~django:django.db.models.TextField` has an attached
:class:`~django:django.core.validators.RegexValidator`, we now use
:func:`~hypothesis.strategies.from_regex` instead of
:func:`~hypothesis.strategies.text` as the underlying strategy.
This allows us to generate examples of the default
:class:`~django:django.contrib.auth.models.User` model, closing :issue:`1112`.

Page 171 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.