]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-86275: Implementation of hypothesis stubs for property-based tests, with zoneinfo...
authorPaul Ganssle <1377457+pganssle@users.noreply.github.com>
Fri, 12 May 2023 12:35:53 +0000 (08:35 -0400)
committerGitHub <noreply@github.com>
Fri, 12 May 2023 12:35:53 +0000 (08:35 -0400)
commitd50c37d8adb2d2da9808089d959ca7d6791ac59f
treedf2daad96229ee0152ae38e5fb6060c03d5e4e09
parent45f5aa8fc73acf516071d52ef8213532f0381316
GH-86275: Implementation of hypothesis stubs for property-based tests, with zoneinfo tests (#22863)

These are stubs to be used for adding hypothesis (https://hypothesis.readthedocs.io/en/latest/) tests to the standard library.

When the tests are run in an environment where `hypothesis` and its various dependencies are not installed, the stubs will turn any tests with examples into simple parameterized tests and any tests without examples are skipped.

It also adds hypothesis tests for the `zoneinfo` module, and a Github Actions workflow to run the hypothesis tests as a non-required CI job.

The full hypothesis interface is not stubbed out — missing stubs can be added as necessary.

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
.github/workflows/build.yml
Lib/test/libregrtest/save_env.py
Lib/test/support/_hypothesis_stubs/__init__.py [new file with mode: 0644]
Lib/test/support/_hypothesis_stubs/_helpers.py [new file with mode: 0644]
Lib/test/support/_hypothesis_stubs/strategies.py [new file with mode: 0644]
Lib/test/support/hypothesis_helper.py [new file with mode: 0644]
Lib/test/test_zoneinfo/__init__.py
Lib/test/test_zoneinfo/test_zoneinfo_property.py [new file with mode: 0644]
Misc/NEWS.d/next/Tests/2023-04-25-12-19-37.gh-issue-86275.-RoLIt.rst [new file with mode: 0644]