Hypothesis

Latest version: v6.122.3

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

Scan your dependencies

Page 208 of 210

0.3.2

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

* Fix a bug where if you specified floats_in_range with integer arguments
Hypothesis would error in example simplification.
* Improve the statistical distribution of the floats you get for the
floats_in_range strategy. I'm not sure whether this will affect users in
practice but it took my tests for various conditions from flaky to rock
solid so it at the very least improves discovery of the artificial cases
I'm looking for.
* Improved repr() for strategies and RandomWithSeed instances.
* Add detection for flaky test cases where hypothesis managed to find an
example which breaks it but on the final invocation of the test it does
not raise an error. This will typically happen with too much recursion
errors but could conceivably happen in other circumstances too.
* Provide a "derandomized" mode. This allows you to run hypothesis with
zero real randomization, making your build nice and deterministic. The
tests run with a seed calculated from the function they're testing so you
should still get a good distribution of test cases.
* Add a mechanism for more conveniently defining tests which just sample
from some collection.
* Fix for a really subtle bug deep in the internals of the strategy table.
In some circumstances if you were to define instance strategies for both
a parent class and one or more of its subclasses you would under some
circumstances get the strategy for the wrong superclass of an instance.
It is very unlikely anyone has ever encountered this in the wild, but it
is conceivably possible given that a mix of namedtuple and tuple are used
fairly extensively inside hypothesis which do exhibit this pattern of
strategy.

0.3.1

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

* Support for generation of frozenset and Random values
* Correct handling of the case where a called function mutates it argument.
This involved introducing a notion of a strategies knowing how to copy
their argument. The default method should be entirely acceptable and the
worst case is that it will continue to have the old behaviour if you
don't mark your strategy as mutable, so this shouldn't break anything.
* Fix for a bug where some strategies did not correctly implement
could_have_produced. It is very unlikely that any of these would have
been seen in the wild, and the consequences if they had been would have
been minor.
* Re-export the given decorator from the main hypothesis namespace. It's
still available at the old location too.
* Minor performance optimisation for simplifying long lists.

0.3.0

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

* Complete redesign of the data generation system. Extreme breaking change
for anyone who was previously writing their own SearchStrategy
implementations. These will not work any more and you'll need to modify
them.
* New settings system allowing more global and modular control of Verifier
behaviour.
* Decouple SearchStrategy from the StrategyTable. This leads to much more
composable code which is a lot easier to understand.
* A significant amount of internal API renaming and moving. This may also
break your code.
* Expanded available descriptors, allowing for generating integers or
floats in a specific range.
* Significantly more robust. A very large number of small bug fixes, none
of which anyone is likely to have ever noticed.
* Deprecation of support for pypy and python 3 prior to 3.3. 3.3 and 3.4.
Supported versions are 2.7.x, 3.3.x, 3.4.x. I expect all of these to
remain officially supported for a very long time. I would not be
surprised to add pypy support back in later but I'm not going to do so
until I know someone cares about it. In the meantime it will probably
still work.

0.2.2

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

* Fix an embarrassing complete failure of the installer caused by my being
bad at version control

0.2.1

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

* Fix a bug in the new stateful testing feature where you could make
__init__ a requires method. Simplification would not always work if the
prune method was able to successfully shrink the test.

0.2.0

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

* It's aliiive.
* Improve python 3 support using six.
* Distinguish between byte and unicode types.
* Fix issues where FloatStrategy could raise.
* Allow stateful testing to request constructor args.
* Fix for issue where test annotations would timeout based on when the
module was loaded instead of when the test started

Page 208 of 210

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.