Up to [cvs.NetBSD.org] / pkgsrc / devel / py-hypothesis
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.123 / (download) - annotate - [select for diffs], Mon Sep 18 05:56:32 2023 UTC (5 days, 22 hours ago) by adam
CVS Tags: HEAD
Changes since 1.122: +4 -4 lines
Diff to previous 1.122 (colored)
py-hypothesis: updated to 6.86.1 6.86.1 This patch improves the documentation of @example(...).xfail() by adding a note about PEP 614, similar to @example(...).via(), and adds a warning when a strategy generates a test case which seems identical to one provided by an xfailed example. 6.86.0 This release enables the explain phase by default. We hope it helps you to understand why your failing tests have failed! 6.85.1 This patch switches some of our type annotations to use typing.Literal when only a few specific values are allowed, such as UUID or IP address versions. 6.85.0 This release deprecates the old whitelist/blacklist arguments to characters(), in favor of include/exclude arguments which more clearly describe their effects on the set of characters which can be generated. You can use Hypothesis„ŗcodemods to automatically upgrade to the new argument names. In a future version, the old names will start to raise a DeprecationWarning. 6.84.3 This patch automatically disables the differing_executors health check for methods which are also pytest parametrized tests, because those were mostly false alarms. 6.84.2 Building on recent releases, characters() now accepts _any_ codec=, not just "utf-8" and "ascii". This includes standard codecs from the codecs module and their aliases, platform specific and user-registered codecs if they are available, and python-specific text encodings (but not text transforms or binary transforms). 6.84.1 This patch by Reagan Lee makes st.text(...).filter(str.isidentifier) return an efficient custom strategy. 6.84.0 The from_regex() strategy now takes an optional alphabet=characters(codec="utf-8") argument for unicode strings, like text(). This offers more and more-consistent control over the generated strings, removing previously-hard-coded limitations. With fullmatch=False and alphabet=characters(), surrogate characters are now possible in leading and trailing text as well as the body of the match. Negated character classes such as [^A-Z] or \S had a hard-coded exclusion of control characters and surrogate characters; now they permit anything in alphabet= consistent with the class, and control characters are permitted by default.
Revision 1.122 / (download) - annotate - [select for diffs], Fri Aug 25 11:08:48 2023 UTC (4 weeks, 1 day ago) by adam
Changes since 1.121: +4 -4 lines
Diff to previous 1.121 (colored)
py-hypothesis: updated to 6.82.6 6.82.6 This patch enables and fixes many more of ruff„ŗŌ‘ lint rules. 6.82.5 Fixes the error message for missing [cli] extra. 6.82.4 This patch ensures that we always close the download connection in GitHubArtifactDatabase. 6.82.3 We can now pretty-print combinations of zero enum.Flag values, like SomeFlag(0), which has never worked before.
Revision 1.121 / (download) - annotate - [select for diffs], Mon Aug 7 05:22:59 2023 UTC (6 weeks, 5 days ago) by adam
Changes since 1.120: +4 -5 lines
Diff to previous 1.120 (colored)
py-hypothesis: updated to 6.82.2 6.82.2 This patch fixes pretty-printing of combinations of enum.Flag values, which was previously an error
Revision 1.120 / (download) - annotate - [select for diffs], Sun Aug 6 07:17:09 2023 UTC (6 weeks, 6 days ago) by adam
Changes since 1.119: +4 -4 lines
Diff to previous 1.119 (colored)
py-hypothesis: updated to 6.82.1 6.82.1 Improve shrinking of floats in narrow regions that don„ŗ—’ cross an integer boundary.
Revision 1.119 / (download) - annotate - [select for diffs], Sat Jul 29 15:36:28 2023 UTC (8 weeks ago) by adam
Changes since 1.118: +2 -1 lines
Diff to previous 1.118 (colored)
py-hypothesis: fix build with Python 3.8
Revision 1.118 / (download) - annotate - [select for diffs], Thu Jul 20 07:59:05 2023 UTC (2 months ago) by adam
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)
py-hypothesis: updated to 6.82.0 6.81.2 If the HYPOTHESIS_NO_PLUGINS environment variable is set, we„ŗ—Õl avoid loading plugins such as the old Pydantic integration or HypoFuzz„ŗCLI options. This is probably only useful for our own self-tests, but documented in case it might help narrow down any particularly weird bugs in complex environments. 6.81.1 Fixes some lingering issues with inference of recursive types in ~hypothesis.strategies.from_type. 6.81.0 This release further improves our .patch-file support from version 6.75, skipping duplicates, tests which use data() (and don„ŗ—’ support @example()), and various broken edge-cases. Because libCST has released version 1.0 which uses the native parser by default, we no longer set the LIBCST_PARSER_TYPE=native environment variable. If you are using an older version, you may need to upgrade or set this envvar for yourself. 6.80.1 This patch updates some internal code for selftests. There is no user-visible change. 6.80.0 This release drops support for Python 3.7, which reached end of life on 2023-06-27. 6.79.4 Fixes occasional recursion-limit-exceeded errors when validating deeply nested strategies. 6.79.3 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.79.2 Improve the type rendered in from_type(), which improves the coverage of Ghostwriter. 6.79.1 We now test against Python 3.12 beta in CI, and this patch fixes some new deprecations. 6.79.0 This release changes register_type_strategy() for compatibility with PEP 585: we now store only a single strategy or resolver function which is used for both the builtin and the typing module version of each type. If you previously relied on registering separate strategies for e.g. list vs typing.List, you may need to use explicit strategies rather than inferring them from types.
Revision 1.117 / (download) - annotate - [select for diffs], Fri Jun 16 08:40:28 2023 UTC (3 months, 1 week ago) by adam
CVS Tags: pkgsrc-2023Q2-base, pkgsrc-2023Q2
Changes since 1.116: +4 -4 lines
Diff to previous 1.116 (colored)
py-hypothesis: updated to 6.78.3 6.78.3 This release ensures that Ghostwriter does not use the deprecated aliases for the collections.abc classes in collections. 6.78.2 This patch improves Ghostwriter„ŗ—‘ use of qualified names for re-exported functions and classes, and avoids importing useless TypeVars. 6.78.1 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.78.0 New input validation for recursive() will raise an error rather than hanging indefinitely if passed invalid max_leaves= arguments. 6.77.0 from_type() now handles numpy array types: np.typing.ArrayLike, np.typing.NDArray, and parameterized versions including np.ndarray[shape, elem_type]. 6.76.0 Warn in from_type() if the inferred strategy has no variation (always returning default instances). Also handles numpy data types by calling from_dtype() on the corresponding dtype, thus ensuring proper variation for these types.
Revision 1.116 / (download) - annotate - [select for diffs], Sun May 7 08:35:49 2023 UTC (4 months, 2 weeks ago) by wiz
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)
py-hypothesis: update to 6.75.2. 6.75.2 - 2023-05-04 Improved the documentation regarding how to use GitHubArtifactDatabase and fixed a bug that occurred in repositories with no existing artifacts. Thanks to Agust√≠n Covarrubias for this contribution. 6.75.1 - 2023-04-30 hypothesis.errors will now raise AttributeError when attempting to access an undefined attribute, rather than returning None. 6.75.0 - 2023-04-30 Sick of adding @example()s by hand? Our Pytest plugin now writes .patch files to insert them for you, making this workflow easier than ever before. Note that you—Õl need LibCST (via hypothesis[codemods]), and that @example().via() requires PEP 614 (Python 3.9 or later).
Revision 1.115 / (download) - annotate - [select for diffs], Sun Apr 30 17:14:48 2023 UTC (4 months, 3 weeks ago) by wiz
Changes since 1.114: +4 -4 lines
Diff to previous 1.114 (colored)
py-hypothesis: update to 6.74.1. 6.74.1 - 2023-04-28 This patch provides better error messages for datetime- and timedelta-related invalid dtypes in our Pandas extra (issue #3518). Thanks to Nick Muoh at the PyCon Sprints! 6.74.0 - 2023-04-26 This release adds support for nullable pandas dtypes in pandas() (issue #3604). Thanks to Cheuk Ting Ho for implementing this at the PyCon sprints! 6.73.1 - 2023-04-27 This patch updates our minimum Numpy version to 1.16, and restores compatibility with versions before 1.20, which were broken by a mistake in Hypothesis 6.72.4 (issue #3625). 6.73.0 - 2023-04-25 This release upgrades the explain phase (issue #3411). Following the first failure, Hypothesis will (usually) track which lines of code were executed by passing and failing examples, and report where they diverged - with some heuristics to drop unhelpful reports. This is an existing feature, now upgraded and newly enabled by default. After shrinking to a minimal failing example, Hypothesis will try to find parts of the example „ŗe.g. separate args to @given() „ŗwhich can vary freely without changing the result of that minimal failing example. If the automated experiments run without finding a passing variation, we leave a comment in the final report: test_x_divided_by_y( x=0, # or any other generated value y=0, ) Just remember that the lack of an explanation sometimes just means that Hypothesis couldn„ŗ—’ efficiently find one, not that no explanation (or simpler failing example) exists. 6.72.4 - 2023-04-25 This patch fixes type annotations for the arrays() strategy. Thanks to Francesc Elies for pull request #3602. 6.72.3 - 2023-04-25 This patch fixes a bug with from_type() with dict[tuple[int, int], str] (issue #3527). Thanks to Nick Muoh at the PyCon Sprints! 6.72.2 - 2023-04-24 This patch refactors our internals to facilitate an upcoming feature. 6.72.1 - 2023-04-19 This patch fixes some documentation and prepares for future features. 6.72.0 - 2023-04-16 This release deprecates Healthcheck.all(), and adds a codemod to automatically replace it with list(Healthcheck) (issue #3596). 6.71.0 - 2023-04-07 This release adds GitHubArtifactDatabase, a new database backend that allows developers to access the examples found by a Github Actions CI job. This is particularly useful for workflows that involve continuous fuzzing, like HypoFuzz. Thanks to Agust√≠n Covarrubias for this feature! 6.70.2 - 2023-04-03 This patch clarifies the reporting of time spent generating data. A simple arithmetic mean of the percentage of time spent can be misleading; reporting the actual time spent avoids misunderstandings. Thanks to Andrea Reina for reporting and fixing issue #3598!
Revision 1.114 / (download) - annotate - [select for diffs], Tue Apr 4 11:24:42 2023 UTC (5 months, 2 weeks ago) by adam
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored)
py-hypothesis: updated to 6.70.2 6.70.2 - 2023-04-03¬∂ This patch clarifies the reporting of time spent generating data. A simple arithmetic mean of the percentage of time spent can be misleading; reporting the actual time spent avoids misunderstandings. 6.70.1 - 2023-03-27¬∂ This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.70.0 - 2023-03-16¬∂ This release adds an optional domains= parameter to the emails() strategy, and excludes the special-use .arpa domain from the default strategy. 6.69.0 - 2023-03-15¬∂ This release turns HealthCheck.return_value and HealthCheck.not_a_test_method into unconditional errors. Passing them to suppress_health_check= is therefore a deprecated no-op. Separately, GraalPy can now run and pass most of the hypothesis test suite. 6.68.3 - 2023-03-15¬∂ This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.68.2 - 2023-02-17¬∂ This patch fixes missing imports of the re module, when ghostwriting tests which include compiled patterns or regex flags. Thanks to Jens Heinrich for reporting and promptly fixing this bug! 6.68.1 - 2023-02-12¬∂ This patch adds some private hooks for use in research on Schemathesis (see our preprint here). 6.68.0 - 2023-02-09¬∂ This release adds support for the Array API—‘ 2022.12 release via the api_version argument in make_strategies_namespace(). Concretely this involves complex support in its existing strategies, plus an introduced xps.complex_dtypes() strategy. Additionally this release now treats hypothesis.extra.array_api as stable, meaning breaking changes should only happen with major releases of Hypothesis.
Revision 1.113 / (download) - annotate - [select for diffs], Wed Feb 8 10:31:14 2023 UTC (7 months, 2 weeks ago) by adam
CVS Tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored)
py-hypothesis: updated to 6.67.1 6.67.1 - 2023-02-05 This patch updates our autoformatting tools, improving our code style without any API changes. 6.67.0 - 2023-02-05 This release allows for more precise generation of complex numbers using from_dtype(), by supporting the width, min_magnitude, and min_magnitude arguments. Thanks to Felix Divo for this feature! 6.66.2 - 2023-02-04 This patch fixes a rare RecursionError when pretty-printing a multi-line object without type-specific printer, which was passed to a function which returned the same object by .map() or builds() and thus recursed due to the new pretty reprs in Hypothesis 6.65.0 - 2023-01-24. Apologies to all those affected. 6.66.1 - 2023-02-03 This makes from_dtype() pass through the parameter allow_subnormal for complex dtypes. 6.66.0 - 2023-02-02 This release adds a width parameter to complex_numbers(), analogously to floats(). Thanks to Felix Divo for the new feature! 6.65.2 - 2023-01-27 This patch fixes invalid annotations detected for the tests generated by Ghostwritter. It will now correctly generate Optional types with just one type argument and handle union expressions inside of type arguments correctly. Additionally, it now supports code with the from __future__ import annotations marker for Python 3.10 and newer. 6.65.1 - 2023-01-26 This release improves the pretty-printing of enums in falsifying examples, so that they print as their full identifier rather than their repr. 6.65.0 - 2023-01-24 Hypothesis now reports some failing inputs by showing the call which constructed an object, rather than the repr of the object. This can be helpful when the default repr does not include all relevant details, and will unlock further improvements in a future version. For now, we capture calls made via builds(), and via SearchStrategy.map(). 6.64.0 - 2023-01-23 The Ghostwritter will now include type annotations on tests for type-annotated code. If you want to force this to happen (or not happen), pass a boolean to the new annotate= argument to the Python functions, or the --[no-]annotate CLI flag. Thanks to Nicolas Ganz for this new feature! 6.63.0 - 2023-01-20 range_indexes() now accepts a name= argument, to generate named pandas.RangeIndex objects. Thanks to Sam Watts for this new feature! 6.62.1 - 2023-01-14 This patch tweaks xps.arrays() internals to improve PyTorch compatibility. Specifically, torch.full() does not accept integers as the shape argument (n.b. technically „ŗ◊‘ize„ŗin torch), but such behaviour is expected in internal code, so we copy the torch module and patch in a working full() function.
Revision 1.112 / (download) - annotate - [select for diffs], Sun Dec 18 16:18:53 2022 UTC (9 months ago) by adam
CVS Tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4
Changes since 1.111: +4 -4 lines
Diff to previous 1.111 (colored)
py-hypothesis: updated to 6.61.0 6.61.0 This release improves our treatment of database keys, which based on (among other things) the source code of your test function. We now post-process this source to ignore decorators, comments, trailing whitespace, and blank lines - so that you can add @example()s or make some small no-op edits to your code without preventing replay of any known failing or covering examples. 6.60.1 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.60.0 This release improves Hypothesis„ŗability to resolve forward references in type annotations. It fixes a bug that prevented builds() from being used with pydantic models that possess updated forward references. 6.59.0 The @example(...) decorator now has a .via() method, which future tools will use to track automatically-added covering examples. 6.58.2 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.58.1 This patch shifts hypothesis[lark] from depending on the old lark-parser package to the new lark package. There are no code changes in Hypothesis, it„ŗ—‘ just that Lark got a new name on PyPI for version 1.0 onwards. 6.58.0 register_random() has used weakref since 6.27.1 - 2021-11-22, allowing the Random-compatible objects to be garbage-collected when there are no other references remaining in order to avoid memory leaks. We now raise an error or emit a warning when this seems likely to happen immediately. The type annotation of register_random() was also widened so that structural subtypes of Random are accepted by static typecheckers.
Revision 1.111 / (download) - annotate - [select for diffs], Mon Nov 14 08:33:57 2022 UTC (10 months, 1 week ago) by adam
Changes since 1.110: +4 -5 lines
Diff to previous 1.110 (colored)
py-hypothesis: updated to 6.57.1 6.57.1 - 2022-11-14 This patch updates some internal type annotations and fixes a formatting bug in the explain phase reporting. 6.57.0 - 2022-11-14 Hypothesis now raises an error if you passed a strategy as the alphabet= argument to text(), and it generated something which was not a length-one string. This has never been supported, we„ŗ—”e just adding explicit validation to catch cases like this StackOverflow question.
Revision 1.110 / (download) - annotate - [select for diffs], Fri Nov 4 18:34:09 2022 UTC (10 months, 2 weeks ago) by adam
Changes since 1.109: +2 -1 lines
Diff to previous 1.109 (colored)
py-hypothesis: fix build for Python 3.7; avoid self-conflict; bump revision
Revision 1.109 / (download) - annotate - [select for diffs], Thu Nov 3 10:43:03 2022 UTC (10 months, 2 weeks ago) by adam
Changes since 1.108: +4 -4 lines
Diff to previous 1.108 (colored)
py-hypothesis: updated to 6.56.4 6.56.4 - 2022-10-28 This patch updates some docs, and depends on exceptiongroup 1.0.0 final to avoid a bug in the previous version.
Revision 1.108 / (download) - annotate - [select for diffs], Tue Oct 25 09:08:45 2022 UTC (10 months, 4 weeks ago) by adam
Changes since 1.107: +4 -4 lines
Diff to previous 1.107 (colored)
py-hypothesis: updated to 6.56.3 6.56.3 - 2022-10-17 This patch teaches text() to rewrite a few more filter predicates. You„ŗ—”e unlikely to notice any change. 6.56.2 - 2022-10-10 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy, and fixes some incorrect examples in the docs for mutually_broadcastable_shapes(). 6.56.1 - 2022-10-05 This patch improves the error message when Hypothesis detects „ŗ◊«lush to zero„ŗmode for floating-point: we now report which package(s) enabled this, which can make debugging much easier. 6.56.0 - 2022-10-02 This release defines __bool__() on SearchStrategy. It always returns True, like before, but also emits a warning to help with cases where you intended to draw a value. 6.55.0 - 2022-09-29 In preparation for future versions of the Array API standard, make_strategies_namespace() now accepts an optional api_version argument, which determines the version conformed to by the returned strategies namespace. If None, the version of the passed array module xp is inferred. This release also introduces xps.real_dtypes(). This is currently equivalent to the existing xps.numeric_dtypes() strategy, but exists because the latter is expected to include complex numbers in the next version of the standard.
Revision 1.107 / (download) - annotate - [select for diffs], Mon Sep 5 09:10:57 2022 UTC (12 months, 2 weeks ago) by adam
CVS Tags: pkgsrc-2022Q3-base, pkgsrc-2022Q3
Changes since 1.106: +4 -4 lines
Diff to previous 1.106 (colored)
py-hypothesis: updated to 6.54.5 6.54.5 - 2022-09-05 This patch updates our autoformatting tools, improving our code style without any API changes. 6.54.4 - 2022-08-20 This patch fixes some type annotations for Python 3.9 and earlier (issue 3397), and teaches explain mode about certain locations it should not bother reporting (issue 3439). 6.54.3 - 2022-08-12 This patch teaches the Ghostwriter an additional check for function and class locations that should make it use public APIs more often. 6.54.2 - 2022-08-10 This patch fixes our workaround for a pytest bug where the inner exceptions in an ExceptionGroup are not displayed (issue 3430). 6.54.1 - 2022-08-02 This patch makes FailedHealthCheck and DeadlineExceeded exceptions picklable, for compatibility with Django„ŗ—‘ parallel test runner (issue 3426). 6.54.0 - 2022-08-02 Reporting of multiple failing examples now uses the PEP 654 ExceptionGroup type, which is provided by the exceptiongroup backport on Python 3.10 and earlier (issue 3175). hypothesis.errors.MultipleFailures is therefore deprecated. Failing examples and other reports are now stored as PEP 678 exception notes, which ensures that they will always appear together with the traceback and other information about their respective error. 6.53.0 - 2022-07-25 from_field() now supports UsernameField from django.contrib.auth.forms. Thanks to Afonso Silva for reporting and working on issue 3417. 6.52.4 - 2022-07-22 This patch improves the error message when you pass filenames to the hypothesis write CLI, which takes the name of a module or function (e.g. hypothesis write gzip or hypothesis write package.some_function rather than hypothesis write script.py). Thanks to Ed Rogers for implementing this as part of the SciPy 2022 sprints! 6.52.3 - 2022-07-19 This patch ensures that the warning for non-interactive .example() points to your code instead of Hypothesis internals (issue 3403). Thanks to @jameslamb for this fix. 6.52.2 - 2022-07-19 This patch makes integers() more likely to generate boundary values for large two-sided intervals (issue 2942). 6.52.1 - 2022-07-18 This patch adds filter rewriting for math.isfinite(), math.isinf(), and math.isnan() on integers() or floats() (issue 2701). 6.52.0 - 2022-07-18 This release adds the allow_subnormal argument to complex_numbers() by applying it to each of the real and imaginary parts separately. 6.51.0 - 2022-07-17 Issue a deprecation warning if a function decorated with @composite does not draw any values 6.50.1 - 2022-07-09 This patch improves the error messages in @example() argument validation following the recent release of 6.49.1. 6.50.0 - 2022-07-09 This release allows from_dtype() to generate Unicode strings which cannot be encoded in UTF-8, but are valid in Numpy arrays (which use UTF-32). This logic will only be used with Numpy >= 1.19, because earlier versions have an issue which led us to revert Hypothesis 5.2 last time!
Revision 1.106 / (download) - annotate - [select for diffs], Sat Jul 2 09:10:39 2022 UTC (14 months, 3 weeks ago) by adam
Changes since 1.105: +4 -4 lines
Diff to previous 1.105 (colored)
py-hypothesis: updated to 6.48.2 6.48.2 This patch tidies up some internal introspection logic, which will improve support for positional-only arguments in a future release (issue 2706). 6.48.1 This release automatically rewrites some simple filters, such as floats().filter(lambda x: x >= 10) to the more efficient floats(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. pandera „ŗ◊§hecks„ŗwhere you already have a simple predicate and translating manually is really annoying. 6.48.0 This release raises SkipTest for which never executed any examples, for example because the phases setting excluded the explicit, reuse, and generate phases. This helps to avoid cases where broken tests appear to pass, because they didn„ŗ—’ actually execute (issue 3328). 6.47.5 This patch fixes type annotations that had caused the signature of @given to be partially-unknown to type-checkers for Python versions before 3.10. 6.47.4 This patch fixes from_type() on Python 3.11, following python/cpython-93754. 6.47.3 This patch makes the too_slow health check more consistent with long deadline tests (issue 3367) and fixes an install issue under pipenv which was introduced in Hypothesis 6.47.2 (issue 3374). 6.47.2 We now use the PEP 654 ExceptionGroup type - provided by the exceptiongroup backport on older Pythons - to ensure that if multiple errors are raised in teardown, they will all propagate. 6.47.1 Our pretty-printer no longer sorts dictionary keys, since iteration order is stable in Python 3.7+ and this can affect reproducing examples (issue 3370). This PR was kindly supported by Ordina Pythoneers. 6.47.0 The Ghostwritter can now write tests for @classmethod or @staticmethod methods, in addition to the existing support for functions and other callables (issue 3318). Thanks to Cheuk Ting Ho for the patch.
Revision 1.105 / (download) - annotate - [select for diffs], Mon Jan 31 11:43:31 2022 UTC (19 months, 3 weeks ago) by wiz
CVS Tags: pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1
Changes since 1.104: +4 -4 lines
Diff to previous 1.104 (colored)
py310-hypothesis: update to 6.36.1. 6.36.1 - 2022-01-31 This patch fixes some deprecation warnings from pytest 7.0, along with some code formatting and docs updates. 6.36.0 - 2022-01-19 This release disallows using typing.Final with from_type() and register_type_strategy(). Why? Because Final can only be used during class definition. We don„ŗ—’ generate class attributes. It also does not make sense as a runtime type on its own. 6.35.1 - 2022-01-17 This patch fixes hypothesis write output highlighting with rich version 12.0 and later. 6.35.0 - 2022-01-08 This release disallows using typing.ClassVar with from_type() and register_type_strategy(). Why? Because ClassVar can only be used during class definition. We don„ŗ—’ generate class attributes. It also does not make sense as a runtime type on its own. 6.34.2 - 2022-01-05 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.34.1 - 2021-12-31 This patch fixes issue #3169, an extremely rare bug which would trigger if an internal least-recently-reused cache dropped a newly added entry immediately after it was added. 6.34.0 - 2021-12-31 This release fixes issue #3133 and issue #3144, where attempting to generate Pandas series of lists or sets would fail with confusing errors if you did not specify dtype=object. 6.33.0 - 2021-12-30 This release disallows using typing.TypeAlias with from_type() and register_type_strategy(). Why? Because TypeAlias is not really a type, it is a tag for type checkers that some expression is a type alias, not something else. It does not make sense for Hypothesis to resolve it as a strategy. References issue #2978. 6.32.1 - 2021-12-23 This patch updates our autoformatting tools, improving our code style without any API changes. 6.32.0 - 2021-12-23 This release drops support for Python 3.6, which reached end of life upstream on 2021-12-23. 6.31.6 - 2021-12-15 This patch adds a temporary hook for a downstream tool, which is not part of the public API. 6.31.5 - 2021-12-14 This release updates our copyright headers to use a general authorship statement and omit the year. 6.31.4 - 2021-12-11 This patch makes the .example() method more representative of test-time data generation, albeit often at a substantial cost to readability (issue #3182). 6.31.3 - 2021-12-10 This patch improves annotations on some of Hypothesis„ŗinternal functions, in order to deobfuscate the signatures of some strategies. In particular, strategies shared between hypothesis.extra.numpy and the hypothesis.extra.array_api extra will benefit from this patch. 6.31.2 - 2021-12-10 This patch fix invariants display in stateful falsifying examples (issue #3185). 6.31.1 - 2021-12-10 This patch updates xps.indices() so no flat indices are generated, i.e. generated indices will now always explicitly cover each axes of an array if no ellipsis is present. This is to be consistent with a specification change that dropped support for flat indexing (#272). 6.31.0 - 2021-12-09 This release makes us compatible with Django 4.0, in particular by adding support for use of zoneinfo timezones (though we respect the new USE_DEPRECATED_PYTZ setting if you need it). 6.30.1 - 2021-12-05 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.30.0 - 2021-12-03 This release adds an allow_subnormal argument to the floats() strategy, which can explicitly toggle the generation of subnormal floats (issue #3155). Disabling such generation is useful when testing flush-to-zero builds of libraries. nps.from_dtype() and xps.from_dtype() can also accept the allow_subnormal argument, and xps.from_dtype() or xps.arrays() will disable subnormals by default if the array module xp is detected to flush-to-zero (like is typical with CuPy).
Revision 1.104 / (download) - annotate - [select for diffs], Thu Dec 2 11:15:26 2021 UTC (21 months, 3 weeks ago) by adam
CVS Tags: pkgsrc-2021Q4-base, pkgsrc-2021Q4
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored)
py-hypothesis: updated to 6.29.3 6.29.3 This patch fixes a bug in mutually_broadcastable_shapes(), which restricted the patterns of singleton dimensions that could be generated for dimensions that extended beyond base_shape. 6.29.2 This patch clarifies our pretty-printing of DataFrames. 6.29.1 This patch documents timezones() Windows-only requirement for the tzdata package, and ensures that pip install hypothesis[zoneinfo] will install the latest version. 6.29.0 This release teaches builds() to use deferred() when resolving unrecognised type hints, so that you can conveniently register strategies for recursive types with constraints on some arguments: class RecursiveClass: def __init__(self, value: int, next_node: typing.Optional["SomeClass"]): assert value > 0 self.value = value self.next_node = next_node st.register_type_strategy( RecursiveClass, st.builds(RecursiveClass, value=st.integers(min_value=1)) ) 6.28.1 This release fixes some internal calculations related to collection sizes. 6.28.0 This release modifies our pytest plugin, to avoid importing Hypothesis and therefore triggering Hypothesis„ŗentry points for test suites where Hypothesis is installed but not actually used. 6.27.3 This release fixes issue 3080, where from_type() failed on unions containing PEP 585 builtin generic types (like list[int]) in Python 3.9 and later. 6.27.2 This patch makes the hypothesis codemod command somewhat faster.
Revision 1.103 / (download) - annotate - [select for diffs], Thu Nov 25 20:01:56 2021 UTC (21 months, 4 weeks ago) by adam
Changes since 1.102: +4 -4 lines
Diff to previous 1.102 (colored)
py-hypothesis: updated to 6.27.1 6.27.1 This patch changes the backing datastructures of register_random() and a few internal caches to use weakref.WeakKeyDictionary. This reduces memory usage and may improve performance when registered Random instances are only used for a subset of your tests. 6.27.0 This release teaches Hypothesis„ŗmultiple-error reporting to format tracebacks using pytest or better-exceptions, if they are installed and enabled. 6.26.0 Did you know that of the 264 possible floating-point numbers, 253 of them are nan While nans usually have all zeros in the sign bit and mantissa, this isn„ŗ—’ always true, and „ŗŌ‘ignaling„ŗnans might trap or error. To help distinguish such errors in e.g. CI logs, Hypothesis now prints -nan for negative nans, and adds a comment like # Saw 3 signaling NaNs if applicable. 6.25.0 This release adds special filtering logic to make a few special cases like s.map(lambda x: x) and lists().filter(len) more efficient. 6.24.6 This patch makes floats() generate „ŗ◊‘ubnormal„ŗfloating point numbers more often, as these rare values can have strange interactions with unsafe compiler optimisations like -ffast-math. 6.24.5 This patch fixes a rare internal error in the datetimes() strategy, where the implementation of allow_imaginary=False crashed when checking a time during the skipped hour of a DST transition if the DST offset is negative 6.24.4 This patch gives Hypothesis it„ŗ—‘ own internal Random instance, ensuring that test suites which reset the global random state don„ŗ—’ induce weird correlations between property-based tests. 6.24.3 This patch updates documentation of note()
Revision 1.102 / (download) - annotate - [select for diffs], Sat Nov 6 08:49:22 2021 UTC (22 months, 2 weeks ago) by adam
Changes since 1.101: +4 -4 lines
Diff to previous 1.101 (colored)
py-hypothesis: updated to 6.24.2 6.24.2 This patch updates internal testing for the Array API extra to be consistent with new specification changes: sum() not accepting boolean arrays (234), unique() split into separate functions (275), and treating NaNs as distinct (310). It has no user visible impact. 6.24.1 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. 6.24.0 This patch updates our vendored list of top-level domains, which is used by the provisional domains() strategy. (did you know that gTLDs can be both added and removed?) 6.23.4 This patch adds an error for when shapes in xps.arrays() is not passed as either a valid shape or strategy. 6.23.3 This patch updates our formatting with shed. 6.23.2 This patch replaces external links to NumPy API docs with sphinx.ext.intersphinx cross-references. It is purely a documentation improvement. 6.23.1 This patch cleans up internal logic for xps.arrays(). There is no user-visible change. 6.23.0 This release follows pytest in considering SystemExit and GeneratorExit exceptions to be test failures, meaning that we will shink to minimal examples and check for flakiness even though they subclass BaseException directly (issue 2223). KeyboardInterrupt continues to interrupt everything, and will be re-raised immediately. 6.22.0 This release adds LiveServerTestCase and StaticLiveServerTestCase for django test. Thanks to Ivan Tham for this feature! 6.21.6 This patch fixes some new linter warnings such as flake8-bugbear„ŗ—‘ B904 for explicit exception chaining, so tracebacks might be a bit nicer. 6.21.5 This release fixes None being inferred as the float64 dtype in from_dtype() and arrays() from the Array API extra. 6.21.4 This release fixes the type hint for the @given() decorator when decorating an async function (issue 3099). 6.21.3 This release improves Ghostwritten tests for builtins (issue 2977). 6.21.2 This release deprecates use of both min_dims > len(shape) and max_dims > len(shape) when allow_newaxis == False in basic_indices() (issue 3091). 6.21.1 This release improves the behaviour of builds() and from_type() in certain situations involving decorators (issue 2495 and issue 3029).
Revision 1.101 / (download) - annotate - [select for diffs], Tue Oct 26 10:18:33 2021 UTC (22 months, 4 weeks ago) by nia
Changes since 1.100: +2 -2 lines
Diff to previous 1.100 (colored)
archivers: Replace RMD160 checksums with BLAKE2s checksums All checksums have been double-checked against existing RMD160 and SHA512 hashes Could not be committed due to merge conflict: devel/py-traitlets/distinfo The following distfiles were unfetchable (note: some may be only fetched conditionally): ./devel/pvs/distinfo pvs-3.2-solaris.tgz ./devel/eclipse/distinfo eclipse-sourceBuild-srcIncluded-3.0.1.zip
Revision 1.100 / (download) - annotate - [select for diffs], Thu Oct 7 13:43:15 2021 UTC (23 months, 2 weeks ago) by nia
Changes since 1.99: +1 -2 lines
Diff to previous 1.99 (colored)
devel: Remove SHA1 hashes for distfiles
Revision 1.99 / (download) - annotate - [select for diffs], Sun Sep 12 09:53:53 2021 UTC (2 years ago) by adam
CVS Tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3
Changes since 1.98: +5 -5 lines
Diff to previous 1.98 (colored)
py-hypothesis: updated to 6.21.0 6.21.0 - 2021-09-11 This release introduces strategies for array/tensor libraries adopting the Array API standard. They are available in the hypothesis.extra.array_api extra, and work much like the existing strategies for NumPy. 6.20.1 - 2021-09-10 This patch fixes issue 961, where calling given() inline on a bound method would fail to handle the self argument correctly. 6.20.0 - 2021-09-09 This release allows slices() to generate step=None, and fixes an off-by-one error where the start index could be equal to size. This works fine for all Python sequences and Numpy arrays, but is undefined behaviour in the Array API standard. 6.19.0 - 2021-09-08 This release makes stateful testing more likely to tell you if you do something unexpected and unsupported: The return_value health check now applies to rule() and initialize() rules, if they don„ŗ—’ have target bundles, as well as invariant(). Using a consumes() bundle as a target is deprecated, and will be an error in a future version. If existing code triggers these new checks, check for related bugs and misunderstandings - these patterns never had any effect. 6.18.0 - 2021-09-06 This release teaches from_type() a neat trick: when resolving an typing.Annotated type, if one of the annotations is a strategy object we use that as the inferred strategy. For example: PositiveInt = Annotated[int, st.integers(min_value=1)] If there are multiple strategies, we use the last outer-most annotation. See issue 2978 and pull request 3082 for discussion. Requires Python 3.9 or later for get_type_hints(..., include_extras=False). 6.17.4 - 2021-08-31 This patch makes unique arrays() much more efficient, especially when there are only a few valid elements - such as for eight-bit integers. 6.17.3 - 2021-08-30 This patch fixes the repr of array_shapes(). 6.17.2 - 2021-08-30 This patch wraps some internal helper code in our proxies decorator to prevent mutations of method docstrings carrying over to other instances of the respective methods. 6.17.1 - 2021-08-29 This patch moves some internal helper code in preparation for issue 3065. There is no user-visible change, unless you depended on undocumented internals. 6.17.0 - 2021-08-27 This release adds type annotations to the stateful testing API. Thanks to Ruben Opdebeeck for this contribution! 6.16.0 - 2021-08-27 This release adds the DrawFn type as a reusable type hint for the draw argument of @composite functions. Thanks to Ruben Opdebeeck for this contribution! 6.15.0 - 2021-08-22 This release emits a more useful error message when @given() is applied to a coroutine function, i.e. one defined using async def. This was previously only handled by the generic return_value health check, which doesn„ŗ—’ direct you to use either a custom executor or a library such as pytest-trio or pytest-asyncio to handle it for you. 6.14.9 - 2021-08-20 This patch fixes a regression in Hypothesis 6.14.8, where from_type() failed to resolve types which inherit from multiple parametrised generic types, affecting the returns package. 6.14.8 - 2021-08-16 This patch ensures that registering a strategy for a subclass of a a parametrised generic type such as class Lines(Sequence[str]): will not „ŗ◊Õeak„ŗinto unrelated strategies such as st.from_type(Sequence[int]). Unfortunately this fix requires PEP 560, meaning Python 3.7 or later. 6.14.7 - 2021-08-14 This patch fixes issue 3050, where attrs classes could cause an internal error in the ghostwriter. 6.14.6 - 2021-08-07 This patch improves the error message for issue 3016, where PEP 585 builtin generics with self-referential forward-reference strings cannot be resolved to a strategy by from_type(). 6.14.5 - 2021-07-27 This patch fixes hypothesis.strategies._internal.types.is_a_new_type. It was failing on Python 3.10.0b4, where NewType is a function. 6.14.4 - 2021-07-26 This patch fixes from_type() and register_type_strategy() for typing.NewType on Python 3.10, which changed the underlying implementation (see bpo-44353 for details). 6.14.3 - 2021-07-18 This patch updates our autoformatting tools, improving our code style without any API changes. 6.14.2 - 2021-07-12 This patch ensures that we shorten tracebacks for tests which fail due to inconsistent data generation between runs (i.e. raise Flaky). 6.14.1 - 2021-07-02 This patch updates some internal type annotations. There is no user-visible change.
Revision 1.98 / (download) - annotate - [select for diffs], Sun Jun 13 18:08:24 2021 UTC (2 years, 3 months ago) by adam
CVS Tags: pkgsrc-2021Q2-base, pkgsrc-2021Q2
Changes since 1.97: +5 -5 lines
Diff to previous 1.97 (colored)
py-hypothesis: updated to 6.14.0 6.14.0 - 2021-06-09 The explain phase now requires shrinking to be enabled, and will be automatically skipped for deadline-exceeded errors. 6.13.14 - 2021-06-04 This patch improves the tuples() strategy type annotations, to preserve the element types for up to length-five tuples. As for one_of(), this is the best we can do before a planned extension to PEP 646 is released, hopefully in Python 3.11. 6.13.13 - 2021-06-04 This patch teaches the Ghostwriter how to find custom ufuncs from any module that defines them, and that yaml.unsafe_load() does not undo yaml.safe_load(). 6.13.12 - 2021-06-03 This patch reduces the amount of internal code excluded from our test suite„ŗ—‘ code coverage checks. There is no user-visible change. 6.13.11 - 2021-06-02 This patch removes some old internal helper code that previously existed to make Python 2 compatibility easier. There is no user-visible change. 6.13.10 - 2021-05-30 This release adjusts some internal code to help make our test suite more reliable. There is no user-visible change. 6.13.9 - 2021-05-30 This patch cleans up some internal code related to filtering strategies. There is no user-visible change. 6.13.8 - 2021-05-28 This patch slightly improves the performance of some internal code for generating integers. 6.13.7 - 2021-05-27 This patch fixes a bug in from_regex() that caused from_regex("", fullmatch=True) to unintentionally generate non-empty strings. The only strings that completely match an empty regex pattern are empty strings. 6.13.6 - 2021-05-26 This patch fixes a bug that caused integers() to shrink towards negative values instead of positive values in some cases. 6.13.5 - 2021-05-24 This patch fixes rare cases where hypothesis write --binary-op could print reproducing instructions from the internal search for an identity element. 6.13.4 - 2021-05-24 This patch removes some unnecessary intermediate list-comprehensions, using the latest versions of pyupgrade and shed. 6.13.3 - 2021-05-23 This patch adds a .hypothesis property to invalid test functions, bringing them inline with valid tests and fixing a bug where pytest-asyncio would swallow the real error message and mistakenly raise a version incompatibility error. 6.13.2 - 2021-05-23 Some of Hypothesis„ŗ—‘ numpy/pandas strategies use a fill argument to speed up generating large arrays, by generating a single fill value and sharing that value among many array slots instead of filling every single slot individually. When no fill argument is provided, Hypothesis tries to detect whether it is OK to automatically use the elements argument as a fill strategy, so that it can still use the faster approach. This patch fixes a bug that would cause that optimization to trigger in some cases where it isn„ŗ—’ 100% guaranteed to be OK. If this makes some of your numpy/pandas tests run more slowly, try adding an explicit fill argument to the relevant strategies to ensure that Hypothesis always uses the faster approach. 6.13.1 - 2021-05-20 This patch strengthens some internal import-time consistency checks for the built-in strategies. There is no user-visible change. 6.13.0 - 2021-05-18 This release adds URL fragment generation to the urls() strategy. Thanks to Pax (R. Margret) for contributing this patch at the PyCon US Mentored Sprints! 6.12.1 - 2021-05-17 This patch fixes issue 2964, where .map() and .filter() methods were omitted from the repr() of just() and sampled_from() strategies, since version 5.43.7. 6.12.0 - 2021-05-06 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. pandera „ŗ◊§hecks„ŗ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 - 2021-05-06 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.
Revision 1.97 / (download) - annotate - [select for diffs], Tue May 4 08:10:53 2021 UTC (2 years, 4 months ago) by wiz
Changes since 1.96: +5 -5 lines
Diff to previous 1.96 (colored)
py-hypothesis: update to 6.10.1. 6.10.1 - 2021-04-26 This patch fixes a deprecation warning if you„ŗ—”e using recent versions of importlib-metadata (issue #2934), which we use to load third-party plugins such as Pydantic„ŗ—‘ integration. On older versions of importlib-metadata, there is no change and you don„ŗ—’ need to upgrade.
Revision 1.96 / (download) - annotate - [select for diffs], Tue Apr 20 16:43:04 2021 UTC (2 years, 5 months ago) by wiz
Changes since 1.95: +5 -5 lines
Diff to previous 1.95 (colored)
py-hypothesis: update to 6.10.0. 6.10.0 - 2021-04-17 This release teaches the 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 - 2021-04-15 This release improves the Ghostwriter„ŗ—‘ handling of exceptions, by reading :raises ...: entries in function docstrings and ensuring that we don„ŗ—’ suppresss the error raised by test assertions. 6.9.1 - 2021-04-12 This patch updates our autoformatting tools, improving our code style without any API changes. 6.9.0 - 2021-04-11 This release teaches from_type() how to see through typing.Annotated. Thanks to Vytautas Strimaitis for reporting and fixing issue #2919! 6.8.12 - 2021-04-11 If rich is installed, the hypothesis write command will use it to syntax-highlight the Ghostwritten code. 6.8.11 - 2021-04-11 This patch improves an error message from from_type() when builds() would be more suitable (issue #2930). 6.8.10 - 2021-04-11 This patch updates the type annotations for arrays() to reflect that shape: SearchStrategy[int] is supported. 6.8.9 - 2021-04-07 This patch fixes from_type() with abstract types which have either required but non-type-annotated arguments to __init__, or where from_type() can handle some concrete subclasses but not others. 6.8.8 - 2021-04-07 This patch teaches hypothesis write to check for possible roundtrips in several more cases, such as by looking for an inverse in the module which defines the function to test. 6.8.7 - 2021-04-07 This patch adds a more helpful error message if you try to call sampled_from() on an Enum which has no members, but does have dataclass()-style annotations (issue #2923).
Revision 1.95 / (download) - annotate - [select for diffs], Wed Apr 7 06:23:52 2021 UTC (2 years, 5 months ago) by adam
Changes since 1.94: +5 -5 lines
Diff to previous 1.94 (colored)
py-hypothesis: updated to 6.8.6 6.8.6 - 2021-04-06 The fixed_dictionaries() strategy now preserves dict iteration order instead of sorting the keys. This also affects the pretty-printing of keyword arguments to @given(). 6.8.5 - 2021-04-05 This patch teaches hypothesis write to default to ghostwriting tests with --style=pytest only if pytest is installed, or --style=unittest otherwise. 6.8.4 - 2021-04-01 This patch adds type annotations for the settings decorator, to avoid an error when running mypy in strict mode. 6.8.3 - 2021-03-28 This patch improves the Ghostwriter„ŗ—‘ handling of strategies to generate various fiddly types including frozensets, keysviews, valuesviews, regex matches and patterns, and so on. 6.8.2 - 2021-03-27 This patch fixes some internal typos. There is no user-visible change.
Revision 1.94 / (download) - annotate - [select for diffs], Wed Mar 17 13:13:31 2021 UTC (2 years, 6 months ago) by wiz
CVS Tags: pkgsrc-2021Q1-base, pkgsrc-2021Q1
Changes since 1.93: +5 -5 lines
Diff to previous 1.93 (colored)
py-hypothesis: update to 6.8.1. 6.8.1 - 2021-03-14 This patch lays more groundwork for filter rewriting (issue #2701). There is no user-visible change„ŗyet. 6.8.0 - 2021-03-11 This release registers the remaining builtin types, and teaches from_type() to try resolving ForwardRef and Type references to built-in types. 6.7.0 - 2021-03-10 This release teaches RuleBasedStateMachine to avoid checking invariant()s until all initialize() rules have been run. You can enable checking of specific invariants for incompletely initialized machines by using @invariant(check_during_init=True) (issue #2868). In previous versions, it was possible if awkward to implement this behaviour using precondition() and an auxiliary variable. 6.6.1 - 2021-03-09 This patch improves the error message when from_type() fails to resolve a forward-reference inside a typing.Type such as Type["int"] (issue #2565). 6.6.0 - 2021-03-07 This release makes it an explicit error to apply invariant() to a rule() or initialize() rule in stateful testing. Such a combination had unclear semantics, especially in combination with precondition(), and was never meant to be allowed (issue #2681). 6.5.0 - 2021-03-07 This release adds the explain phase, in which Hypothesis attempts to explain why your test failed by pointing to suspicious lines of code (i.e. those which were always, and only, run on failing inputs). We plan to include ◊»eneralising„ŗfailing examples in this phase in a future release (issue #2192). 6.4.3 - 2021-03-04 This patch fixes issue #2794, where nesting deferred() strategies within recursive() strategies could trigger an internal assertion. While it was always possible to get the same results from a more sensible strategy, the convoluted form now works too. 6.4.2 - 2021-03-04 This patch fixes several problems with mypy when „ŗŇŌo-implicit-reexport was activated in user projects. Thanks to Nikita Sobolev for fixing issue #2884! 6.4.1 - 2021-03-04 This patch fixes an exception that occurs when using type unions of the typing_extensions Literal backport on Python 3.6. Thanks to Ben Anhalt for identifying and fixing this bug. 6.4.0 - 2021-03-02 This release fixes stateful testing methods with multiple precondition() decorators. Previously, only the outer-most precondition was checked (issue #2681). 6.3.4 - 2021-02-28 This patch refactors some internals of RuleBasedStateMachine. There is no change to the public API or behaviour. 6.3.3 - 2021-02-26 This patch moves some internal code, so that future work can avoid creating import cycles. There is no user-visible change. 6.3.2 - 2021-02-25 This patch enables register_type_strategy() for subclasses of typing.TypedDict. Previously, from_type() would ignore the registered strategy (issue #2872). Thanks to Ilya Lebedev for identifying and fixing this bug! 6.3.1 - 2021-02-24 This release lays the groundwork for automatic rewriting of simple filters, for example converting integers().filter(lambda x: x > 9) to integers(min_value=10). Note that this is not supported yet, and we will continue to recommend writing the efficient form directly wherever possible - predicate rewriting is provided mainly for the benefit of downstream libraries which would otherwise have to implement it for themselves (e.g. pandera and icontract-hypothesis). See issue #2701 for details. 6.3.0 - 2021-02-20 The Hypothesis pytest plugin now requires pytest version 4.6 or later. If the plugin detects an earlier version of pytest, it will automatically deactivate itself. (4.6.x is the earliest pytest branch that still accepts community bugfixes.) Hypothesis-based tests should continue to work in earlier versions of pytest, but enhanced integrations provided by the plugin (such as --hypothesis-show-statistics and other command-line flags) will no longer be available in obsolete pytest versions.
Revision 1.93 / (download) - annotate - [select for diffs], Thu Feb 18 10:31:27 2021 UTC (2 years, 7 months ago) by wiz
Changes since 1.92: +5 -5 lines
Diff to previous 1.92 (colored)
py-hypothesis: update to 6.2.0. 6.2.0 - 2021-02-12 If you use pytest-html, Hypothesis now includes the summary statistics for each test in the HTML report, whether or not the --hypothesis-show-statistics argument was passed to show them in the command-line output.
Revision 1.92 / (download) - annotate - [select for diffs], Thu Feb 4 11:15:16 2021 UTC (2 years, 7 months ago) by wiz
Changes since 1.91: +5 -5 lines
Diff to previous 1.91 (colored)
py-hypothesis: update to 6.1.1. 6.1.1 - 2021-01-31 This patch updates our automatic code formatting to use shed, which includes autoflake, black, isort, and pyupgrade (issue #2780). 6.1.0 - 2021-01-29 This release teaches Hypothesis to distinguish between errors based on the __cause__ or __context__ of otherwise identical exceptions, which is particularly useful when internal errors can be wrapped by a library-specific or semantically appropriate exception such as: try: do_the_thing(foo, timeout=10) except Exception as err: raise FooError("Failed to do the thing") from err Earlier versions of Hypothesis only see the FooError, while we can now distinguish a FooError raised because of e.g. an internal assertion from one raised because of a TimeoutExceeded exception. 6.0.4 - 2021-01-27 This release prevents a race condition inside recursive() strategies. The race condition occurs when the same recursive() strategy is shared among tests that are running in multiple threads (issue #2717).
Revision 1.91 / (download) - annotate - [select for diffs], Mon Jan 25 10:08:58 2021 UTC (2 years, 7 months ago) by wiz
Changes since 1.90: +5 -5 lines
Diff to previous 1.90 (colored)
py-hypothesis: update to 6.0.3. 6.0.3 - 2021-01-23 This patch improves the type annotations for one_of(), by adding overloads to handle up to five distinct arguments as typing.Union before falling back to typing.Any, as well as annotating the | (__or__) operator for strategies (issue #2765). 6.0.2 - 2021-01-14 This release makes some small improvements to how filtered strategies work. It should improve the performance of shrinking filtered strategies, and may under some (probably rare) circumstances improve the diversity of generated examples.
Revision 1.90 / (download) - annotate - [select for diffs], Wed Jan 13 11:50:46 2021 UTC (2 years, 8 months ago) by wiz
Changes since 1.89: +5 -5 lines
Diff to previous 1.89 (colored)
py-hypothesis: update to 6.0.1. 6.0.1 - 2021-01-13 This patch fixes an interaction where our test statistics handling made Pytest„ŗ—‘ --junit-xml output fail to validate against the strict xunit2 schema (issue #1975). 6.0.0 - 2021-01-08 Welcome to the next major version of Hypothesis! There are no new features here, as we release those in minor versions. Instead, 6.0 is a chance for us to remove deprecated features (many already converted into no-ops), and turn a variety of warnings into errors. If you were running on the last version of Hypothesis 5.x without any Hypothesis deprecation warnings, this will be a very boring upgrade. In fact, nothing will change for you at all. Changes Many functions now use PEP 3102 keyword-only arguments where passing positional arguments was deprecated since 5.5. hypothesis.extra.django.from_model() no longer accepts model as a keyword argument, where it could conflict with fields named „ŗ◊őodel„ŗ randoms() now defaults to use_true_random=False. complex_numbers() no longer accepts min_magnitude=None; either use min_magnitude=0 or just omit the argument. hypothesis.provisional.ip4_addr_strings and ip6_addr_strings are removed in favor of ip_addresses(v=...).map(str). register_type_strategy() no longer accepts generic types with type arguments, which were always pretty badly broken. Using function-scoped pytest fixtures is now a health-check error, instead of a warning. Tip The hypothesis codemod command can automatically refactor your code, particularly to convert positional to keyword arguments where those are now required. Hypothesis 5.x 5.49.0 - 2021-01-07 This release adds the function_scoped_fixture health check value, which can be used to suppress the existing warning that appears when @given is applied to a test that uses pytest function-scoped fixtures. (This warning exists because function-scoped fixtures only run once per function, not once per example, which is usually unexpected and can cause subtle problems.) When this warning becomes a health check error in a future release, suppressing it via Python warning settings will no longer be possible. In the rare case that once-per-function behaviour is intended, it will still be possible to use function_scoped_fixture to opt out of the health check error for specific tests. 5.48.0 - 2021-01-06 This release adds hypothesis.currently_in_test_context(), which can be used to check whether the calling code is currently running inside an @given or stateful test. This is most useful for third-party integrations and assertion helpers which may wish to use assume() or target(), without also requiring that the helper only be used from property-based tests (issue #2581). 5.47.0 - 2021-01-05 This release upgrades the import logic for ghostwritten tests, handling many cases where imports would previously be missing or from unexpected locations.
Revision 1.89 / (download) - annotate - [select for diffs], Mon Jan 4 11:55:03 2021 UTC (2 years, 8 months ago) by wiz
Changes since 1.88: +5 -5 lines
Diff to previous 1.88 (colored)
py-hypothesis: update to 5.46.0. 5.46.0 - 2021-01-04 This release upgrades from_type(), to infer strategies for type-annotated arguments even if they have defaults when it otherwise falls back to builds() (issue #2708). 5.45.0 - 2021-01-04 This release adds the hypothesis[codemods] extra, which you can use to check for and automatically fix issues such as use of deprecated Hypothesis APIs (issue #2705). 5.44.0 - 2021-01-03 This patch fixes from_type() with the typing_extensions Literal backport on Python 3.6. 5.43.9 - 2021-01-02 This patch fixes issue #2722, where certain orderings of register_type_strategy(), ForwardRef, and from_type() could trigger an internal error. 5.43.8 - 2021-01-02 This patch makes some strategies for collections with a uniqueness constraint much more efficient, including dictionaries(keys=sampled_from(...), values=..) and lists(tuples(sampled_from(...), ...), unique_by=lambda x: x). (related to issue #2036) 5.43.7 - 2021-01-02 This patch extends our faster special case for sampled_from() elements in unique lists() to account for chains of .map(...) and .filter(...) calls (issue #2036). 5.43.6 - 2021-01-02 This patch improves the type annotations on assume() and @reproduce_failure(). 5.43.5 - 2021-01-01 This patch updates our copyright headers to include 2021. Happy new year! 5.43.4 - 2020-12-24 This change fixes a documentation error in the database setting. The previous documentation suggested that callers could specify a database path string, or the special string ":memory:", but this setting has never actually allowed string arguments. Permitted values are None, and instances of ExampleDatabase. 5.43.3 - 2020-12-11 This patch fixes issue #2696, an internal error triggered when the @example decorator was used and the verbosity setting was quiet. 5.43.2 - 2020-12-10 This patch improves the error message from the data_frames() strategy when both the rows and columns arguments are given, but there is a missing entry in rows and the corresponding column has no fill value (issue #2678). 5.43.1 - 2020-12-10 This patch improves the error message if builds() is passed an Enum which cannot be called without arguments, to suggest using sampled_from() (issue #2693). 5.43.0 - 2020-12-09 This release adds new timezones() and timezone_keys() strategies (issue #2630) based on the new zoneinfo module in Python 3.9. pip install hypothesis[zoneinfo] will ensure that you have the appropriate backports installed if you need them.
Revision 1.88 / (download) - annotate - [select for diffs], Wed Dec 9 09:11:58 2020 UTC (2 years, 9 months ago) by adam
CVS Tags: pkgsrc-2020Q4-base, pkgsrc-2020Q4
Changes since 1.87: +5 -5 lines
Diff to previous 1.87 (colored)
py-hypothesis: updated to 5.42.3 5.42.2 This patch teaches hypothesis.extra.django.from_field() to infer more efficient strategies by inspecting (not just filtering by) field validators for numeric and string fields. 5.42.1 This patch refactors hypothesis.settings to use type-annotated keyword arguments instead of **kwargs, which makes tab-completion much more useful - as well as type-checkers like mypy. 5.42.0 This patch teaches the magic() ghostwriter to recognise „ŗ◊∆n/de„ŗfunction roundtrips other than the common encode/decode pattern, such as encrypt/decrypt or, encipher/decipher. 5.41.5 This patch adds a performance optimisation to avoid saving redundant seeds when using the .fuzz_one_input hook.
Revision 1.87 / (download) - annotate - [select for diffs], Sun Dec 6 10:51:44 2020 UTC (2 years, 9 months ago) by wiz
Changes since 1.86: +5 -5 lines
Diff to previous 1.86 (colored)
py-hypothesis: update to 5.41.5. 5.41.5 - 2020-12-05 This patch adds a performance optimisation to avoid saving redundant seeds when using the .fuzz_one_input hook.
Revision 1.86 / (download) - annotate - [select for diffs], Sun Nov 29 18:08:38 2020 UTC (2 years, 9 months ago) by wiz
Changes since 1.85: +5 -5 lines
Diff to previous 1.85 (colored)
py-hypothesis: update to 5.41.4. 5.41.4 - 2020-11-28 This patch fixes issue #2657, where passing unicode patterns compiled with re.IGNORECASE to from_regex() could trigger an internal error when casefolding a character creates a longer string (e.g. "\u0130".lower() -> "i\u0370").
Revision 1.85 / (download) - annotate - [select for diffs], Fri Nov 27 16:08:13 2020 UTC (2 years, 9 months ago) by wiz
Changes since 1.84: +5 -5 lines
Diff to previous 1.84 (colored)
py-hypothesis: update to 5.41.3. This patch adds a final fallback clause to our plugin logic to fail with a warning rather than error on Python < 3.8 when neither the importlib_metadata (preferred) or setuptools (fallback) packages are available.
Revision 1.84 / (download) - annotate - [select for diffs], Mon Nov 9 14:21:43 2020 UTC (2 years, 10 months ago) by wiz
Changes since 1.83: +5 -5 lines
Diff to previous 1.83 (colored)
py-hypothesis: update to 5.41.2. 5.41.2 - 2020-11-08 This patch fixes urls() strategy ensuring that ~ (tilde) is treated as one of the url-safe characters (issue #2658). 5.41.1 - 2020-11-03 This patch improves our CLI help and documentation.
Revision 1.83 / (download) - annotate - [select for diffs], Sat Oct 31 19:40:30 2020 UTC (2 years, 10 months ago) by wiz
Changes since 1.82: +5 -5 lines
Diff to previous 1.82 (colored)
py-hypothesis: update to 5.41.0. 5.41.0 - 2020-10-30 Hypothesis now shrinks examples where the error is raised while drawing from a strategy. This makes complicated custom strategies much easier to debug, at the cost of a slowdown for use-cases where you catch and ignore such errors. 5.40.0 - 2020-10-30 This release teaches from_type() how to handle ChainMap, Counter, Deque, Generator, Match, OrderedDict, Pattern, and collections.abc.Set (issue #2654). 5.39.0 - 2020-10-30 from_type() now knows how to resolve PEP 585 parameterized standard collection types, which are new in Python 3.9 (issue #2629). 5.38.1 - 2020-10-26 This patch fixes builds(), so that when passed infer for an argument with a non-typing.Optional type annotation and a default value of None to build a class which defines an explicit __signature__ attribute, either None or that type may be generated. This is unlikely to happen unless you are using pydantic (issue #2648). 5.38.0 - 2020-10-24 This release improves our support for @st.composite on a classmethod or staticmethod (issue #2578). 5.37.5 - 2020-10-24 This patch fixes from_type() with Iterable[T] (issue #2645). 5.37.4 - 2020-10-20 This patch teaches the magic() ghostwriter to recognise that pairs of functions like rgb_to_hsv() and hsv_to_rgb() should roundtrip(). 5.37.3 - 2020-10-15 This patch improves builds() and from_type() support for explicitly defined __signature__ attributes, from version 5.8.3, to support generic types from the typing module. Thanks to R√≥n√°n Carrigan for identifying and fixing this problem! 5.37.2 - 2020-10-14 This patch fixes from_lark() with version 0.10.1+ of the lark-parser package.
Revision 1.82 / (download) - annotate - [select for diffs], Wed Oct 14 16:28:46 2020 UTC (2 years, 11 months ago) by wiz
Changes since 1.81: +5 -5 lines
Diff to previous 1.81 (colored)
py-hypothesis: update to 5.37.1. This patch fixes some broken links in the "lark" extra documentation.
Revision 1.81 / (download) - annotate - [select for diffs], Tue Oct 6 10:52:29 2020 UTC (2 years, 11 months ago) by wiz
Changes since 1.80: +5 -5 lines
Diff to previous 1.80 (colored)
py-hypothesis: update to 5.37.0. About a year of changes that are only available on a very detailed level. Biggest change: stop supporting Python 2.x Detailed changes here: https://hypothesis.readthedocs.io/en/latest/changes.html
Revision 1.80 / (download) - annotate - [select for diffs], Sat Jun 20 07:06:42 2020 UTC (3 years, 3 months ago) by adam
CVS Tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2
Changes since 1.79: +5 -5 lines
Diff to previous 1.79 (colored)
py-hypothesis: updated to 4.57.1 4.57.1: This patch improves the type hints and documentation for the django extra. There is no runtime change. 4.57.0: This release improves support for the SupportsOp protocols from the typing module when using on from_type() as outlined in issue 2292. The following types now generate much more varied strategies when called with from_type(): typing.SupportsAbs typing.SupportsBytes typing.SupportsComplex typing.SupportsInt typing.SupportsFloat typing.SupportsRound Note that using from_type() with one of the above strategies will not ensure that the the specified function will execute successfully (ie : the strategy returned for from_type(typing.SupportsAbs) may include NaNs or things which cause the abs() function to error. ) 4.56.3: This release fixes a small internal bug in shrinking which could have caused it to perform slightly more tests than were necessary. Fixing this shouldn—’ have much effect but it will make shrinking slightly faster. 4.56.2: This release removes an internal heuristic that was no longer providing much benefit. It is unlikely that there will be any user visible effect. 4.56.1: This release further improves the optimisation algorithm for targeted property-based testing. 4.56.0: This release enables deprecation warnings even when the verbosity setting is quiet, in preparation for Hypothesis 5.0. Warnings can still be filtered by the standard mechanisms provided in the standard-library warnings module. 4.55.4: This release improves Hypothesis„ŗ—‘ management of the set of test cases it tracks between runs. It will only do anything if you have Phase.target enabled and an example database set. In those circumstances it should result in a more thorough and faster set of examples that are tried on each run. 4.55.3: This release makes Hypothesis better at generating test cases where generated values are duplicated in different parts of the test case. This will be especially noticeable with reasonably complex values, as it was already able to do this for simpler ones such as integers or floats. 4.55.2: This release expands the set of test cases that Hypothesis saves in its database for future runs to include a representative set of „ŗ◊‘tructurally different„ŗtest cases - e.g. it might try to save test cases where a given list is empty or not. Currently this is unlikely to have much user visible impact except to produce slightly more consistent behaviour between consecutive runs of a test suite. It is mostly groundwork for future improvements which will exploit this functionality more effectively. 4.55.1: This patch fixes issue 2257, where from_type() could incorrectly generate bytestrings when passed a generic typing.Sequence such as Sequence[set]. 4.55.0: This release adds database support for targeted property-based testing, so the best examples based on the targeting will be saved and reused between runs. This is mostly laying groundwork for future features in this area, but will also make targeted property-based tests more useful during development, where the same tests tend to get run over and over again. If max_examples is large, this may increase memory usage significantly under some circumstances, but these should be relatively rare. This release also adds a dependency on the sortedcontainers package. 4.54.2: This release improves the optimisation algorithm for targeted property-based testing, so that it will find higher quality results more reliably. Specifically, in cases where it would previously have got near a local optimum, it will now tend to achieve the locally optimal value. 4.54.1: This release is mostly internal changes in support of better testing of the core engine. You are unlikely to see much effect, although some internal heuristics have changed slightly. 4.54.0: This release adds a dedicated phase for targeted property-based testing, and (somewhat) improves the targeting algorithm so that it will find higher quality results more reliably. This comes at a cost of making it more likely to get stuck in a local optimum.
Revision 1.79 / (download) - annotate - [select for diffs], Sun Dec 15 11:28:53 2019 UTC (3 years, 9 months ago) by adam
CVS Tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored)
py-hypothesis: updated to 4.53.3 4.53.3: This patch fixes :func:`~hypothesis.strategies.from_type` with :class:`python:typing.Hashable` and :class:`python:typing.Sized`, which previously failed with an internal error on Python 3.7 or later. 4.53.2: This release reorganises a number of the Hypothesis internal modules into a package structure. If you are only depending on the public API it should have no effect. If you are depending on the internal API (which you shouldn't be, and which we don't guarantee compatibility on) you may have to rename some imports. 4.53.1: This release changes the size distribution of the number of steps run in stateful testing: It will now almost always run the maximum number of steps permitted. 4.53.0: :ref:`statistics` now include the best score seen for each label, which can help avoid the threshold problem when the minimal example shrinks right down to the threshold of failure (:issue:`2180`). 4.52.0: This release changes the stateful_step_count setting to raise an error if set to 0. This is a backwards compatible change because a value of 0 would never have worked and attempting to run it would have resulted in an internal assertion error. 4.51.1: This release makes a small internal change to the distribution of test cases. It is unlikely to have much user visible impact. 4.51.0: This release deprecates use of :func:`@example <hypothesis.example>`, :func:`@seed <hypothesis.seed>`, or :func:`@reproduce_failure <hypothesis.reproduce_failure>` without :func:`@given <hypothesis.given>`. 4.50.8: This patch makes certain uses of Bundles more efficient in stateful testing (:issue:`2078`). 4.50.7: This release refactors some of Hypothesis's internal interfaces for representing data generation. It should have no user visible effect. 4.50.6: This patch removes some old debugging helpers in our Numpy extra which have not been needed since :issue:`1963` and :issue:`2245`. 4.50.5: This patch fixes :issue:`2229`, where Numpy arrays of unsized strings would only ever have strings of size one due to an interaction between our generation logic and Numpy's allocation strategy. 4.50.4: This patch fixes a rare internal error in strategies for a list of unique items sampled from a short non-unique sequence (:issue:`2247`). The bug was discovered via :pypi:`hypothesis-jsonschema`. 4.50.3: This release improves the error message when :func:`@settings <hypothesis.settings>` tries to inherit settings from a parent argument that isn't a settings instance. 4.50.2: This release improves Hypothesis's "Falsifying example" output, by breaking output across multiple lines where necessary, and by removing irrelevant information from the stateful testing output. 4.50.1: This patch adds :pypi:`flake8-comprehensions` to our linter suite. There is no user-visible change - expect perhaps via some strange microbenchmarks - but certain parts of the code now have a clear and more consistent style. 4.50.0: This release fixes some cases where we might previously have failed to run the validation logic for some strategies. As a result tests which would previously have been silently testing significantly less than they should may now start to raise InvalidArgument now that these errors are caught. 4.49.0: This release significantly improves the data distribution in :doc:`rule based stateful testing <stateful>`, by using a technique called Swarm Testing (Groce, Alex, et al. "Swarm testing." Proceedings of the 2012 International Symposium on Software Testing and Analysis. ACM, 2012.) to select which rules are run in any given test case. This should allow it to find many issues that it would previously have missed. This change is likely to be especially beneficial for stateful tests with large numbers of rules. 4.48.1: This release adds some heuristics to test case generation that try to ensure that test cases generated early on will be relatively small. This fixes a bug introduced in :ref:`Hypothesis 4.42.0 <v4.42.0>` which would cause occasional :obj:`~hypothesis.HealthCheck.too_slow` failures on some tests. 4.48.0: This release revokes the deprecation of find, as we've now rebuilt it on top of @given, which means it has minimal maintenance burden and we're happy to support it. 4.47.5: This release rebuilds find() on top of @given in order to have more code in common. It should have minimal user visible effect. 4.47.4: This patch removes an internal compatibility shim that we no longer need. 4.47.3: This patch fixes several typos in our docstrings and comments, with no change in behaviour. 4.47.2: This release fixes an internal issue where Hypothesis would sometimes generate test cases that were above its intended maximum size. This would only have happened rarely and probably would not have caused major problems when it did. Users of the new :ref:`targeted property-based testing <targeted-search>` might see minor impact (possibly slightly faster tests and slightly worse target scores), but only in the unlikely event that they were hitting this problem. Other users should not see any effect at all. 4.47.1: This release removes some unused code from the core engine. There is no user-visible change. 4.47.0: This release commonizes some code between running explicit examples and normal test execution. The main user visible impact of this is that deadlines are now enforced when running explicit examples. 4.46.1: This patch ensures that a KeyboardInterrupt received during example generation is not treated as a mystery test failure but instead propagates to the top level, not recording the interrupted generation in the conjecture data tree. 4.46.0: This release changes the behaviour of :func:`~hypothesis.strategies.floats` when excluding signed zeros - floats(max_value=0.0, exclude_max=True) can no longer generate -0.0 nor the much rarer floats(min_value=-0.0, exclude_min=True) generate +0.0. The correct interaction between signed zeros and exclusive endpoints was unclear; we now enforce the invariant that :func:`~hypothesis.strategies.floats` will never generate a value equal to an excluded endpoint (:issue:`2201`). If you prefer the old behaviour, you can pass floats(max_value=-0.0) or floats(min_value=0.0) which is exactly equivalent and has not changed. If you had two endpoints equal to zero, we recommend clarifying your tests by using :func:`~hypothesis.strategies.just` or :func:`~hypothesis.strategies.sampled_from` instead of :func:`~hypothesis.strategies.floats`. 4.45.1: This patch improves the error message when invalid arguments are passed to :func:`~hypothesis.stateful.rule` or :func:`~hypothesis.stateful.invariant` (:issue:`2149`). 4.45.0: This release supports :obj:`python:typing.Final` and :obj:`python:typing.TypedDict` in :func:`~hypothesis.strategies.from_type`. 4.44.5: This patch disables our :pypi:`pytest` plugin when running on versions of :pypi:`pytest` before 4.3, the oldest our plugin supports. Note that at time of writing the Pytest developers only support 4.6 and later! Hypothesis tests using :func:`@given() <hypothesis.given>` work on any test runner, but our integrations to e.g. avoid example database collisions when combined with @pytest.mark.parametrize eventually drop support for obsolete versions. 4.44.4: This patch adds some internal comments and clarifications to the Hypothesis implementation. There is no user-visible change. 4.44.3: This patch avoids importing test runners such as :pypi:`pytest`, :pypi:`unittest2`, or :pypi:`nose` solely to access their special "skip test" exception types - if the module is not in :obj:`sys.modules`, the exception can't be raised anyway. This fixes a problem where importing an otherwise unused module could cause spurious errors due to import-time side effects (and possibly -Werror).
Revision 1.78 / (download) - annotate - [select for diffs], Wed Nov 13 21:08:30 2019 UTC (3 years, 10 months ago) by adam
Changes since 1.77: +5 -5 lines
Diff to previous 1.77 (colored)
py-hypothesis: updated to 4.44.2 4.44.2: This release fixes :func:`@given <hypothesis.given>` to only complain about missing keyword-only arguments if the associated test function is actually called. This matches the behaviour of other InvalidArgument errors produced by @given. 4.44.1: This patch allows Hypothesis to run in environments that do not specify a __file__, such as a :mod:`python:zipapp` (:issue:`2196`). 4.44.0: This release adds a gufunc argument to :func:`~hypothesis.extra.numpy.mutually_broadcastable_shapes` (:issue:`2174`), which allows us to generate shapes which are valid for functions like :obj:`numpy:numpy.matmul` that require shapes which are not simply broadcastable. 4.43.9: This patch fixes :issue:`2108`, where the first test using :func:`~hypothesis.strategies.data` to draw from :func:`~hypothesis.strategies.characters` or :func:`~hypothesis.strategies.text` would be flaky due to unreliable test timings. Time taken by lazy instantiation of strategies is now counted towards drawing from the strategy, rather than towards the deadline for the test function. 4.43.8: This release ensures that the strategies passed to :func:`@given <hypothesis.given>` are properly validated when applied to a test method inside a test class. This should result in clearer error messages when some of those strategies are invalid. 4.43.7: This release changes how Hypothesis manages its search space in cases where it generates redundant data. This should cause it to generate significantly fewer duplicated examples (especially with short integer ranges), and may cause it to produce more useful examples in some cases (especially ones where there is a significant amount of filtering). 4.43.6: This patch refactors width handling in :func:`~hypothesis.strategies.floats`; you may notice small performance improvements but the main purpose is to enable work on :issue:`1704` (improving shrinking of bounded floats). 4.43.5: This patch removes an unused internal flag. There is no user-visible change. 4.43.4: This patch corrects the exception type and error message you get if you attempt to use :func:`~hypothesis.strategies.data` to draw from something which is not a strategy. This never worked, but the error is more helpful now. 4.43.3: We've adopted :pypi:`flake8-bugbear` to check for a few more style issues, and this patch implements the minor internal cleanups it suggested. There is no user-visible change. 4.43.2: This patch fixes the formatting of some documentation, but there is no change to any executed code. 4.43.1: Python 3.8's new :obj:`python:typing.Literal` type - see PEP 586 for details - is now supported in :func:`~hypothesis.strategies.from_type`. 4.43.0: This release adds the strategy :func:`~hypothesis.extra.numpy.mutually_broadcastable_shapes`, which generates multiple array shapes that are mutually broadcast-compatible with an optional user-specified base-shape. This is a generalisation of :func:`~hypothesis.extra.numpy.broadcastable_shapes`. It relies heavily on non-public internals for performance when generating and shrinking examples. We intend to support generating shapes matching a ufunc signature in a future version (:issue:`2174`). 4.42.10: This release fixes :func:`~hypothesis.strategies.from_type` when used with bounded or constrained :obj:`python:typing.TypeVar` objects (:issue:`2094`). Previously, distinct typevars with the same constraints would be treated as all single typevar, and in cases where a typevar bound was resolved to a union of subclasses this could result in mixed types being generated for that typevar. 4.42.9: This patch ensures that the default value :func:`~hypothesis.extra.numpy.broadcastable_shapes` chooses for max_dims is always valid (at most 32), even if you pass min_dims=32. 4.42.8: This patch ensures that we only add profile information to the pytest header if running either pytest or Hypothesis in verbose mode, matching the builtin cache plugin (:issue:`2155`). 4.42.7: This patch makes stateful step printing expand the result of a step into multiple variables when you return :func:`~hypothesis.stateful.multiple` (:issue:`2139`). 4.42.6: This release fixes a bug (:issue:`2166`) where a Unicode character info cache file was generated but never used on subsequent test runs, causing tests to run more slowly than they should have. 4.42.5: This patch corrects some internal documentation. There is no user-visible change. 4.42.4: This release fixes a bug (:issue:`2160`) where decorators applied after :func:`@settings <hypothesis.settings>` and before :func:`@given <hypothesis.given>` were ignored. 4.42.3: This release updates Hypothesis's formatting to the new version of :pypi:`black`, and has absolutely no user visible effect. 4.42.2: This release fixes a bug in :func:`~hypothesis.strategies.recursive` which would have meant that in practice max_leaves was treated as if it was lower than it actually is - specifically it would be capped at the largest power of two smaller than it. It is now handled correctly. 4.42.1: Python 3.8's new :class:`python:typing.SupportsIndex` type - see PEP 357 for details - is now supported in :func:`~hypothesis.strategies.from_type`. 4.42.0: This release significantly simplifies Hypothesis's internal logic for data generation, by removing a number of heuristics of questionable or unproven value. The results of this change will vary significantly from test to test. Most test suites will see significantly faster data generation and lower memory usage. The "quality" of the generated data may go up or down depending on your particular test suites. If you see any significant regressions in Hypothesis's ability to find bugs in your code as a result of this release, please file an issue to let us know. Users of the new :ref:`targeted property-based testing <targeted-search>` functionality are reasonably likely to see improvements in data generation, as this release changes the search algorithm for targeted property based testing to one that is more likely to be productive than the existing approach.
Revision 1.77 / (download) - annotate - [select for diffs], Tue Oct 22 13:20:27 2019 UTC (3 years, 11 months ago) by adam
Changes since 1.76: +5 -5 lines
Diff to previous 1.76 (colored)
py-hypothesis: updated to 4.41.3 4.41.3: This patch is to ensure that our internals remain comprehensible to :pypi:`mypy` 0.740 - there is no user-visible change. 4.41.2: This patch changes some internal hashes to SHA384, to better support users subject to FIPS-140. There is no user-visible API change. 4.41.1: This release makes --hypothesis-show-statistics much more useful for tests using a :class:`~hypothesis.stateful.RuleBasedStateMachine`, by simplifying the reprs so that events are aggregated correctly. 4.41.0: This release upgrades the :func:`~hypothesis.strategies.fixed_dictionaries` strategy to support optional keys (:issue:`1913`). 4.40.2: This release makes some minor internal changes in support of improving the Hypothesis test suite. It should not have any user visible impact. 4.40.1: This release changes how Hypothesis checks if a parameter to a test function is a mock object. It is unlikely to have any noticeable effect, but may result in a small performance improvement, especially for test functions where a mock object is being passed as the first argument. 4.40.0: This release fixes a bug where our example database logic did not distinguish between failing examples based on arguments from a @pytest.mark.parametrize(...). This could in theory cause data loss if a common failure overwrote a rare one, and in practice caused occasional file-access collisions in highly concurrent workloads (e.g. during a 300-way parametrize on 16 cores). For internal reasons this also involves bumping the minimum supported version of :pypi:`pytest` to 4.3 4.39.3: This patch improves our type hints on the :func:`~hypothesis.strategies.emails`, :func:`~hypothesis.strategies.functions`, :func:`~hypothesis.strategies.integers`, :func:`~hypothesis.strategies.iterables`, and :func:`~hypothesis.strategies.slices` strategies, as well as the .filter() method. There is no runtime change, but if you use :pypi:`mypy` or a similar type-checker on your tests the results will be a bit more precise. 4.39.2: This patch improves the performance of unique collections such as :func:`~hypothesis.strategies.sets` of :func:`~hypothesis.strategies.just` or :func:`~hypothesis.strategies.booleans` strategies. They were already pretty good though, so you're unlikely to notice much! 4.39.1: If a value in a dict passed to :func:`~hypothesis.strategies.fixed_dictionaries` is not a strategy, Hypothesis now tells you which one. 4.39.0: This release adds the :func:`~hypothesis.extra.numpy.basic_indices` strategy, to generate basic indexes for arrays of the specified shape (:issue:`1930`). It generates tuples containing some mix of integers, :obj:`python:slice` objects, ... (Ellipsis), and :obj:`numpy:numpy.newaxis`; which when used to index an array of the specified shape produce either a scalar or a shared-memory view of the array. Note that the index tuple may be longer or shorter than the array shape, and may produce a view with another dimensionality again! 4.38.3: This patch defers creation of the .hypothesis directory until we have something to store in it, meaning that it will appear when Hypothesis is used rather than simply installed. 4.38.2: This patch bumps our dependency on :pypi:`attrs` to >=19.2.0; but there are no user-visible changes to Hypothesis. 4.38.1: This is a comment-only patch which tells :pypi:`mypy` 0.730 to ignore some internal compatibility shims we use to support older Pythons. 4.38.0: This release adds the :func:`hypothesis.target` function, which implements experimental support for :ref:`targeted property-based testing <targeted-search>` (:issue:`1779`). By calling :func:`~hypothesis.target` in your test function, Hypothesis can do a hill-climbing search for bugs. If you can calculate a suitable metric such as the load factor or length of a queue, this can help you find bugs with inputs that are highly improbably from unguided generation - however good our heuristics, example diversity, and deduplication logic might be. After all, those features are at work in targeted PBT too! 4.37.0: This release emits a warning if you use the .example() method of a strategy in a non-interactive context. :func:`~hypothesis.given` is a much better choice for writing tests, whether you care about performance, minimal examples, reproducing failures, or even just the variety of inputs that will be tested! 4.36.2: This patch disables part of the :mod:`typing`-based inference for the :pypi:`attrs` package under Python 3.5.0, which has some incompatible internal details (:issue:`2095`). 4.36.1: This patch fixes a bug in strategy inference for :pypi:`attrs` classes where Hypothesis would fail to infer a strategy for attributes of a generic type such as Union[int, str] or List[bool] (:issue:`2091`). 4.36.0: This patch deprecates min_len or max_len of 0 in :func:`~hypothesis.extra.numpy.byte_string_dtypes` and :func:`~hypothesis.extra.numpy.unicode_string_dtypes`. The lower limit is now 1. Numpy uses a length of 0 in these dtypes to indicate an undetermined size, chosen from the data at array creation. However, as the :func:`~hypothesis.extra.numpy.arrays` strategy creates arrays before filling them, strings were truncated to 1 byte. 4.35.1: This patch improves the messaging that comes from invalid size arguments to collection strategies such as :func:`~hypothesis.strategies.lists`. 4.35.0: This release improves the :func:`~hypothesis.extra.lark.from_lark` strategy, tightening argument validation and adding the explicit argument to allow use with terminals that use @declare instead of a string or regular expression. This feature is required to handle features such as indent and dedent tokens in Python code, which can be generated with the :pypi:`hypothesmith` package. 4.34.0: The :func:`~hypothesis.strategies.from_type` strategy now knows to look up the subclasses of abstract types, which cannot be instantiated directly. This is very useful for :pypi:`hypothesmith` to support :pypi:`libCST`.
Revision 1.76 / (download) - annotate - [select for diffs], Thu Aug 22 11:05:27 2019 UTC (4 years, 1 month ago) by adam
CVS Tags: pkgsrc-2019Q3-base, pkgsrc-2019Q3
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored)
py-hypothesis: updated to 4.33.1 4.33.1: This patch works around a crash when an incompatible version of Numpy is installed under PyPy 5.10 (Python 2.7). If you are still using Python 2, please upgrade to Python 3 as soon as possible - it will be unsupported at the end of this year. 4.33.0: This release improves the :func:~hypothesis.provisional.domains strategy, as well as the :func:~hypothesis.provisional.urls and the :func:~hypothesis.strategies.emails strategies which use it. These strategies now use the full IANA list of Top Level Domains and are correct as per :rfc:1035. Passing tests using these strategies may now fail. 4.32.3: This patch tidies up the repr of several settings-related objects, at runtime and in the documentation, and deprecates the undocumented edge case that phases=None was treated like phases=tuple(Phase). It *also* fixes :func:~hypothesis.extra.lark.from_lark with :pypi:lark 0.7.2 <lark-parser> and later. 4.32.2: This patch updates some internal comments for :pypi:mypy 0.720. There is no user-visible impact. 4.32.1: This release changes how the shrinker represents its progress internally. For large generated test cases this should result in significantly less memory usage and possibly faster shrinking. Small generated test cases may be slightly slower to shrink but this shouldn't be very noticeable. 4.32.0: This release makes :func:~hypothesis.extra.numpy.arrays more pedantic about elements strategies that cannot be exactly represented as array elements. In practice, you will see new warnings if you were using a float16 or float32 dtype without passing :func:~hypothesis.strategies.floats the width=16 or width=32 arguments respectively. The previous behaviour could lead to silent truncation, and thus some elements being equal to an explicitly excluded bound (:issue:1899). 4.31.1: This patch changes an internal use of MD5 to SHA hashes, to better support users subject to FIPS-140. There is no user-visible or API change. 4.31.0: This release simplifies the logic of the :attr:~hypothesis.settings.print_blob setting by removing the option to set it to PrintSettings.INFER. As a result the print_blob setting now takes a single boolean value, and the use of PrintSettings is deprecated. 4.28.2: This patch improves the docstrings of several Hypothesis strategies, by clarifying markup and adding cross-references. There is no runtime change. 4.28.1: This patch improves the behaviour of the :func:~hypothesis.strategies.text strategy when passed an alphabet which is not a strategy. The value is now interpreted as whitelist_characters to :func:~hypothesis.strategies.characters instead of a sequence for :func:~hypothesis.strategies.sampled_from, which standardises the distribution of examples and the shrinking behaviour. You can get the previous behaviour by using lists(sampled_from(alphabet)).map("".map) instead. 4.28.0: This release deprecates find(). The .example() method is a better replacement if you want *an* example, and for the rare occasions where you want the *minimal* example you can get it from :func:@given <hypothesis.given>. :func:@given <hypothesis.given> has steadily outstripped find() in both features and performance over recent years, and as we do not have the resources to maintain and test both we think it is better to focus on just one. 4.27.0: This release refactors the implementation of the .example() method, to more accurately represent the data which will be generated by :func:@given <hypothesis.given>. As a result, calling s.example() on an empty strategy s (such as :func:~hypothesis.strategies.nothing) now raises Unsatisfiable instead of the old NoExamples exception. 4.26.4: This patch ensures that the Pandas extra will keep working when Python 3.8 removes abstract base classes from the top-level :obj:python:collections namespace. This also fixes the relevant warning in Python 3.7, but there is no other difference in behaviour and you do not need to do anything. 4.26.3: This release fixes :issue:2027, by changing the way Hypothesis tries to generate distinct examples to be more efficient. This may result in slightly different data distribution, and should improve generation performance in general, but should otherwise have minimal user impact. 4.26.2: This release fixes :issue:1864, where some simple tests would perform very slowly, because they would run many times with each subsequent run being progressively slower. They will now stop after a more reasonable number of runs without hitting this problem. Unless you are hitting exactly this issue, it is unlikely that this release will have any effect, but certain classes of custom generators that are currently very slow may become a bit faster, or start to trigger health check failures. 4.26.1: This release adds the strategy :func:~hypothesis.extra.numpy.integer_array_indices, which generates tuples of Numpy arrays that can be used for advanced indexing <http://www.pythonlikeyoumeanit.com/Module3_IntroducingNumpy/AdvancedIndexing.html#Integer-Array-Indexing>_ to select an array of a specified shape. 4.26.0: This release significantly improves the performance of drawing unique collections whose elements are drawn from :func:~hypothesis.strategies.sampled_from strategies. As a side effect, this detects an error condition that would previously have passed silently: When the min_size argument on a collection with distinct elements is greater than the number of elements being sampled, this will now raise an error. 4.25.1: This release removes some defunct internal functionality that was only being used for testing. It should have no user visible impact. 4.25.0: This release deprecates and disables the buffer_size setting, which should have been treated as a private implementation detail all along. We recommend simply deleting this settings argument. 4.24.6: This patch makes :func:~hypothesis.strategies.datetimes more efficient, as it now handles short months correctly by construction instead of filtering. 4.24.5: This patch improves the development experience by simplifying the tracebacks you will see when e.g. you have used the .map(...) method of a strategy and the mapped function raises an exception. No new exceptions can be raised, nor existing exceptions change anything but their traceback. We're simply using if-statements rather than exceptions for control flow in a certain part of the internals! 4.24.4: This patch fixes :issue:2014, where our compatibility layer broke with version 3.7.4 of the :pypi:typing module backport on PyPI. This issue only affects Python 2. We remind users that Hypothesis, like many other packages, will drop Python 2 support on 2020-01-01 <https://python3statement.org>__ and already has several features that are only available on Python 3. 4.24.3: This patch improves the implementation of an internal wrapper on Python 3.8 beta1 (and will break on the alphas; but they're not meant to be stable). On other versions, there is no change at all.
Revision 1.75 / (download) - annotate - [select for diffs], Wed Jun 12 09:51:52 2019 UTC (4 years, 3 months ago) by adam
CVS Tags: pkgsrc-2019Q2-base, pkgsrc-2019Q2
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored)
py-hypothesis: updated to 4.24.3 4.24.3: This patch improves the implementation of an internal wrapper on Python 3.8 beta1 (and will break on the alphas; but they're not meant to be stable). On other versions, there is no change at all. 4.24.2: Deprecation messages for functions in hypothesis.extra.django.models now explicitly name the deprecated function to make it easier to track down usages. Thanks to Kristian Glass for this contribution! 4.24.1: This patch fixes :issue:`1999`, a spurious bug raised when a :func:`@st.composite <hypothesis.strategies.composite>` function was passed a keyword-only argument.
Revision 1.74 / (download) - annotate - [select for diffs], Sun Jun 2 08:30:18 2019 UTC (4 years, 3 months ago) by adam
Changes since 1.73: +5 -5 lines
Diff to previous 1.73 (colored)
py-hypothesis: updated to 4.24.0 4.24.0: This release deprecates GenericStateMachine, in favor of :class:~hypothesis.stateful.RuleBasedStateMachine. Rule-based stateful testing is significantly faster, especially during shrinking. If your use-case truly does not fit rule-based stateful testing, we recommend writing a custom test function which drives your specific control-flow using :func:~hypothesis.strategies.data. 4.23.9: This patch fixes a very rare example database issue with file permissions. When running a test that uses both :func:@given <hypothesis.given> and pytest.mark.parametrize, using :pypi:pytest-xdist on Windows, with failing examples in the database, two attempts to read a file could overlap and we caught FileNotFound but not other OSErrors. 4.23.8: This patch has a minor cleanup of the internal engine. There is no user-visible impact. 4.23.7: This patch clarifies some error messages when the test function signature is incompatible with the arguments to :func:@given <hypothesis.given>, especially when the :obj:@settings() <hypothesis.settings> decorator is also used (:issue:1978). 4.23.6: This release adds the :pypi:pyupgrade fixer to our code style, for consistent use of dict and set literals and comprehensions. 4.23.5: This release slightly simplifies a small part of the core engine. There is no user-visible change.
Revision 1.73 / (download) - annotate - [select for diffs], Thu May 9 11:53:58 2019 UTC (4 years, 4 months ago) by adam
Changes since 1.72: +5 -5 lines
Diff to previous 1.72 (colored)
py-hypothesis: updated to 4.23.4 4.23.4: Fixes a minor formatting issue the docstring of from_type() 4.23.3: Adds a recipe to the docstring of from_type() that describes a means for drawing values for „ŗ◊∆verything except„ŗa specified type. This recipe is especially useful for writing tests that perform input-type validation. 4.23.2: This patch uses autoflake to remove some pointless pass statements, which improves our workflow but has no user-visible impact. 4.23.1: This patch fixes an OverflowError in from_type(xrange) on Python 2. It turns out that not only do the start and stop values have to fit in a C long, but so does stop - start. We now handle this even on 32bit platforms, but remind users that Python2 will not be supported after 2019 without specific funding. 4.23.0: This release implements the slices() strategy, to generate slices of a length-size sequence. 4.22.3: This patch exposes DataObject, solely to support more precise type hints. Objects of this type are provided by data(), and can be used to draw examples from strategies intermixed with your test code. 4.22.2: This patch fixes the very rare issue 1798 in array_dtypes(), which caused an internal error in our tests. 4.22.1: This patch fixes a rare bug in from_type(range). 4.22.0: The unique_by argument to lists now accepts a tuple of callables such that every element of the generated list will be unique with respect to each callable in the tuple. 4.21.1: This patch cleans up the internals of one_of(). You may see a slight change to the distribution of examples from this strategy but there is no change to the public API. 4.21.0: The from_type() strategy now supports slice objects. 4.20.0: This release improves the array_shapes() strategy, to choose an appropriate default for max_side based on the min_side, and max_dims based on the min_dims. An explicit error is raised for dimensions greater than 32, which are not supported by Numpy, as for other invalid combinations of arguments. 4.19.0: The from_type() strategy now supports range objects (or xrange on Python 2). 4.18.3: This release fixes a very rare edge case in the test-case mutator, which could cause an internal error with certain unusual tests. 4.18.2: This patch makes Hypothesis compatible with the Python 3.8 alpha, which changed the representation of code objects to support positional-only arguments. Note however that Hypothesis does not (yet) support such functions as e.g. arguments to builds() or inputs to @given. 4.18.1: This patch improves the performance of unique collections such as sets() when the elements are drawn from a sampled_from() strategy. 4.18.0: This release adds the functions() strategy, which can be used to imitate your „ŗŌ”eal„ŗfunction for callbacks. 4.17.2: This release refactors stateful rule selection to share the new machinery with sampled_from() instead of using the original independent implementation. 4.17.1: This patch allows Hypothesis to try a few more examples after finding the first bug, in hopes of reporting multiple distinct bugs. The heuristics described in issue 847 ensure that we avoid wasting time on fruitless searches, while still surfacing each bug as soon as possible.
Revision 1.72 / (download) - annotate - [select for diffs], Tue Apr 16 07:14:00 2019 UTC (4 years, 5 months ago) by adam
Changes since 1.71: +5 -5 lines
Diff to previous 1.71 (colored)
py-hypothesis: updated to 4.17.0 4.17.0 This release adds the strategy :func:~hypothesis.extra.numpy.broadcastable_shapes, which generates array shapes that are broadcast-compatible with a provided shape. 4.16.0 This release allows :func:~hypothesis.strategies.register_type_strategy to be used with :obj:python:typing.NewType instances. This may be useful to e.g. provide only positive integers for :func:from_type(UserId) <hypothesis.strategies.from_type> with a UserId = NewType('UserId', int) type. 4.15.0 This release supports passing a :class:~python:datetime.timedelta as the :obj:~hypothesis.settings.deadline setting, so you no longer have to remember that the number is in milliseconds (:issue:1900). Thanks to Damon Francisco for this change! 4.14.7 This patch makes the type annotations on hypothesis.extra.dateutil compatible with :pypi:mypy 0.700. 4.14.6 This release fixes a bug introduced in :ref:Hypothesis 4.14.3 <v4.14.3> that would sometimes cause :func:sampled_from(...).filter(...) <hypothesis.strategies.sampled_from> to encounter an internal assertion failure when there are three or fewer elements, and every element is rejected by the filter. 4.14.5 This patch takes the previous efficiency improvements to :func:sampled_from(...).filter(...) <hypothesis.strategies.sampled_from> strategies that reject most elements, and generalises them to also apply to sampled_from(...).filter(...).filter(...) and longer chains of filters. 4.14.4 This release fixes a bug that prevented :func:~hypothesis.strategies.random_module from correctly restoring the previous state of the random module. The random state was instead being restored to a temporary deterministic state, which accidentally caused subsequent tests to see the same random values across multiple test runs. 4.14.3 This patch adds an internal special case to make :func:sampled_from(...).filter(...) <hypothesis.strategies.sampled_from> much more efficient when the filter rejects most elements
Revision 1.71 / (download) - annotate - [select for diffs], Tue Apr 2 09:40:30 2019 UTC (4 years, 5 months ago) by adam
Changes since 1.70: +5 -5 lines
Diff to previous 1.70 (colored)
py-hypothesis: updated to 4.14.2 4.14.2 This patch improves the error message if the function f in :ref:s.flatmap(f) <flatmap> does not return a strategy. 4.14.1 This release modifies how Hypothesis selects operations to run during shrinking, by causing it to deprioritise previously useless classes of shrink until others have reached a fixed point. This avoids certain pathological cases where the shrinker gets very close to finishing and then takes a very long time to finish the last small changes because it tries many useless shrinks for each useful one towards the end. It also should cause a more modest improvement (probably no more than about 30%) in shrinking performance for most tests. 4.14.0 This release blocks installation of Hypothesis on Python 3.4, which :PEP:reached its end of life date on 2019-03-18 <429>. This should not be of interest to anyone but downstream maintainers - if you are affected, migrate to a secure version of Python as soon as possible or at least seek commercial support. 4.13.0 This release makes it an explicit error to call :func:floats(min_value=inf, exclude_min=True) <hypothesis.strategies.floats> or :func:floats(max_value=-inf, exclude_max=True) <hypothesis.strategies.floats>, as there are no possible values that can be generated (:issue:1859). :func:floats(min_value=0.0, max_value=-0.0) <hypothesis.strategies.floats> is now deprecated. While 0. == -0. and we could thus generate either if comparing by value, violating the sequence ordering of floats is a special case we don't want or need. 4.12.1 This release should significantly reduce the amount of memory that Hypothesis uses for representing large test cases, by storing information in a more compact representation and only unpacking it lazily when it is first needed. 4.12.0 This update adds the :obj:~hypothesis.settings.report_multiple_bugs setting, which you can use to disable multi-bug reporting and only raise whichever bug had the smallest minimal example. This is occasionally useful when using a debugger or tools that annotate tracebacks via introspection. 4.11.7 This change makes a tiny improvement to the core engine's bookkeeping. There is no user-visible change. 4.11.6 This release changes some of Hypothesis's internal shrinking behaviour in order to reduce memory usage and hopefully improve performance. 4.11.5 This release adds a micro-optimisation to how Hypothesis handles debug reporting internally. Hard to shrink test may see a slight performance improvement, but in most common scenarios it is unlikely to be noticeable. 4.11.4 This release removes some redundant code that was no longer needed but was still running a significant amount of computation and allocation on the hot path. This should result in a modest speed improvement for most tests, especially those with large test cases. 4.11.3 This release adds a micro-optimisation to how Hypothesis caches test cases. This will cause a small improvement in speed and memory usage for large test cases, but in most common scenarios it is unlikely to be noticeable. 4.11.2 This release removes some internal code that populates a field that is no longer used anywhere. This should result in some modest performance and speed improvements and no other user visible effects.
Revision 1.70 / (download) - annotate - [select for diffs], Wed Mar 13 08:51:48 2019 UTC (4 years, 6 months ago) by adam
CVS Tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1
Changes since 1.69: +5 -5 lines
Diff to previous 1.69 (colored)
py-hypothesis: updated to 4.11.1 4.11.1: This is a formatting-only patch, enabled by a new version of :pypi:isort. 4.11.0: This release deprecates :func:~hypothesis.strategies.sampled_from with empty sequences. This returns :func:~hypothesis.strategies.nothing, which gives a clear error if used directly... but simply vanishes if combined with another strategy. Tests that silently generate less than expected are a serious problem for anyone relying on them to find bugs, and we think reliability more important than convenience in this case. 4.10.0: This release improves Hypothesis's to detect flaky tests, by noticing when the behaviour of the test changes between runs. In particular this will notice many new cases where data generation depends on external state (e.g. external sources of randomness) and flag those as flaky sooner and more reliably. The basis of this feature is a considerable reengineering of how Hypothesis stores its history of test cases, so on top of this its memory usage should be considerably reduced. 4.9.0: This release adds the strategy :func:~hypothesis.extra.numpy.valid_tuple_axes, which generates tuples of axis-indices that can be passed to the axis argument in NumPy's sequential functions (e.g. :func:numpy:numpy.sum). 4.8.0: This release significantly tightens validation in :class:hypothesis.settings. :obj:~hypothesis.settings.max_examples, :obj:~hypothesis.settings.buffer_size, and :obj:~hypothesis.settings.stateful_step_count must be positive integers; :obj:~hypothesis.settings.deadline must be a positive number or None; and :obj:~hypothesis.settings.derandomize must be either True or False. As usual, this replaces existing errors with a more helpful error and starts new validation checks as deprecation warnings. 4.7.19: This release makes some micro-optimisations to certain calculations performed in the shrinker. These should particularly speed up large test cases where the shrinker makes many small changes. It will also reduce the amount allocated, but most of this is garbage that would have been immediately thrown away, so you probably won't see much effect specifically from that. 4.7.18: This patch removes some overhead from :func:~hypothesis.extra.numpy.arrays with a constant shape and dtype. The resulting performance improvement is modest, but worthwile for small arrays.
Revision 1.69 / (download) - annotate - [select for diffs], Sat Mar 2 14:22:10 2019 UTC (4 years, 6 months ago) by adam
Changes since 1.68: +5 -5 lines
Diff to previous 1.68 (colored)
py-hypothesis: updated to 4.7.17 4.7.17: This release makes some micro-optimisations within Hypothesis's internal representation of test cases. This should cause heavily nested test cases to allocate less during generation and shrinking, which should speed things up slightly. 4.7.16: This changes the order in which Hypothesis runs certain operations during shrinking. This should significantly decrease memory usage and speed up shrinking of large examples. 4.7.15: This release allows Hypothesis to calculate a number of attributes of generated test cases lazily. This should significantly reduce memory usage and modestly improve performance, especially for large test cases. 4.7.14: This release reduces the number of operations the shrinker will try when reordering parts of a test case. This should in some circumstances significantly speed up shrinking. It may result in different final test cases, and if so usually slightly worse ones, but it should not generally have much impact on the end result as the operations removed were typically useless. 4.7.13: This release changes how Hypothesis reorders examples within a test case during shrinking. This should make shrinking considerably faster. 4.7.12: This release slightly improves the shrinker's ability to replace parts of a test case with their minimal version, by allowing it to do so in bulk rather than one at a time. Where this is effective, shrinker performance should be modestly improved. 4.7.11: This release makes some micro-optimisations to common operations performed during shrinking. Shrinking should now be slightly faster, especially for large examples with relatively fast test functions. 4.7.10: This release is a purely internal refactoring of Hypothesis's API for representing test cases. There should be no user visible effect. 4.7.9: This release changes certain shrink passes to make them more efficient when they aren't making progress. 4.7.8: This patch removes some unused code, which makes the internals a bit easier to understand. There is no user-visible impact. 4.7.7: This release reduces the number of operations the shrinker will try when reordering parts of a test case. This should in some circumstances significantly speed up shrinking. It may result in different final test cases, and if so usually slightly worse ones, but it should not generally have much impact on the end result as the operations removed were typically useless. 4.7.6: This patch removes some unused code from the shrinker. There is no user-visible change. 4.7.5: This release changes certain shrink passes to make them adaptive - that is, in cases where they are successfully making progress they may now do so significantly faster. 4.7.4: This is a docs-only patch, noting that because the :pypi:lark-parser is under active development at version 0.x, hypothesis[lark] APIs may break in minor releases if necessary to keep up with the upstream package. 4.7.3: This changes Hypothesis to no longer import various test frameworks by default (if they are installed). which will speed up the initial import hypothesis call. 4.7.2: This release changes Hypothesis's internal representation of a test case to calculate some expensive structural information on demand rather than eagerly. This should reduce memory usage a fair bit, and may make generation somewhat faster. 4.7.1: This release refactors the internal representation of previously run test cases. The main thing you should see as a result is that Hypothesis becomes somewhat less memory hungry. 4.7.0: This patch allows :func:~hypothesis.extra.numpy.array_shapes to generate shapes with side-length or even dimension zero, though the minimum still defaults to one. These shapes are rare and have some odd behavior, but are particularly important to test for just that reason! In a related bigfix, :func:~hypothesis.extra.numpy.arrays now supports generating zero-dimensional arrays with dtype=object and a strategy for iterable elements. Previously, the array element would incorrectly be set to the first item in the generated iterable.
Revision 1.68 / (download) - annotate - [select for diffs], Sat Feb 16 23:36:02 2019 UTC (4 years, 7 months ago) by adam
Changes since 1.67: +5 -5 lines
Diff to previous 1.67 (colored)
py-hypothesis: updated to 4.5.11 4.5.11: This release fixes :issue:1813, a bug introduced in :ref:3.59.1 <v3.59.1>, which caused :py:meth:~hypothesis.strategies.random_module to no longer affect the body of the test: Although Hypothesis would claim to be seeding the random module in fact tests would always run with a seed of zero. 4.5.10: This patch fixes an off-by-one error in the maximum length of :func:~hypothesis.strategies.emails. Thanks to Krzysztof Jurewicz for :pull:1812. 4.5.9: This patch removes some unused code from the shrinker. There is no user-visible change. 4.5.8: This release fixes an internal IndexError in Hypothesis that could sometimes be triggered during shrinking. 4.5.7: This release modifies the shrinker to interleave different types of reduction operations, e.g. switching between deleting data and lowering scalar values rather than trying entirely deletions then entirely lowering. This may slow things down somewhat in the typical case, but has the major advantage that many previously difficult to shrink examples should become much faster, because the shrinker will no longer tend to stall when trying some ineffective changes to the shrink target but will instead interleave it with other more effective operations. 4.5.6: This release makes a number of internal changes to the implementation of :func:hypothesis.extra.lark.from_lark. These are primarily intended as a refactoring, but you may see some minor improvements to performance when generating large strings, and possibly to shrink quality. 4.5.5: This patch prints an explanatory note when :issue:1798 is triggered, because the error message from Numpy is too terse to locate the problem. 4.5.4: In Python 2, long integers are not allowed in the shape argument to :func:~hypothesis.extra.numpy.arrays. Thanks to Ryan Turner for fixing this. 4.5.3: This release makes a small internal refactoring to clarify how Hypothesis instructs tests to stop running when appropriate. There is no user-visible change. 4.5.2: This release standardises all of the shrinker's internal operations on running in a random order. The main effect you will see from this that it should now be much less common for the shrinker to stall for a long time before making further progress. In some cases this will correspond to shrinking more slowly, but on average it should result in faster shrinking. 4.5.1: This patch updates some docstrings, but has no runtime changes. 4.5.0: This release adds exclude_min and exclude_max arguments to :func:~hypothesis.strategies.floats, so that you can easily generate values from open or half-open intervals
Revision 1.67 / (download) - annotate - [select for diffs], Fri Feb 1 11:50:30 2019 UTC (4 years, 7 months ago) by adam
Changes since 1.66: +5 -5 lines
Diff to previous 1.66 (colored)
py-hypothesis: updated to 4.4.3 4.4.3: This release fixes an open file leak that used to cause ResourceWarnings. 4.4.2: This release changes Hypothesis's internal approach to caching the results of executing test cases. The result should be that it is now significantly less memory hungry, especially when shrinking large test cases. Some tests may get slower or faster depending on whether the new or old caching strategy was well suited to them, but any change in speed in either direction should be minor. 4.4.1: This patch tightens up some of our internal heuristics to deal with shrinking floating point numbers, which will now run in fewer circumstances. You are fairly unlikely to see much difference from this, but if you do you are likely to see shrinking become slightly faster and/or producing slightly worse results. 4.4.0: This release adds the :func:~hypothesis.extra.django.from_form function, which allows automatic testing against Django forms. (:issue:35) 4.3.0: This release deprecates HealthCheck.hung_test and disables the associated runtime check for tests that ran for more than five minutes. Such a check is redundant now that we enforce the deadline and max_examples setting, which can be adjusted independently. 4.2.0: This release adds a new module, hypothesis.extra.lark, which you can use to generate strings matching a context-free grammar. In this initial version, only :pypi:lark-parser EBNF grammars are supported, by the new :func:hypothesis.extra.lark.from_lark function. 4.1.2: This patch fixes a very rare overflow bug (:issue:1748) which could raise an InvalidArgument error in :func:~hypothesis.strategies.complex_numbers even though the arguments were valid. 4.1.1: This release makes some improvements to internal code organisation and documentation and has no impact on behaviour. 4.1.0: This release adds :func:~hypothesis.register_random, which registers random.Random instances or compatible objects to be seeded and reset by Hypothesis to ensure that test cases are deterministic. We still recommend explicitly passing a random.Random instance from :func:~hypothesis.strategies.randoms if possible, but registering a framework-global state for Hypothesis to manage is better than flaky tests! 4.0.2: This patch fixes :issue:1387, where bounded :func:~hypothesis.strategies.integers with a very large range would almost always generate very large numbers. Now, we usually use the same tuned distribution as unbounded :func:~hypothesis.strategies.integers. 4.0.1: This release randomizes the order in which the shrinker tries some of its initial normalization operations. You are unlikely to see much difference as a result unless your generated examples are very large. In this case you may see some performance improvements in shrinking. 4.0.0: Welcome to the next major version of Hypothesis! There are no new features here, as we release those in minor versions. Instead, 4.0 is a chance for us to remove deprecated features (many already converted into no-ops), and turn a variety of warnings into errors. If you were running on the last version of Hypothesis 3.x without any Hypothesis deprecation warnings (or using private APIs), this will be a very boring upgrade. In fact, nothing will change for you at all. Per :ref:our deprecation policy <deprecation-policy>, warnings added in the last six months (after 2018-07-05) have not been converted to errors. Removals hypothesis.extra.datetime has been removed, replaced by the core date and time strategies. hypothesis.extra.fakefactory has been removed, replaced by general expansion of Hypothesis' strategies and the third-party ecosystem. The SQLite example database backend has been removed. Settings The :obj:~hypothesis.settings.deadline is now enforced by default, rather than just emitting a warning when the default (200 milliseconds per test case) deadline is exceeded. The database_file setting has been removed; use :obj:~hypothesis.settings.database. The perform_health_check setting has been removed; use :obj:~hypothesis.settings.suppress_health_check. The max_shrinks setting has been removed; use :obj:~hypothesis.settings.phases to disable shrinking. The min_satisfying_examples, max_iterations, strict, timeout, and use_coverage settings have been removed without user-configurable replacements. Strategies The elements argument is now required for collection strategies. The average_size argument was a no-op and has been removed. Date and time strategies now only accept min_value and max_value for bounds. :func:~hypothesis.strategies.builds now requires that the thing to build is passed as the first positional argument. Alphabet validation for :func:~hypothesis.strategies.text raises errors, not warnings, as does category validation for :func:~hypothesis.strategies.characters. The choices() strategy has been removed. Instead, you can use :func:~hypothesis.strategies.data with :func:~hypothesis.strategies.sampled_from, so choice(elements) becomes data.draw(sampled_from(elements)). The streaming() strategy has been removed. Instead, you can use :func:~hypothesis.strategies.data and replace iterating over the stream with data.draw() calls. :func:~hypothesis.strategies.sampled_from and :func:~hypothesis.strategies.permutations raise errors instead of warnings if passed a collection that is not a sequence. Miscellaneous Applying :func:@given <hypothesis.given> to a test function multiple times was really inefficient, and now it's also an error. Using the .example() method of a strategy (intended for interactive exploration) within another strategy or a test function always weakened data generation and broke shrinking, and now it's an error too. The HYPOTHESIS_DATABASE_FILE environment variable is no longer supported, as the database_file setting has been removed. The HYPOTHESIS_VERBOSITY_LEVEL environment variable is no longer supported. You can use the --hypothesis-verbosity pytest argument instead, or write your own setup code using the settings profile system to replace it. Using :func:@seed <hypothesis.seed> or :obj:derandomize=True <hypothesis.settings.derandomize> now forces :obj:database=None <hypothesis.settings.database> to ensure results are in fact reproducible. If :obj:~hypothesis.settings.database is not None, doing so also emits a HypothesisWarning. Unused exception types have been removed from hypothesis.errors; namely AbnormalExit, BadData, BadTemplateDraw, DefinitelyNoSuchExample, Timeout, and WrongFormat.
Revision 1.66 / (download) - annotate - [select for diffs], Mon Jan 7 08:31:28 2019 UTC (4 years, 8 months ago) by adam
Changes since 1.65: +5 -5 lines
Diff to previous 1.65 (colored)
py-hypothesis: updated to 3.86.5 3.86.5: This is a docs-only patch, which fixes some typos and removes a few hyperlinks for deprecated features. 3.86.4: This release changes the order in which the shrinker tries to delete data. For large and slow tests this may significantly improve the performance of shrinking. 3.86.3: This release fixes a bug where certain places Hypothesis internal errors could be raised during shrinking when a user exception occurred that suppressed an exception Hypothesis uses internally in its generation. The two known ways to trigger this problem were: Errors raised in stateful tests„ŗteardown function. Errors raised in finally blocks that wrapped a call to data.draw. These cases will now be handled correctly. 3.86.2: This patch is a docs-only change to fix a broken hyperlink. 3.86.1: This patch fixes issue 1732, where integers() would always return long values on Python 2. 3.86.0: This release ensures that infinite numbers are never generated by floats() with allow_infinity=False, which could previously happen in some cases where one bound was also provided. The trivially inconsistent min_value=inf, allow_infinity=False now raises an InvalidArgumentError, as does the inverse with max_value. You can still use just(inf) to generate inf without violating other constraints.
Revision 1.65 / (download) - annotate - [select for diffs], Thu Dec 13 07:11:49 2018 UTC (4 years, 9 months ago) by adam
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4
Changes since 1.64: +5 -5 lines
Diff to previous 1.64 (colored)
py-hypothesis: updated to 3.83.1 3.83.1: This patch increases the variety of examples generated by st.from_type(type). 3.83.0: Our pytest plugin now warns you when strategy functions have been collected as tests, which may happen when e.g. using the :func:@composite <hypothesis.strategies.composite> decorator when you should be using @given(st.data()) for inline draws. Such functions always pass when treated as tests, because the lazy creation of strategies mean that the function body is never actually executed! 3.82.6: Hypothesis can now :ref:show statistics <statistics> when running under :pypi:pytest-xdist. Previously, statistics were only reported when all tests were run in a single process (:issue:700). 3.82.5: This patch fixes :issue:1667, where passing bounds of Numpy dtype int64 to :func:~hypothesis.strategies.integers could cause errors on Python 3 due to internal rounding. 3.82.4: Hypothesis now seeds and resets the global state of :class:np.random <numpy:numpy.random.RandomState> for each test case, to ensure that tests are reproducible. This matches and complements the existing handling of the :mod:python:random module - Numpy simply maintains an independent PRNG for performance reasons. 3.82.3: This is a no-op release to add the new Framework :: Hypothesis trove classifier to :pypi:hypothesis on PyPI. You can use it as a filter to find Hypothesis-related packages such as extensions as they add the tag over the coming weeks, or simply visit :doc:our curated list <strategies>. 3.82.2: The :ref:Hypothesis for Pandas extension <hypothesis-pandas> is now listed in setup.py, so you can pip install hypothesis[pandas]. Thanks to jmshi for this contribution.
Revision 1.64 / (download) - annotate - [select for diffs], Mon Nov 5 08:35:04 2018 UTC (4 years, 10 months ago) by adam
Changes since 1.63: +5 -5 lines
Diff to previous 1.63 (colored)
py-hypothesis: updated to 3.82.1 3.82.1: This patch fixes :func:~hypothesis.strategies.from_type on Python 2 for classes where cls.__init__ is object.__init__. 3.82.0: The alphabet argument for :func:~hypothesis.strategies.text now uses its default value of characters(blacklist_categories=('Cs',)) directly, instead of hiding that behind alphabet=None and replacing it within the function. Passing None is therefore deprecated.
Revision 1.63 / (download) - annotate - [select for diffs], Mon Oct 29 08:21:57 2018 UTC (4 years, 10 months ago) by adam
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)
py-hypothesis: updated to 3.81.0 3.81.0: :class:~hypothesis.stateful.GenericStateMachine and :class:~hypothesis.stateful.RuleBasedStateMachine now raise an explicit error when instances of :obj:~hypothesis.settings are assigned to the classes' settings attribute, which is a no-op (:issue:1643). Instead assign to SomeStateMachine.TestCase.settings, or use @settings(...) as a class decorator to handle this automatically.
Revision 1.62 / (download) - annotate - [select for diffs], Fri Oct 26 08:05:31 2018 UTC (4 years, 10 months ago) by adam
Changes since 1.61: +5 -5 lines
Diff to previous 1.61 (colored)
py-hypothesis: updated to 3.80.0 3.80.0: Since :ref:version 3.68.0 <v3.68.0>, :func:~hypothesis.extra.numpy.arrays checks that values drawn from the elements and fill strategies can be safely cast to the dtype of the array, and emits a warning otherwise. This release expands the checks to cover overflow for finite complex64 elements and string truncation caused by too-long elements or trailing null characters (:issue:1591). 3.79.4: Tests using :func:@given <hypothesis.given> now shrink errors raised from :pypi:pytest helper functions, instead of reporting the first example found. This was previously fixed in :ref:version 3.56.0 <v3.56.0>, but only for stateful testing. 3.79.3: Traceback elision is now disabled on Python 2, to avoid an import-time :class:python:SyntaxError under Python < 2.7.9 (Python: :bpo:21591, :ref:Hypothesis 3.79.2 <v3.79.2>: :issue:1648). We encourage all users to upgrade to Python 3 before the end of 2019. 3.79.2: This patch shortens tracebacks from Hypothesis, so you can see exactly happened in your code without having to skip over irrelevant details about our internals (:issue:848). In the example test (see :pull:1582), this reduces tracebacks from nine frames to just three - and for a test with multiple errors, from seven frames per error to just one! If you do want to see the internal details, you can disable frame elision by setting :obj:~hypothesis.settings.verbosity to debug. 3.79.1: The abstract number classes :class:~python:numbers.Number, :class:~python:numbers.Complex, :class:~python:numbers.Real, :class:~python:numbers.Rational, and :class:~python:numbers.Integral are now supported by the :func:~hypothesis.strategies.from_type strategy. Previously, you would have to use :func:~hypothesis.strategies.register_type_strategy before they could be resolved (:issue:1636) 3.79.0: This release adds a CLI flag for verbosity --hypothesis-verbosity to the Hypothesis pytest plugin, applied after loading the profile specified by --hypothesis-profile. Valid options are the names of verbosity settings, quiet, normal, verbose or debug. The pytest header now correctly reports the current profile if --hypothesis-profile has been used.
Revision 1.61 / (download) - annotate - [select for diffs], Thu Oct 18 10:07:18 2018 UTC (4 years, 11 months ago) by adam
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored)
py-hypothesis: updated to 3.78.0 3.78.0: This release has deprecated the generation of integers, floats and fractions when the conversion of the upper and/ or lower bound is not 100% exact, e.g. when an integer gets passed a bound that is not a whole number. (:issue:1625) 3.77.0: This minor release adds functionality to :obj:~hypothesis.settings allowing it to be used as a decorator on :obj:~hypothesis.stateful.RuleBasedStateMachine and :obj:~hypothesis.stateful.GenericStateMachine. 3.76.1: This patch fixes some warnings added by recent releases of :pypi:pydocstyle and :pypi:mypy.
Revision 1.60 / (download) - annotate - [select for diffs], Fri Oct 12 11:49:59 2018 UTC (4 years, 11 months ago) by adam
Changes since 1.59: +5 -5 lines
Diff to previous 1.59 (colored)
py-hypothesis: updated to 3.76.0 3.76.0: This release deprecates using floats for min_size and max_size. The type hint for average_size arguments has been changed from Optional[int] to None, because non-None values are always ignored and deprecated. 3.75.4: This patch adds more internal comments to the core engine's sequence-length shrinker. There should be no user-visible change. 3.75.3: This patch adds additional comments to some of the core engine's internal data structures. There is no user-visible change. 3.75.2: This patch avoids caching a trivial case, fixing :issue:493. 3.75.1: This patch fixes a broken link in a docstring. 3.75.0: This release deprecates the use of min_size=None, setting the default min_size to 0 (:issue: 1618). 3.74.3: This patch makes some small internal changes to comply with a new lint setting in the build. There should be no user-visible change. 3.74.2: This patch fixes :issue:1153, where time spent reifying a strategy was also counted in the time spent generating the first example. Strategies are now fully constructed and validated before the timer is started. 3.74.1: This patch fixes some broken formatting and links in the documentation.
Revision 1.59 / (download) - annotate - [select for diffs], Wed Oct 3 09:56:52 2018 UTC (4 years, 11 months ago) by adam
Changes since 1.58: +5 -5 lines
Diff to previous 1.58 (colored)
py-hypothesis: updated to 3.74.0 3.74.0: This release checks that the value of the :attr:~hypothesis.settings.print_blob setting is a :class:~hypothesis.PrintSettings instance. Being able to specify a boolean value was not intended, and is now deprecated. In addition, specifying True will now cause the blob to always be printed, instead of causing it to be suppressed. Specifying any value that is not a :class:~hypothesis.PrintSettings or a boolean is now an error. 3.73.5: Changes the documentation for hypothesis.strategies.datetimes, hypothesis.strategies.dates, hypothesis.strategies.times to use the new parameter names min_value and max_value instead of the deprecated names 3.73.4: This patch ensures that Hypothesis deprecation warnings display the code that emitted them when you're not running in -Werror mode (:issue:652). 3.73.3: Tracebacks involving :func:@composite <hypothesis.strategies.composite> are now slightly shorter due to some internal refactoring. 3.73.2: This patch fixes errors in the internal comments for one of the shrinker passes. There is no user-visible change. 3.73.1: This patch substantially improves the distribution of data generated with :func:~hypothesis.strategies.recursive, and fixes a rare internal error (:issue:1502). 3.73.0: This release adds the :func:~hypothesis.extra.dpcontracts.fulfill function, which is designed for testing code that uses :pypi:dpcontracts 0.4 or later for input validation. This provides some syntactic sugar around use of :func:~hypothesis.assume, to automatically filter out and retry calls that cause a precondition check to fail (:issue:1474). 3.72.0: This release makes setting attributes of the :class:hypothesis.settings class an explicit error. This has never had any effect, but could mislead users who confused it with the current settings instance hypothesis.settings.default (which is also immutable). You can change the global settings with :ref:settings profiles <settings_profiles>. 3.71.11: This patch factors out some common code in the shrinker for iterating over pairs of data blocks. There should be no user-visible change.
Revision 1.58 / (download) - annotate - [select for diffs], Wed Sep 19 11:35:36 2018 UTC (5 years ago) by adam
CVS Tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3
Changes since 1.57: +5 -5 lines
Diff to previous 1.57 (colored)
py-hypothesis: updated to 3.71.10 3.71.10: This patch allows :func:~hypothesis.strategies.from_type to handle the empty tuple type, :obj:typing.Tuple[()] <python:typing.Tuple>. 3.71.9: This patch updates some internal comments for :pypi:mypy. There is no user-visible effect, even for Mypy users. 3.71.8: This patch fixes a rare bug that would cause a particular shrinker pass to raise an IndexError, if a shrink improvement changed the underlying data in an unexpected way. 3.71.7: This release fixes the broken cross-references in our docs, and adds a CI check so we don't add new ones. 3.71.6: This patch fixes two bugs (:issue:944 and :issue:1521), where messages about :func:@seed <hypothesis.seed> did not check the current verbosity setting, and the wrong settings were active while executing :ref:explicit examples <providing-explicit-examples>. 3.71.5: This patch fixes a DeprecationWarning added in Python 3.8 (:issue:1576). 3.71.4: This is a no-op release, which implements automatic DOI minting and code archival of Hypothesis via Zenodo. Thanks to CERN and the EU Horizon 2020 programme for providing this service! Check our :gh-file:CITATION file for details, or head right on over to doi.org/10.5281/zenodo.1412597 3.71.3: This release adds the test name to some deprecation warnings, for easier debugging. 3.71.2: This release makes Hypothesis's memory usage substantially smaller for tests with many examples, by bounding the number of past examples it keeps around. You will not see much difference unless you are running tests with :obj:~hypothesis.settings.max_examples set to well over 1000, but if you do have such tests then you should see memory usage mostly plateau where previously it would have grown linearly with time. 3.71.1: This patch adds internal comments to some tree traversals in the core engine. There is no user-visible change. 3.71.0: This release deprecates the coverage-guided testing functionality, as it has proven brittle and does not really pull its weight. We intend to replace it with something more useful in the future, but the feature in its current form does not seem to be worth the cost of using, and whatever replaces it will likely look very different.
Revision 1.57 / (download) - annotate - [select for diffs], Mon Sep 3 07:39:34 2018 UTC (5 years ago) by adam
Changes since 1.56: +5 -5 lines
Diff to previous 1.56 (colored)
py-hypothesis: updated to 3.70.0 3.70.0: This release adds a fullmatch argument to :func:~hypothesis.strategies.from_regex. When fullmatch=True, the whole example will match the regex pattern as for :func:python:re.fullmatch. 3.69.12: This release reverts the changes to logging handling in 3.69.11, which broke test that use the :pypi:pytest caplog fixture internally because all logging was disabled (:issue:1546). 3.69.11: This patch will hide all logging messages produced by test cases before the final, minimal, failing test case (:issue:356). 3.69.10: This patch fixes a bug that prevents coverage from reporting unexecuted Python files (:issue:1085). 3.69.9: This patch improves the packaging of the Python package by adding LICENSE.txt to the sdist (:issue:1311), clarifying the minimum supported versions of :pypi:pytz and :pypi:dateutil <python-dateutil> (:issue:1383), and adds keywords to the metadata (:issue:1520). 3.69.8: This is an internal change which replaces pickle with json to prevent possible security issues. 3.69.7: This patch ensures that :func:~hypothesis.note prints the note for every test case when the :obj:~hypothesis.settings.verbosity setting is Verbosity.verbose. At normal verbosity it only prints from the final test case. 3.69.6: This patch improves the testing of some internal caching. It should have no user-visible effect. 3.69.5: This change performs a small rename and refactoring in the core engine. There is no user-visible change. 3.69.4: This change improves the core engine's ability to avoid unnecessary work, by consulting its cache of previously-tried inputs in more cases.
Revision 1.56 / (download) - annotate - [select for diffs], Mon Aug 27 06:17:33 2018 UTC (5 years ago) by adam
Changes since 1.55: +5 -5 lines
Diff to previous 1.55 (colored)
py-hypothesis: updated to 3.69.3 3.69.3: This patch handles passing an empty :class:python:enum.Enum to :func:~hypothesis.strategies.from_type returns :func:~hypothesis.strategies.nothing, instead of raising an internal :class:python:AssertionError. 3.69.2: This patch fixes a small mistake in an internal comment. There is no user-visible change. 3.69.1: This change fixes a small bug in how the core engine consults its cache of previously-tried inputs. There is unlikely to be any user-visible change. 3.69.0: This release improves argument validation for stateful testing. If the target or targets of a :func:~hypothesis.stateful.rule are invalid, we now raise a useful validation error rather than an internal exception. Passing both the target and targets arguments is deprecated - append the target bundle to the targets tuple of bundles instead. Passing the name of a Bundle rather than the Bundle itself is also deprecated.
Revision 1.55 / (download) - annotate - [select for diffs], Fri Aug 17 07:15:22 2018 UTC (5 years, 1 month ago) by adam
Changes since 1.54: +5 -5 lines
Diff to previous 1.54 (colored)
py-hypothesis: updated to 3.68.0 3.68.0: :func:~hypothesis.extra.numpy.arrays now checks that integer and float values drawn from elements and fill strategies can be safely cast to the dtype of the array, and emits a warning otherwise. Elements in the resulting array could previously violate constraints on the elements strategy due to floating-point overflow or truncation of integers to fit smaller types. 3.67.1: This release contains a tiny refactoring of the internals. There is no user-visible change. 3.67.0: This release adds a width argument to :func:~hypothesis.strategies.floats, to generate lower-precision floating point numbers for e.g. Numpy arrays. The generated examples are always instances of Python's native float type, which is 64bit, but passing width=32 will ensure that all values can be exactly represented as 32bit floats. This can be useful to avoid overflow (to +/- infinity), and for efficiency of generation and shrinking. Half-precision floats (width=16) are also supported, but require Numpy if you are running Python 3.5 or earlier.
Revision 1.54 / (download) - annotate - [select for diffs], Tue Jul 3 07:47:45 2018 UTC (5 years, 2 months ago) by adam
Changes since 1.53: +5 -5 lines
Diff to previous 1.53 (colored)
py-hypothesis: updated to 3.65.0 3.65.0: This release deprecates the :obj:~hypothesis.settings.max_shrinks setting in favor of an internal heuristic. If you need to avoid shrinking examples, use the :obj:~hypothesis.settings.phases setting instead. (:issue:1235) 3.64.2: This release fixes a bug where an internal assertion error could sometimes be triggered while shrinking a failing test. 3.64.1: This patch fixes type-checking errors in our vendored pretty-printer, which were ignored by our mypy config but visible for anyone else (whoops). Thanks to Pi Delport for reporting :issue:1359 so promptly. 3.64.0: This release adds :ref:an interface <custom-function-execution> which can be used to insert a wrapper between the original test function and :func:@given <hypothesis.given> (:issue:1257). This will be particularly useful for test runner extensions such as :pypi:pytest-trio, but is not recommended for direct use by other users of Hypothesis. 3.63.0: This release adds a new mechanism to infer strategies for classes defined using :pypi:attrs, based on the the type, converter, or validator of each attribute. This inference is now built in to :func:~hypothesis.strategies.builds and :func:~hypothesis.strategies.from_type. On Python 2, :func:~hypothesis.strategies.from_type no longer generates instances of int when passed long, or vice-versa. 3.62.0: This release adds PEP 484 type hints to Hypothesis on a provisional basis, using the comment-based syntax for Python 2 compatibility. You can :ref:read more about our type hints here <our-type-hints>. It also adds the py.typed marker specified in PEP 561. After you pip install hypothesis, :pypi:mypy 0.590 or later will therefore type-check your use of our public interface! 3.61.0: This release deprecates the use of :class:~hypothesis.settings as a context manager, the use of which is somewhat ambiguous. Users should define settings with global state or with the :func:@settings(...) <hypothesis.settings> decorator. 3.60.1: Fixed a bug in generating an instance of a Django model from a strategy where the primary key is generated as part of the strategy. See :ref:details here <django-generating-primary-key>. 3.60.0: This release add initialize decorator for stateful testing (originally discussed in :issue:1216). initialize act as a special rule that is only called once, and all initialize rules are guaranteed to be called before any normal rule is called.
Revision 1.53 / (download) - annotate - [select for diffs], Sat Jun 16 12:09:13 2018 UTC (5 years, 3 months ago) by adam
CVS Tags: pkgsrc-2018Q2-base, pkgsrc-2018Q2
Changes since 1.52: +5 -5 lines
Diff to previous 1.52 (colored)
py-hypothesis: updated to 3.59.0 3.59.0: This release adds the :func:~hypothesis.strategies.emails strategy, which generates unicode strings representing an email address. 3.58.1: This improves the shrinker. It can now reorder examples: 3 1 2 becomes 1 2 3. 3.58.0: This adds a new extra :py:func:~hypothesis.extra.dateutil.timezones strategy that generates dateutil timezones. Depends on :pypi:python-dateutil.
Revision 1.52 / (download) - annotate - [select for diffs], Wed Jun 6 19:26:09 2018 UTC (5 years, 3 months ago) by adam
Changes since 1.51: +5 -5 lines
Diff to previous 1.51 (colored)
py-hypothesis: updated to 3.57.0 3.57.0: Using an unordered collection with the :func:~hypothesis.strategies.permutations strategy has been deprecated because the order in which e.g. a set shrinks is arbitrary. This may cause different results between runs. 3.56.10: This release makes :obj:~hypothesis.settings.define_setting a private method, which has the effect of hiding it from the documentation. 3.56.9: This is another release with no functionality changes as part of changes to Hypothesis's new release tagging scheme. 3.56.8: This is a release with no functionality changes that moves Hypothesis over to a new release tagging scheme. 3.56.7: This release provides a performance improvement for most tests, but in particular users of sampled_from who don't have numpy installed should see a significant performance improvement. 3.56.6: This patch contains further internal work to support Mypy. There are no user-visible changes... yet.
Revision 1.51 / (download) - annotate - [select for diffs], Sun May 6 09:06:42 2018 UTC (5 years, 4 months ago) by adam
Changes since 1.50: +5 -5 lines
Diff to previous 1.50 (colored)
py-hypothesis: updated to 3.56.5 3.56.5: This patch contains some internal refactoring to run :pypi:mypy in CI. There are no user-visible changes. 3.56.4: This release involves some very minor internal clean up and should have no user visible effect at all. 3.56.3: This release fixes a problem introduced in :ref:3.56.0 <v3.56.0> where setting the hypothesis home directory (through currently undocumented means) would no longer result in the default database location living in the new home directory. 3.56.2: This release fixes a problem introduced in :ref:3.56.0 <v3.56.0> where setting :obj:~hypothesis.settings.max_examples to 1 would result in tests failing with Unsatisfiable. This problem could also occur in other harder to trigger circumstances (e.g. by setting it to a low value, having a hard to satisfy assumption, and disabling health checks). 3.56.1: This release fixes a problem that was introduced in :ref:3.56.0 <v3.56.0>: Use of the :envvar:HYPOTHESIS_VERBOSITY_LEVEL environment variable was, rather than deprecated, actually broken due to being read before various setup the deprecation path needed was done. It now works correctly (and emits a deprecation warning). 3.56.0: This release deprecates several redundant or internally oriented :class:~hypothesis.settings, working towards an orthogonal set of configuration options that are widely useful without requiring any knowledge of our internals
Revision 1.50 / (download) - annotate - [select for diffs], Thu Apr 5 12:43:27 2018 UTC (5 years, 5 months ago) by adam
Changes since 1.49: +5 -5 lines
Diff to previous 1.49 (colored)
py-hypothesis: updated to 3.55.0 3.55.0: This release includes several improvements to the handling of the :obj:~hypothesis.settings.database setting. The :obj:~hypothesis.settings.database_file setting was a historical artefact, and you should just use :obj:~hypothesis.settings.database directly. The :envvar:HYPOTHESIS_DATABASE_FILE environment variable is deprecated, in favor of :meth:~hypothesis.settings.load_profile and the :obj:~hypothesis.settings.database setting. If you have not configured the example database at all and the default location is not usable (due to e.g. permissions issues), Hypothesis will fall back to an in-memory database. This is not persisted between sessions, but means that the defaults work on read-only filesystems. 3.54.0: This release improves the :func:~hypotheses.strategies.complex_numbers strategy, which now supports min_magnitude and max_magnitude arguments, along with allow_nan and allow_infinity like for :func:~hypotheses.strategies.floats. 3.53.0: This release removes support for Django 1.8, which reached end of life on 2018-04-01.
Revision 1.49 / (download) - annotate - [select for diffs], Fri Mar 23 07:51:09 2018 UTC (5 years, 6 months ago) by adam
CVS Tags: pkgsrc-2018Q1-base, pkgsrc-2018Q1
Changes since 1.48: +5 -5 lines
Diff to previous 1.48 (colored)
py-hypothesis: updated to 3.50.2 3.50.2: This has no user-visible changes except one slight formatting change to one docstring, to avoid a deprecation warning. 3.50.1: This patch fixes an internal error introduced in 3.48.0, where a check for the Django test runner would expose import-time errors in Django configuration. 3.50.0: This release improves validation of numeric bounds for some strategies.
Revision 1.48 / (download) - annotate - [select for diffs], Thu Mar 15 09:08:36 2018 UTC (5 years, 6 months ago) by adam
Changes since 1.47: +5 -5 lines
Diff to previous 1.47 (colored)
py-hypothesis: updated to 3.49.1 3.49.1: This patch fixes our tests for Numpy dtype strategies on big-endian platforms, where the strategy behaved correctly but the test assumed that the native byte order was little-endian. There is no user impact unless you are running our test suite on big-endian platforms. Thanks to Graham Inggs for reporting :issue:1164. 3.49.0: This release deprecates passing elements=None to collection strategies, such as :func:~hypothesis.strategies.lists. Requiring lists(nothing()) or builds(list) instead of lists() means slightly more typing, but also improves the consistency and discoverability of our API - as well as showing how to compose or construct strategies in ways that still work in more complex situations. Passing a nonzero max_size to a collection strategy where the elements strategy contains no values is now deprecated, and will be an error in a future version. The equivalent with elements=None is already an error.
Revision 1.47 / (download) - annotate - [select for diffs], Tue Mar 6 08:06:37 2018 UTC (5 years, 6 months ago) by adam
Changes since 1.46: +5 -5 lines
Diff to previous 1.46 (colored)
py-hypothesis: updated to 3.48.1 3.48.1: This patch will minimize examples that would come out non-minimal in previous versions.
Revision 1.46 / (download) - annotate - [select for diffs], Mon Mar 5 13:52:38 2018 UTC (5 years, 6 months ago) by adam
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored)
py-hypothesis: updated 3.48.0 3.48.0: 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.settings.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.
Revision 1.45 / (download) - annotate - [select for diffs], Fri Mar 2 14:49:36 2018 UTC (5 years, 6 months ago) by adam
Changes since 1.44: +5 -5 lines
Diff to previous 1.44 (colored)
py-hypothesis: updated to 3.47.0 3.47.0: :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.
Revision 1.44 / (download) - annotate - [select for diffs], Mon Feb 26 08:40:42 2018 UTC (5 years, 6 months ago) by adam
Changes since 1.43: +5 -5 lines
Diff to previous 1.43 (colored)
py-hypothesis: updated to 3.46.0 3.46.0: :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 u'Nd'), or as the 'major category' (eg [u'N', u'Lu'] is equivalent to [u'Nd', u'Nl', u'No', u'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.
Revision 1.43 / (download) - annotate - [select for diffs], Tue Feb 6 08:03:22 2018 UTC (5 years, 7 months ago) by adam
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)
py-hypothesis: updated to 3.44.26 3.44.26: This release fixes some formatting issues in the Hypothesis source code. It should have no externally visible effects. 3.44.25: This release changes the way in which Hypothesis tries to shrink the size of examples. It probably won't have much impact, but might make shrinking faster in some cases. It is unlikely but not impossible that it will change the resulting examples.
Revision 1.42 / (download) - annotate - [select for diffs], Fri Feb 2 08:18:30 2018 UTC (5 years, 7 months ago) by adam
Changes since 1.41: +5 -5 lines
Diff to previous 1.41 (colored)
py-hypothesis: updated to 3.44.24 3.44.24: This release fixes dependency information when installing Hypothesis from a binary "wheel" distribution. The install_requires for enum34 is resolved at install time, rather than at build time (with potentially different results). Django has fixed their python_requires for versions 2.0.0 onward, simplifying Python2-compatible constraints for downstream projects.
Revision 1.41 / (download) - annotate - [select for diffs], Fri Jan 19 08:58:25 2018 UTC (5 years, 8 months ago) by adam
Changes since 1.40: +5 -5 lines
Diff to previous 1.40 (colored)
py-hypothesis: updated to 3.44.16 3.44.16: This release improves test case reduction for recursive data structures. Hypothesis now guarantees that whenever a strategy calls itself recursively (usually this will happen because you are using ~hypothesis.strategies.deferred), any recursive call may replace the top level value. e.g. given a tree structure, Hypothesis will always try replacing it with a subtree. Additionally this introduces a new heuristic that may in some circumstances significantly speed up test case reduction - Hypothesis should be better at immediately replacing elements drawn inside another strategy with their minimal possible value. 3.44.15: ~hypothesis.strategies.from_type can now resolve recursive types such as binary trees. Detection of non-type arguments has also improved, leading to better error messages in many cases involving 3.44.14: This release fixes a bug in the shrinker that prevented the optimisations in 3.44.6 from working in some cases. It would not have worked correctly when filtered examples were nested (e.g. with a set of integers in some range). This would not have resulted in any correctness problems, but shrinking may have been slower than it otherwise could be. 3.44.13: This release changes the average bit length of values drawn from ~hypothesis.strategies.integers to be much smaller. Additionally it changes the shrinking order so that now size is considered before sign - e.g. -1 will be preferred to +10. The new internal format for integers required some changes to the minimizer to make work well, so you may also see some improvements to example quality in unrelated areas. 3.44.12: This changes Hypothesis's internal implementation of weighted sampling. This will affect example distribution and quality, but you shouldn't see any other effects. 3.44.11: This is a change to some internals around how Hypothesis handles avoiding generating duplicate examples and seeking out novel regions of the search space. You are unlikely to see much difference as a result of it, but it fixes a bug where an internal assertion could theoretically be triggered and has some minor effects on the distribution of examples so could potentially find bugs that have previously been missed. 3.44.10: This patch avoids creating debug statements when debugging is disabled. Profiling suggests this is a 5-10% performance improvement
Revision 1.40 / (download) - annotate - [select for diffs], Mon Jan 1 21:14:47 2018 UTC (5 years, 8 months ago) by adam
Changes since 1.39: +5 -5 lines
Diff to previous 1.39 (colored)
py-hypothesis: updated to 3.44.4 3.44.4: This release fixes :issue:1044, which slowed tests by up to 6% due to broken caching.
Revision 1.39 / (download) - annotate - [select for diffs], Fri Dec 22 05:57:50 2017 UTC (5 years, 9 months ago) by adam
CVS Tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4
Changes since 1.38: +5 -5 lines
Diff to previous 1.38 (colored)
py-hypothesis: updated to 3.44.3 3.44.3: This release improves the shrinker in cases where examples drawn earlier can affect how much data is drawn later (e.g. when you draw a length parameter in a composite and then draw that many elements). Examples found in cases like this should now be much closer to minimal. 3.44.2: This is a pure refactoring release which changes how Hypothesis manages its set of examples internally. It should have no externally visible effects. 3.44.1: This release fixes :issue:`997`, in which under some circumstances the body of tests run under Hypothesis would not show up when run under coverage even though the tests were run and the code they called outside of the test file would show up normally. 3.44.0: This release adds a new feature: The :ref:`@reproduce_failure <reproduce_failure>`, designed to make it easy to use Hypothesis's binary format for examples to reproduce a problem locally without having to share your example database between machines. This also changes when seeds are printed: They will no longer be printed for normal falsifying examples, as there are now adequate ways of reproducing those for all cases, so it just contributes noise. They will once again be printed when reusing examples from the database, as health check failures should now be more reliable in this scenario so it will almost always work in this case.
Revision 1.38 / (download) - annotate - [select for diffs], Wed Dec 13 08:17:10 2017 UTC (5 years, 9 months ago) by adam
Changes since 1.37: +5 -5 lines
Diff to previous 1.37 (colored)
py-hypothesis: updated to 3.42.2 3.42.2: This patch fixes :issue:1017, where instances of a list or tuple subtype used as an argument to a strategy would be coerced to tuple. 3.42.1: This release has some internal cleanup, which makes reading the code more pleasant and may shrink large examples slightly faster. 3.42.0: This release deprecates :ref:faker-extra, which was designed as a transition strategy but does not support example shrinking or coverage-guided discovery.
Revision 1.37 / (download) - annotate - [select for diffs], Thu Nov 16 07:59:55 2017 UTC (5 years, 10 months ago) by adam
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)
py-hypothesis: updated to 3.37.0 3.37.0: This is a deprecation release for some health check related features. The following are now deprecated: * Passing exception_in_generation to suppress_health_check. This no longer does anything even when passed - All errors that occur during data generation will now be immediately reraised rather than going through the health check mechanism. * Passing random_module to suppress_health_check. This hasn„ŗ—’ done anything for a long time, but was never explicitly deprecated. Hypothesis always seeds the random module when running @given tests, so this is no longer an error and suppressing it doesn„ŗ—’ do anything. * Passing non-HealthCheck values in suppress_health_check. This was previously allowed but never did anything useful. In addition, passing a non-iterable value as suppress_health_check will now raise an error immediately (it would never have worked correctly, but it would previously have failed later). Some validation error messages have also been updated.
Revision 1.36 / (download) - annotate - [select for diffs], Thu Nov 9 07:41:44 2017 UTC (5 years, 10 months ago) by adam
Changes since 1.35: +5 -5 lines
Diff to previous 1.35 (colored)
py-hypothesis: updated to 3.36.0 3.36.0: This release adds a setting to the public API, and does some internal cleanup: The :attr:`~hypothesis.settings.derandomize` setting is now documented Removed - and disallowed - all 'bare excepts' in Hypothesis Documented the :attr:`~hypothesis.settings.strict` setting as deprecated, and updated the build so our docs always match deprecations in the code.
Revision 1.35 / (download) - annotate - [select for diffs], Mon Nov 6 10:39:08 2017 UTC (5 years, 10 months ago) by adam
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored)
py-hypothesis: updated to 3.34.1 3.34.1: This patch updates the documentation to suggest :func:`builds(callable) <hypothesis.strategies.builds>` instead of :func:`just(callable()) <hypothesis.strategies.just>`. 3.34.0: Hypothesis now emits deprecation warnings if you apply :func:`@given <hypothesis.given>` more than once to a target. Applying :func:`@given <hypothesis.given>` repeatedly wraps the target multiple times. Each wrapper will search the space of of possible parameters separately. This is equivalent but will be much more inefficient than doing it with a single call to :func:`@given <hypothesis.given>`. For example, instead of @given(booleans()) @given(integers()), you could write @given(booleans(), integers())
Revision 1.34 / (download) - annotate - [select for diffs], Thu Nov 2 07:16:35 2017 UTC (5 years, 10 months ago) by adam
Changes since 1.33: +5 -5 lines
Diff to previous 1.33 (colored)
py-hypothesis: updated to 3.33.1 3.33.1: This is a bugfix release: * :func:`~hypothesis.strategies.builds` would try to infer a strategy for required positional arguments of the target from type hints, even if they had been given to :func:`~hypothesis.strategies.builds` as positional arguments (:issue:`946`). Now it only infers missing required arguments. * An internal introspection function wrongly reported self as a required argument for bound methods, which might also have affected :func:`~hypothesis.strategies.builds`. Now it knows better.
Revision 1.33 / (download) - annotate - [select for diffs], Mon Oct 16 18:35:19 2017 UTC (5 years, 11 months ago) by adam
Changes since 1.32: +5 -5 lines
Diff to previous 1.32 (colored)
py-hypothesis: update to 3.33.0 3.33.0: This release supports strategy inference for more field types in Django models() - you can now omit an argument for Date, Time, Duration, Slug, IP Address, and UUID fields. Strategy generation for fields with grouped choices now selects choices from each group, instead of selecting from the group names.
Revision 1.32 / (download) - annotate - [select for diffs], Thu Oct 5 06:48:38 2017 UTC (5 years, 11 months ago) by adam
Changes since 1.31: +5 -5 lines
Diff to previous 1.31 (colored)
py-hypothesis: update to 3.31.2: This release fixes some formatting and small typos/grammar issues in the documentation, specifically the page docs/settings.rst, and the inline docs for the various settings.
Revision 1.31 / (download) - annotate - [select for diffs], Sat Sep 30 13:12:04 2017 UTC (5 years, 11 months ago) by adam
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored)
py-hypothesis: update to 3.31.1 3.31.1: This release improves the handling of deadlines so that they act better with the shrinking process. This fixes :issue:`892`. This involves two changes: 1. The deadline is raised during the initial generation and shrinking, and then lowered to the set value for final replay. This restricts our attention to examples which exceed the deadline by a more significant margin, which increases their reliability. 2. When despite the above a test still becomes flaky because it is significantly faster on rerun than it was on its first run, the error message is now more explicit about the nature of this problem, and includes both the initial test run time and the new test run time. In addition, this release also clarifies the documentation of the deadline setting slightly to be more explicit about where it applies.
Revision 1.30 / (download) - annotate - [select for diffs], Wed Sep 13 06:26:55 2017 UTC (6 years ago) by adam
CVS Tags: pkgsrc-2017Q3-base, pkgsrc-2017Q3
Changes since 1.29: +5 -5 lines
Diff to previous 1.29 (colored)
py-hypothesis: update to 3.26.0 3.26.0: Hypothesis now emits deprecation warnings if you are using the legacy SQLite example database format, or the tool for merging them. These were already documented as deprecated, so this doesn't change their deprecation status, only that we warn about it.
Revision 1.29 / (download) - annotate - [select for diffs], Fri Sep 8 11:03:28 2017 UTC (6 years ago) by adam
Changes since 1.28: +5 -5 lines
Diff to previous 1.28 (colored)
3.24.1: This release improves the reduction of examples involving floating point numbers to produce more human readable examples. It also has some general purpose changes to the way the minimizer works internally, which may see some improvement in quality and slow down of test case reduction in cases that have nothing to do with floating point numbers. 3.24.0: Hypothesis now emits deprecation warnings if you use example() inside a test function or strategy definition (this was never intended to be supported, but is sufficiently widespread that it warrants a deprecation path).
Revision 1.28 / (download) - annotate - [select for diffs], Mon Sep 4 17:28:45 2017 UTC (6 years ago) by adam
Changes since 1.27: +5 -5 lines
Diff to previous 1.27 (colored)
3.23.2: This is a small refactoring release that removes a now-unused parameter to an internal API. It shouldn„ŗ—’ have any user visible effect. 3.23.1: Hypothesis no longer propagates the dynamic scope of settings into strategy definitions. This release is a small change to something that was never part of the public API and you will almost certainly not notice any effect unless you„ŗ—”e doing something surprising, but for example the following code will now give a different answer in some circumstances: import hypothesis.strategies as st from hypothesis import settings CURRENT_SETTINGS = st.builds(lambda: settings.default) (We don„ŗ—’ actually encourage you writing code like this) Previously this would have generated the settings that were in effect at the point of definition of CURRENT_SETTINGS. Now it will generate the settings that are used for the current test. It is very unlikely to be significant enough to be visible, but you may also notice a small performance improvement.
Revision 1.27 / (download) - annotate - [select for diffs], Sun Aug 27 12:16:07 2017 UTC (6 years ago) by adam
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)
3.22.0: This release provides what should be a substantial performance improvement to numpy arrays generated using provided numpy support, and adds a new fill_value argument to arrays() to control this behaviour.
Revision 1.26 / (download) - annotate - [select for diffs], Sat Aug 19 12:16:20 2017 UTC (6 years, 1 month ago) by adam
Changes since 1.25: +5 -5 lines
Diff to previous 1.25 (colored)
3.18.5: This is a bugfix release for ~hypothesis.strategies.integers. Previously the strategy would hit an internal assertion if passed non-integer bounds for min_value and max_value that had no integers between them. The strategy now raises InvalidArgument instead.
Revision 1.25 / (download) - annotate - [select for diffs], Sun Aug 13 09:46:55 2017 UTC (6 years, 1 month ago) by adam
Changes since 1.24: +5 -5 lines
Diff to previous 1.24 (colored)
3.17.0: This release documents the previously undocumented phases feature„ŗ making it part of the official public API. It also updates how the example database is used. Principally: * A Phases.reuse argument will now correctly control whether examples from the database are run (it previously did exactly the wrong thing and controlled whether examples would be saved). * Hypothesis will no longer try to rerun all previously failing examples. Instead it will replay the smallest previously failing example and a selection of other examples that are likely to trigger any other bugs that will found. This prevents a previous failure from dominating your tests unnecessarily. * As a result of the previous change, Hypothesis will be slower about clearing out old examples from the database that are no longer failing (because it can only clear out ones that it actually runs).
Revision 1.24 / (download) - annotate - [select for diffs], Mon Aug 7 18:00:41 2017 UTC (6 years, 1 month ago) by adam
Changes since 1.23: +5 -5 lines
Diff to previous 1.23 (colored)
3.16.1: This release makes an implementation change to how Hypothesis handles certain internal constructs. The main effect you should see is improvement to the behaviour and performance of collection types, especially ones with a min_size parameter. Many cases that would previously fail due to being unable to generate enough valid examples will now succeed, and other cases should run slightly faster. 3.16.0: This release introduces a deprecation of the timeout feature. This results in the following changes: Creating a settings object with an explicit timeout will emit a deprecation warning. If your test stops because it hits the timeout (and has not found a bug) then it will emit a deprecation warning. There is a new value unlimited which you can import from hypothesis. settings(timeout=unlimited) will not cause a deprecation warning. There is a new health check, hung_test, which will trigger after a test has been running for five minutes if it is not suppressed.
Revision 1.23 / (download) - annotate - [select for diffs], Fri Aug 4 04:57:52 2017 UTC (6 years, 1 month ago) by adam
Changes since 1.22: +5 -5 lines
Diff to previous 1.22 (colored)
3.14.2: This fixes a bug where Hypothesis would not work correctly on Python 2.7 if you had the typing module backport installed.
Revision 1.22 / (download) - annotate - [select for diffs], Thu Aug 3 07:42:09 2017 UTC (6 years, 1 month ago) by adam
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)
3.14.1 Fix bad header that somehow made it in
Revision 1.21 / (download) - annotate - [select for diffs], Mon Jul 24 10:23:57 2017 UTC (6 years, 2 months ago) by adam
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored)
3.14.0: Hypothesis now understands inline type annotations
Revision 1.20 / (download) - annotate - [select for diffs], Fri Jul 21 08:40:46 2017 UTC (6 years, 2 months ago) by adam
Changes since 1.19: +5 -5 lines
Diff to previous 1.19 (colored)
3.13.1: Honour 'skip test' exceptions
Revision 1.19 / (download) - annotate - [select for diffs], Mon Jul 17 07:05:34 2017 UTC (6 years, 2 months ago) by adam
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)
3.13.0: This release has two major aspects to it: The first is the introduction of :func:`~hypothesis.strategies.deferred`, which allows more natural definition of recursive (including mutually recursive) strategies. The second is a number of engine changes designed to support this sort of strategy better. These should have a knock-on effect of also improving the performance of any existing strategies that currently generate a lot of data or involve heavy nesting by reducing their typical example size.
Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 7 15:41:18 2017 UTC (6 years, 2 months ago) by adam
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored)
3.12.0: This release makes some major internal changes to how Hypothesis represents data internally, as a prelude to some major engine changes that should improve data quality. There are no API changes, but it's a significant enough internal change that a minor version bump seemed warranted. User facing impact should be fairly mild, but includes: * All existing examples in the database will probably be invalidated. Hypothesis handles this automatically, so you don't need to do anything, but if you see all your examples disappear that's why. * Almost all data distributions have changed significantly. Possibly for the better, possibly for the worse. This may result in new bugs being found, but it may also result in Hypothesis being unable to find bugs it previously did. * Data generation may be somewhat faster if your existing bottleneck was in draw_bytes (which is often the case for large examples). * Shrinking will probably be slower, possibly significantly. If you notice any effects you consider to be a significant regression, please open an issue about them.
Revision 1.17 / (download) - annotate - [select for diffs], Tue Jun 20 07:26:10 2017 UTC (6 years, 3 months ago) by adam
CVS Tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Changes since 1.16: +5 -5 lines
Diff to previous 1.16 (colored)
3.11.6: This release involves no functionality changes, but is the first to ship wheels as well as an sdist. 3.11.5: This release provides a performance improvement to shrinking. For cases where there is some non-trivial "boundary" value (e.g. the bug happens for all values greater than some other value), shrinking should now be substantially faster. Other types of bug will likely see improvements too. This may also result in some changes to the quality of the final examples - it may sometimes be better, but is more likely to get slightly worse in some edge cases. If you see any examples where this happens in practice, please report them.
Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 19 06:36:29 2017 UTC (6 years, 3 months ago) by adam
Changes since 1.15: +5 -5 lines
Diff to previous 1.15 (colored)
Changes 3.11.4 : This is a bugfix release: Hypothesis now prints explicit examples when running in verbose mode.
Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 12 10:19:44 2017 UTC (6 years, 3 months ago) by adam
Changes since 1.14: +5 -5 lines
Diff to previous 1.14 (colored)
Changes 3.11.3: Ensure we can sample from an OrderedDict without a warning
Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 10 19:18:35 2017 UTC (6 years, 3 months ago) by adam
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)
Version 3.11.2: Miscellaneous documentation updates and fixes
Revision 1.13 / (download) - annotate - [select for diffs], Mon May 29 06:52:11 2017 UTC (6 years, 3 months ago) by adam
Changes since 1.12: +5 -5 lines
Diff to previous 1.12 (colored)
3.11.1: This is a minor ergonomics release. Tracebacks shown by pytest no longer include Hypothesis internals for test functions decorated with @given.
Revision 1.12 / (download) - annotate - [select for diffs], Wed May 24 11:28:37 2017 UTC (6 years, 4 months ago) by adam
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)
Changes 3.11.0: This is a feature release, adding datetime-related strategies to the core strategies. extra.pytz.timezones allows you to sample pytz timezones from the Olsen database. Use directly in a recipe for tz-aware datetimes, or compose with st.none() to allow a mix of aware and naive output. The new dates, times, datetimes, and timedeltas strategies in hypothesis.strategies are all constrained by objects of their type. This means that you can generate dates bounded by a single day (i.e. a single date), or datetimes constrained to the microsecond. times and datetimes take an optional timezones= argument, which defaults to none() for naive times. You can use our extra strategy based on pytz, or roll your own timezones strategy with dateutil or even the standard library. The old dates, times, and datetimes strategies in hypothesis.extra.datetimes are deprecated in favor of the new core strategies, which are more flexible and have no dependencies.
Revision 1.11 / (download) - annotate - [select for diffs], Tue May 23 07:57:50 2017 UTC (6 years, 4 months ago) by adam
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored)
Changes 3.10.0: Hypothesis now uses inspect.getfullargspec internally. On Python 2, there are no visible changes. On Python 3 @given and @composite now preserve annotations on the decorated function. Keyword-only arguments are now either handled correctly (e.g. @composite), or caught in validation instead of silently discarded or raising an unrelated error later (e.g. @given).
Revision 1.10 / (download) - annotate - [select for diffs], Sat May 20 05:36:31 2017 UTC (6 years, 4 months ago) by adam
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (colored)
3.9.0 - 2017-05-19 This is feature release, expanding the capabilities of the decimals strategy. * The new (optional) places argument allows you to generate decimals with a certain number of places (e.g. cents, thousandths, satoshis). * If allow_infinity is None, setting min_bound no longer excludes positive infinity and setting max_value no longer excludes negative infinity. * All of NaN, -Nan, sNaN, and -sNaN may now be drawn if allow_nan is True, or if allow_nan is None and min_value or max_value is None. * min_value and max_value may be given as decimal strings, e.g. "1.234".
Revision 1.9 / (download) - annotate - [select for diffs], Wed May 17 13:01:58 2017 UTC (6 years, 4 months ago) by adam
Changes since 1.8: +5 -5 lines
Diff to previous 1.8 (colored)
Changes 3.8.5: Import sqlite3 only if used; minor bugfixes
Revision 1.8 / (download) - annotate - [select for diffs], Wed May 10 03:45:51 2017 UTC (6 years, 4 months ago) by adam
Changes since 1.7: +5 -5 lines
Diff to previous 1.7 (colored)
Changes 3.8.3: Remove pytest version check
Revision 1.7 / (download) - annotate - [select for diffs], Thu Apr 27 12:55:54 2017 UTC (6 years, 4 months ago) by wiz
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)
Updated py-hypothesis to 3.8.2. 3.8.2 - 2017-04-26 This is a code reorganisation release that moves some internal test helpers out of the main source tree so as to not have changes to them trigger releases in future. 3.8.1 - 2017-04-26 This is a documentation release. Almost all code examples are now doctests checked in CI, eliminating stale examples. 3.8.0 - 2017-04-23 This is a feature release, adding the iterables strategy, equivalent to lists(...).map(iter) but with a much more useful repr. You can use this strategy to check that code doesn„ŗ—’ accidentally depend on sequence properties such as indexing support or repeated iteration. 3.7.4 - 2017-04-22 This is a bug fix release for a single bug: In 3.7.3, using @example and a pytest fixture in the same test could cause the test to fail to fill the arguments, and throw a TypeError. 3.7.3 - 2017-04-21 This release should include no user visible changes and is purely a refactoring release. This modularises the behaviour of the core „ŗ◊»iven„ŗfunction, breaking it up into smaller and more accessible parts, but its actual behaviour should remain unchanged. 3.7.2 - 2017-04-21 This reverts an undocumented change in 3.7.1 which broke installation on debian stable: The specifier for the hypothesis[django] extra_requires had introduced a wild card, which was not supported on the default version of pip. 3.7.1 - 2017-04-21 This is a bug fix and internal improvements release. In particular Hypothesis now tracks a tree of where it has already explored. This allows it to avoid some classes of duplicate examples, and significantly improves the performance of shrinking failing examples by allowing it to skip some shrinks that it can determine can„ŗ—’ possibly work. Hypothesis will no longer seed the global random arbitrarily unless you have asked it to using random_module() Shrinking would previously have not worked correctly in some special cases on Python 2, and would have resulted in suboptimal examples.
Revision 1.6 / (download) - annotate - [select for diffs], Wed Apr 19 17:27:15 2017 UTC (6 years, 5 months ago) by wiz
Changes since 1.5: +5 -5 lines
Diff to previous 1.5 (colored)
Updated py-hypothesis to 3.7.0. 3.7.0 - 2017-03-20 This is a feature release. New features: 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 feature. 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 fixes: Bug fix: @composite now preserves functions„ŗdocstrings. The build is now reproducible and doesn„ŗ—’ 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„ŗ—’ really notice it except in pathological cases).
Revision 1.5 / (download) - annotate - [select for diffs], Sun Jan 1 15:35:12 2017 UTC (6 years, 8 months ago) by wiz
CVS Tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)
Updated py-hypothesis to 3.6.1. 3.6.1 - 2016-12-20 This release fixes a dependency problem and makes some small behind the scenes improvements. The fake-factory dependency was renamed to faker. If you were depending on it through hypothesis[django] or hypothesis[fake-factory] without pinning it yourself then it would have failed to install properly. This release changes it so that hypothesis[fakefactory] (which can now also be installed as hypothesis[faker]) will install the renamed faker package instead. This release also removed the dependency of hypothesis[django] on hypothesis[fakefactory] - it was only being used for emails. These now use a custom strategy that isn„’ from fakefactory. As a result you should also see performance improvements of tests which generated User objects or other things with email fields, as well as better shrinking of email addresses. The distribution of code using nested calls to one_of or the | operator for combining strategies has been improved, as branches are now flattened to give a more uniform distribution. Examples using composite or flatmap should now shrink better. In particular this will affect things which work by first generating a length and then generating that many items, which have historically not shrunk very well.
Revision 1.4 / (download) - annotate - [select for diffs], Mon Nov 7 11:10:24 2016 UTC (6 years, 10 months ago) by wiz
CVS Tags: pkgsrc-2016Q4-base, pkgsrc-2016Q4
Changes since 1.3: +5 -5 lines
Diff to previous 1.3 (colored)
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.
Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 19 12:42:56 2016 UTC (6 years, 11 months ago) by wiz
Changes since 1.2: +5 -5 lines
Diff to previous 1.2 (colored)
Updated py-hypothesis to 3.5.3. 3.5.3 - 2016-10-05 This is a bug fix release. Bugs fixed: 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„ŗ—’. 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 unicode. 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„ŗ—Ň get in pytest verbose mode). 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 „ŗŇ…ypothesis-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 this feature. 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).
Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 24 10:20:35 2016 UTC (7 years, 1 month ago) by wiz
CVS Tags: pkgsrc-2016Q3-base, pkgsrc-2016Q3
Changes since 1.1: +5 -5 lines
Diff to previous 1.1 (colored)
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 (Issue #337) 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„ŗ—‘ 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„ŗ—’ 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„ŗ—‘ validations out of the box. Wherever possible full_clean() should succeed. In particular: 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 the seed. 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„ŗ—’ updated appveyor to use the new repository location so I didn„ŗ—’ 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 Cobzarenco). 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 Pi√ęt Delport). Update headers to point to new repository location. Allow use of strategies that can—’ be used in find() (e.g. choices) in stateful testing.
Revision 1.1 / (download) - annotate - [select for diffs], Sun Apr 24 09:44:35 2016 UTC (7 years, 5 months ago) by wiz
CVS Tags: pkgsrc-2016Q2-base, pkgsrc-2016Q2
Import py-hypothesis-3.1.0 as devel/py-hypothesis. 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 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.
This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.