We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf31b5e commit 84dbaeeCopy full SHA for 84dbaee
hypothesis-python/src/hypothesis/internal/conjecture/data.py
@@ -2139,6 +2139,9 @@ def draw_integer(
2139
# complicates shrinking as we can no longer assume we can force
2140
# a value to the unmapped probability mass if that mass might be 0.
2141
assert sum(weights.values()) < 1
2142
+ # similarly, things get simpler if we assume every value is possible.
2143
+ # we'll want to drop this restriction eventually.
2144
+ assert all(w != 0 for w in weights.values())
2145
2146
if forced is not None and (min_value is None or max_value is None):
2147
# We draw `forced=forced - shrink_towards` here internally, after clamping.
0 commit comments