summaryrefslogtreecommitdiffstats
path: root/contrib/python/hypothesis
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-04-12 23:02:23 +0300
committerrobot-piglet <[email protected]>2026-04-12 23:35:54 +0300
commitc8734c5c869411af36bd2bcc9e40b83945a1d9a5 (patch)
tree2eb5bc25b8f302badcea6cc74d8e4b7ec81c8d79 /contrib/python/hypothesis
parentbe518f1df15ef8e94ce3d85b6567fbbf5a4ada5c (diff)
Intermediate changes
commit_hash:0b8dbc16a579bbcf80e7ed64137a777e850ff68d
Diffstat (limited to 'contrib/python/hypothesis')
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/core.py36
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
5 files changed, 31 insertions, 13 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 84b1acc1606..0127fccfdec 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: hypothesis
-Version: 6.151.9
+Version: 6.151.10
Summary: The property-based testing library for Python
Author-email: "David R. MacIver and Zac Hatfield-Dodds" <[email protected]>
License-Expression: MPL-2.0
diff --git a/contrib/python/hypothesis/py3/hypothesis/core.py b/contrib/python/hypothesis/py3/hypothesis/core.py
index 7c13af0a4eb..beb28c539a3 100644
--- a/contrib/python/hypothesis/py3/hypothesis/core.py
+++ b/contrib/python/hypothesis/py3/hypothesis/core.py
@@ -2217,19 +2217,37 @@ def given(
generated_seed = (
wrapped_test._hypothesis_internal_use_generated_seed
)
+ assert state._runner is not None
+ stopped_because_slow_shrinking = (
+ state._runner.statistics.get("stopped-because")
+ == "shrinking was very slow"
+ )
with local_settings(settings):
- if not (state.failed_normally or generated_seed is None):
- if running_under_pytest:
- report(
- f"You can add @seed({generated_seed}) to this test or "
- f"run pytest with --hypothesis-seed={generated_seed} "
- "to reproduce this failure."
+ if generated_seed is not None and (
+ not state.failed_normally or stopped_because_slow_shrinking
+ ):
+ pytest_extra_msg = (
+ (
+ ", or by running pytest with "
+ f"--hypothesis-seed={generated_seed}"
+ )
+ if running_under_pytest
+ else ""
+ )
+ if stopped_because_slow_shrinking:
+ msg = (
+ "\nThis test function exited early because"
+ " it took too long to shrink. If desired for debugging, "
+ f"you can reproduce this by adding @seed({generated_seed}) "
+ f"to this test{pytest_extra_msg}."
)
else:
- report(
- f"You can add @seed({generated_seed}) to this test to "
- "reproduce this failure."
+ msg = (
+ "You can reproduce this failure by adding "
+ f"@seed({generated_seed}) to this test"
+ f"{pytest_extra_msg}."
)
+ report(msg)
# The dance here is to avoid showing users long tracebacks
# full of Hypothesis internals they don't care about.
# We have to do this inline, to avoid adding another
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
index 89a3340949d..70df17d0502 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
@@ -723,7 +723,7 @@ class ConjectureRunner:
"WARNING: Hypothesis has spent more than five minutes working to shrink"
" a failing example, and stopped because it is making very slow"
" progress. When you re-run your tests, shrinking will resume and may"
- " take this long before aborting again.\nPLEASE REPORT THIS if you can"
+ " take this long before aborting again.\n\nPLEASE REPORT THIS if you can"
" provide a reproducing example, so that we can improve shrinking"
" performance for everyone."
)
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 42e857e2b94..efaa3fe7fde 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
-__version_info__ = (6, 151, 9)
+__version_info__ = (6, 151, 10)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index ad34b51c676..f92376ca08f 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.151.9)
+VERSION(6.151.10)
LICENSE(MPL-2.0)