/py-hypothesis, Python library for property based testing
3.7.0, Package name:
py27-hypothesis-3.7.0, Maintainer: pkgsrc-users
Hypothesis is a library for testing your Python code against a much
larger range of examples than you would ever want to write by hand.
It's based on the Haskell library, Quickcheck, and is designed to
integrate seamlessly into your existing Python unit testing work
Hypothesis is both extremely practical and also advances the state
of the art of unit testing by some way. It's easy to use, stable,
and extremely powerful. If you're not using Hypothesis to test your
project then you're missing out.
Required to run:
] Required to build:
Master sites: SHA1:
Version history: (Expand)
- (2017-04-20) Updated to version: py27-hypothesis-3.7.0
- (2017-01-01) Updated to version: py27-hypothesis-3.6.1
- (2016-11-07) Updated to version: py27-hypothesis-3.6.0
- (2016-10-19) Updated to version: py27-hypothesis-3.5.3
- (2016-08-24) Updated to version: py27-hypothesis-3.4.2
- (2016-08-22) Updated to version: py27-hypothesis-3.1.0nb1
CVS history: (Expand)
| 2017-04-19 19:27:15 by Thomas Klausner | Files touched by this commit (2) | |
Updated py-hypothesis to 3.7.0.
3.7.0 - 2017-03-20
This is a feature release.
Rule based stateful testing now has an @invariant decorator that specifies \
methods that are run after init and after every step, allowing you to encode \
properties that should be true at all times. Thanks to Tom Prince for this \
The decimals strategy now supports allow_nan and allow_infinity flags.
There are significantly more strategies available for numpy, including for \
generating arbitrary data types. Thanks to Zac Hatfield Dodds for this feature.
When using the data() strategy you can now add a label as an argument to \
draw(), which will be printed along with the value when an example fails. Thanks \
to Peter Inglesby for this feature.
Bug fix: @composite now preserves functions’ docstrings.
The build is now reproducible and doesn’t depend on the path you build it \
from. Thanks to Chris Lamb for this feature.
numpy strategies for the void data type did not work correctly. Thanks to \
Zac Hatfield Dodds for this fix.
There have also been a number of performance optimizations:
The permutations() strategy is now significantly faster to use for large \
lists (the underlying algorithm has gone from O(n^2) to O(n)).
Shrinking of failing test cases should have got significantly faster in some \
circumstances where it was previously struggling for a long time.
Example generation now involves less indirection, which results in a small \
speedup in some cases (small enough that you won’t really notice it except in \
| 2017-01-01 16:35:12 by Thomas Klausner | Files touched by this commit (2) |
| 2016-11-07 12:10:24 by Thomas Klausner | Files touched by this commit (2) | |
Updated py-hypothesis to 3.6.0.
3.6.0 - 2016-10-31
This release reverts Hypothesis to its old pretty printing of lambda
functions based on attempting to extract the source code rather
than decompile the bytecode. This is unfortunately slightly inferior
in some cases and may result in you occasionally seeing things like
lambda x: <unknown> in statistics reports and strategy reprs.
This removes the dependencies on uncompyle6, xdis and spark-parser.
The reason for this is that the new functionality was based on
uncompyle6, which turns out to introduce a hidden GPLed dependency
- it in turn depended on xdis, and although the library was licensed
under the MIT license, it contained some GPL licensed source code
and thus should have been released under the GPL.
My interpretation is that Hypothesis itself was never in violation
of the GPL (because the license it is under, the Mozilla Public
License v2, is fully compatible with being included in a GPL licensed
work), but I have not consulted a lawyer on the subject. Regardless
of the answer to this question, adding a GPLed dependency will
likely cause a lot of users of Hypothesis to inadvertently be in
violation of the GPL.
As a result, if you are running Hypothesis 3.5.x you really should
upgrade to this release immediately.
| 2016-10-19 14:45:00 by Thomas Klausner | Files touched by this commit (1) |
Add a comment about possible dependencies.
| 2016-10-19 14:42:56 by Thomas Klausner | Files touched by this commit (3) | |
Updated py-hypothesis to 3.5.3.
3.5.3 - 2016-10-05
This is a bug fix release.
If the same test was running concurrently in two processes and there were \
examples already in the test database which no longer failed, Hypothesis would \
sometimes fail with a FileNotFoundError (IOError on Python 2) because an example \
it was trying to read was deleted before it was read. (Issue #372).
Drawing from an integers() strategy with both a min_value and a max_value \
would reject too many examples needlessly. Now it repeatedly redraws until \
satisfied. (Pull request #366. Thanks to Calen Pennington for the contribution).
3.5.2 - 2016-09-24
This is a bug fix release.
The Hypothesis pytest plugin broke pytest support for doctests. Now it doesn’t.
3.5.1 - 2016-09-23
This is a bug fix release.
Hypothesis now runs cleanly in -B and -BB modes, avoiding mixing bytes and \
unittest.TestCase tests would now have shown up in the new statistics mode. \
Now they do.
Similarly, stateful tests would not have shown up in statistics and now they do.
Statistics now print with pytest node IDs (the names you’d get in pytest \
3.5.0 - 2016-09-22
This is a feature release.
fractions() and decimals() strategies now support min_value and max_value \
parameters. Thanks go to Anne Mulhern for the development of this feature.
The Hypothesis pytest plugin now supports a –hypothesis-show-statistics \
parameter that gives detailed statistics about the tests that were run. Huge \
thanks to Jean-Louis Fuchs and Adfinis-SyGroup for funding the development of \
There is a new event() function that can be used to add custom statistics.
Additionally there have been some minor bug fixes:
In some cases Hypothesis should produce fewer duplicate examples (this will \
mostly only affect cases with a single parameter).
py.test command line parameters are now under an option group for Hypothesis \
(thanks to David Keijser for fixing this)
Hypothesis would previously error if you used function annotations on your \
tests under Python 3.4.
The repr of many strategies using lambdas has been improved to include the \
lambda body (this was previously supported in many but not all cases).
| 2016-08-24 12:20:35 by Thomas Klausner | Files touched by this commit (3) | |
Updated py-hypothesis to 3.4.2.
3.4.2 - 2016-07-13
This is a bug fix release, fixing a number of problems with the settings system:
Test functions defined using @given can now be called from other threads \
Attempting to delete a settings property would previously have silently done \
the wrong thing. Now it raises an AttributeError.
Creating a settings object with a custom database_file parameter was \
silently getting ignored and the default was being used instead. Now it’s not.
3.4.1 - 2016-07-07
This is a bug fix release for a single bug:
On Windows when running two Hypothesis processes in parallel (e.g. using \
pytest-xdist) they could race with each other and one would raise an exception \
due to the non-atomic nature of file renaming on Windows and the fact that you \
can’t rename over an existing file. This is now fixed.
3.4.0 - 2016-05-27
This release is entirely provided by Lucas Wiman:
models() strategies from hypothesis.extra.django will now respect much more of \
Django’s validations out of the box. Wherever possible full_clean() should \
The max_length, blank and choices kwargs are now respected.
Add support for DecimalField.
If a field includes validators, the list of validators are used to filter \
the field strategy.
3.3.0 - 2016-05-27
This release went wrong and is functionally equivalent to 3.2.0. Ignore it.
3.2.0 - 2016-05-19
This is a small single-feature release:
All tests using @given now fix the global random seed. This removes the \
health check for that. If a non-zero seed is required for the final falsifying \
example, it will be reported. Otherwise Hypothesis will assume randomization was \
not a significant factor for the test and be silent on the subject. If you use \
the random_module() strategy this will continue to work and will always display \
3.1.3 - 2016-05-01
Single bug fix release
Another charmap problem. In 3.1.2 text/characters would break on systems \
which had /tmp/ mounted on a different partition than the Hypothesis storage \
directory (usually in home). This fixes that.
3.1.2 - 2016-04-30
Single bug fix release:
Anything which used a text() or characters() strategy was broken on Windows \
and I hadn’t updated appveyor to use the new repository location so I didn’t \
notice. This is now fixed and windows support should work correctly.
3.1.1 - 2016-04-29
Minor bug fix release.
Fix concurrency issue when running tests that use text() from multiple \
processes at once (Bug #302, thanks to Alex Chan).
Improve performance of code using lists with max_size (thanks to Cristi \
Fix install on Python 2 with ancient versions of pip so that it installs the \
enum34 backport (thanks to Donald Stufft for telling me how to do this).
Remove duplicated __all__ exports from hypothesis.strategies (thanks to \
Update headers to point to new repository location.
Allow use of strategies that can’t be used in find() (e.g. choices) in \
| 2016-08-22 15:16:16 by Thomas Klausner | Files touched by this commit (1) | |
Add missing py-sqlite3 dependency. Bump PKGREVISION.
| 2016-06-08 19:49:20 by Thomas Klausner | Files touched by this commit (15) |
Switch to MASTER_SITE_PYPI.