aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-10-23 11:17:16 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-10-23 11:28:59 +0300
commit4d0b1eac3d46d4d0c4514b1c2294b09b9b45f6db (patch)
tree6eebe239895cb8796f3079cf6df793b3aa3be315
parented5b8cfb8756248654e81015fe3baf09177fc6e6 (diff)
downloadydb-4d0b1eac3d46d4d0c4514b1c2294b09b9b45f6db.tar.gz
Intermediate changes
commit_hash:f78c44da9f74c6e088ef2748a598d6ca3f65c517
-rw-r--r--contrib/python/hypothesis/py3/.dist-info/METADATA2
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/stateful.py16
-rw-r--r--contrib/python/hypothesis/py3/hypothesis/version.py2
-rw-r--r--contrib/python/hypothesis/py3/ya.make2
4 files changed, 17 insertions, 5 deletions
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 418a478f2c..7916731906 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: hypothesis
-Version: 6.112.4
+Version: 6.112.5
Summary: A library for property-based testing
Home-page: https://hypothesis.works
Author: David R. MacIver and Zac Hatfield-Dodds
diff --git a/contrib/python/hypothesis/py3/hypothesis/stateful.py b/contrib/python/hypothesis/py3/hypothesis/stateful.py
index 06e97b7ba5..190d7076fd 100644
--- a/contrib/python/hypothesis/py3/hypothesis/stateful.py
+++ b/contrib/python/hypothesis/py3/hypothesis/stateful.py
@@ -501,9 +501,12 @@ class Bundle(SearchStrategy[Ex]):
drawn from this bundle will be consumed (as above) when requested.
"""
- def __init__(self, name: str, *, consume: bool = False) -> None:
+ def __init__(
+ self, name: str, *, consume: bool = False, draw_references: bool = True
+ ) -> None:
self.name = name
self.consume = consume
+ self.draw_references = draw_references
def do_draw(self, data):
machine = data.draw(self_strategy)
@@ -522,7 +525,9 @@ class Bundle(SearchStrategy[Ex]):
else:
reference = bundle[position]
- return reference
+ if self.draw_references:
+ return reference
+ return machine.names_to_values[reference.name]
def __repr__(self):
consume = self.consume
@@ -541,6 +546,13 @@ class Bundle(SearchStrategy[Ex]):
machine = data.draw(self_strategy)
return bool(machine.bundle(self.name))
+ def flatmap(self, expand):
+ if self.draw_references:
+ return type(self)(
+ self.name, consume=self.consume, draw_references=False
+ ).flatmap(expand)
+ return super().flatmap(expand)
+
def consumes(bundle: Bundle[Ex]) -> SearchStrategy[Ex]:
"""When introducing a rule in a RuleBasedStateMachine, this function can
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index a2112a2f36..11ed864977 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, 112, 4)
+__version_info__ = (6, 112, 5)
__version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 7dc523a75e..13a8342b39 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
PY3_LIBRARY()
-VERSION(6.112.4)
+VERSION(6.112.5)
LICENSE(MPL-2.0)