Path to this page:
./
devel/py-hypothesis,
Python library for property based testing
Branch: CURRENT,
Version: 6.115.5,
Package name: py312-hypothesis-6.115.5,
Maintainer: pkgsrc-usersHypothesis 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
flow.
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:[
devel/py-setuptools] [
devel/py-attrs] [
devel/py-sortedcontainers] [
lang/python37]
Required to build:[
pkgtools/cwrappers]
Master sites:
Filesize: 398.286 KB
Version history: (Expand)
- (2024-10-24) Updated to version: py312-hypothesis-6.115.5
- (2024-09-16) Updated to version: py312-hypothesis-6.112.1
- (2024-08-27) Updated to version: py312-hypothesis-6.111.2
- (2024-08-04) Updated to version: py311-hypothesis-6.108.6
- (2024-07-19) Updated to version: py311-hypothesis-6.108.2
- (2024-07-04) Updated to version: py311-hypothesis-6.104.2
CVS history: (Expand)
2024-04-19 15:10:08 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-hypothesis: updated to 6.100.1
6.100.1
This patch improve a rare error message for flaky tests.
6.100.0
The from_dtype() function no longer generates NaT (“not-a-time”) values for \
the datetime64 or timedelta64 dtypes if passed allow_nan=False.
6.99.13
This patch includes the backend setting in the how_generated field of our \
observability output.
6.99.12
If you were running Python 3.13 (currently in alpha) with pytest-xdist and then \
attempted to pretty-print a lambda functions which was created using the eval() \
builtin, it would have raised an AssertionError. Now you’ll get "lambda \
...: <unknown>", as expected.
6.99.11
This release improves an internal invariant.
6.99.10
This patch fixes Hypothesis sometimes raising a Flaky error when generating \
collections of unique floats containing nan.
|
2024-02-17 19:51:48 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-hypothesis: updated to 6.98.6
6.98.6
This patch clarifies the documentation on stateful testing.
6.98.5
This patch improves argument-to-json conversion for observability output. \
Checking for a .to_json() method on the object before a few other options like \
dataclass support allows better user control of the process.
6.98.4
This patch updates our vendored list of top-level domains, which is used by the \
provisional domains() strategy.
|
2024-02-09 13:50:10 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-hypothesis: updated to 6.98.3
6.98.3
This patch fixes an error when generating observability reports involving large \
(n > 1e308) integers.
6.98.2
This patch refactors some internals. There is no user-visible change.
6.98.1
This release improves our distribution of generated values for all strategies, \
by doing a better job of tracking which values we have generated before and \
avoiding generating them again.
For example, st.lists(st.integers()) previously generated ~5 each of [] [0] in \
100 examples. In this release, each of [] and [0] are generated ~1-2 times each.
6.98.0
This release deprecates use of the global random number generator while drawing \
from a strategy, because this makes test cases less diverse and prevents us from \
reporting minimal counterexamples.
If you see this new warning, you can get a quick fix by using randoms(); or use \
more idiomatic strategies sampled_from(), floats(), integers(), and so on.
Note that the same problem applies to e.g. numpy.random, but for performance \
reasons we only check the stdlib random module - ignoring even other sources \
passed to register_random().
6.97.6
This patch updates our vendored list of top-level domains, which is used by the \
provisional domains() strategy.
6.97.5
This patch adds some observability information about how many times predicates \
in assume() or precondition() were satisfied, so that downstream tools can warn \
you if some were never satisfied by any test case.
6.97.4
This patch improves formatting and adds some cross-references to our docs.
|
2024-01-30 21:45:45 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-hypothesis: updated to 6.97.3
6.97.3
Internal test refactoring.
6.97.2
This patch slightly changes how we replay examples from the database: if the \
behavior of the saved example has changed, we now keep running the test case \
instead of aborting at the size of the saved example. While we know it’s not \
the same example, we might as well continue running the test!
Because we now finish running a few more examples for affected tests, this might \
be a slight slowdown - but correspondingly more likely to find a bug.
We’ve also applied similar tricks to the target phase, where they are a pure \
performance improvement for affected tests.
6.97.1
Improves the performance of the arrays() strategy when generating unique values.
|
2024-01-25 11:58:23 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-hypothesis: updated to 6.97.0
6.97.0
Changes the distribution of sampled_from() when sampling from a Flag. \
Previously, no-flags-set values would never be generated, and all-flags-set \
values would be unlikely for large enums. With this change, the distribution is \
more uniform in the number of flags set.
6.96.4
This patch slightly refactors some internals. There is no user-visible change.
6.96.3
This patch fixes a spurious warning about slow imports when \
HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY was set.
6.96.2
This patch refactors some more internals, continuing our work on supporting \
alternative backends (issue 3086). There is no user-visible change.
6.96.1
Fix a spurious warning seen when running pytest’s test suite, caused by never \
realizing we got out of initialization due to imbalanced hook calls.
6.96.0
Warns when constructing a repr that is overly long. This can happen by accident \
if stringifying arbitrary strategies, and is expensive in time and memory. The \
associated deferring of these long strings in sampled_from() should also lead to \
improved performance.
|
2024-01-16 07:06:02 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-hypothesis: updated to 6.93.2
6.93.2
This patch improves observability reports by moving timing information from \
metadata to a new timing key, and supporting conversion of additional argument \
types to json rather than string reprs via a .to_json() method (including e.g. \
Pandas dataframes).
Additionally, the too_slow health check will now report which strategies were \
slow, e.g. for strategies a, b, c, …:
count | fraction | slowest draws (seconds)
a | 3 | 65% | -- -- -- 0.357, 2.000
b | 8 | 16% | 0.100, 0.100, 0.100, 0.111, 0.123
c | 3 | 8% | -- -- 0.030, 0.050, 0.200
(skipped 2 rows of fast draws)
6.93.1
This patch refactors some internals, continuing our work on supporting \
alternative backends. There is no user-visible change.
6.93.0
The from_lark() strategy now accepts an alphabet= argument, which is passed \
through to from_regex(), so that you can e.g. constrain the generated strings to \
a particular codec.
In support of this feature, from_regex() will avoid generating optional parts \
which do not fit the alphabet. For example, from_regex(r"abc|def", \
alphabet="abcd") was previously an error, and will now generate only \
'abc'. Cases where there are no valid strings remain an error.
6.92.9
This patch refactors some internals, continuing our work on supporting \
alternative backends. There is no user-visible change.
6.92.8
This patch adds a test statistics event when a generated example is rejected via \
assume.
This may also help with distinguishing gave_up examples in observability.
6.92.7
This introduces the rewriting of length filters on some collection strategies.
Thanks to Reagan Lee for implementing this feature!
6.92.6
If a test uses sampled_from() on a sequence of strategies, and raises a \
TypeError, we now add a note asking whether you meant to use one_of().
|
2024-01-08 20:58:31 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-hypothesis: updated to 6.92.5
6.92.5
This patch registers explicit strategies for a handful of builtin types, \
motivated by improved introspection in PyPy 7.3.14 triggering existing internal \
warnings. Thanks to Carl Friedrich Bolz-Tereick for helping us work out what \
changed!
6.92.4
This patch fixes an error when writing observability reports without a \
pre-existing .hypothesis directory.
6.92.3
This patch adds a new environment variable \
HYPOTHESIS_EXPERIMENTAL_OBSERVABILITY_NOCOVER, which turns on observability data \
collection without collecting code coverage data, which may be faster on Python \
3.11 and earlier.
6.92.2
This patch updates our vendored list of top-level domains, which is used by the \
provisional domains() strategy.
6.92.1
This patch fixes a bug introduced in version 6.92.0, where using the data() \
strategy would fail to draw a dataclass() with a defaultdict field. This was due \
to a bug in the standard library which was fixed in 3.12, so we’ve vendored \
the fix.
|
2023-12-11 21:51:28 by Adam Ciarcinski | Files touched by this commit (1) |
Log message:
py-hypothesis: add TOOL_DEPENDS
|