Skip to content

Commit d91596c

Browse files
committed
avoid next_node being forced
1 parent c7f91f0 commit d91596c

File tree

1 file changed

+6
-0
lines changed
  • hypothesis-python/src/hypothesis/internal/conjecture

1 file changed

+6
-0
lines changed

hypothesis-python/src/hypothesis/internal/conjecture/shrinker.py

+6
Original file line numberDiff line numberDiff line change
@@ -1270,6 +1270,12 @@ def redistribute_block_pairs(self, chooser):
12701270
else:
12711271
return
12721272

1273+
if next_node.was_forced:
1274+
# avoid modifying a forced node! Note that it's fine for next_node
1275+
# to be trivial, because we're going to explicitly make it *not*
1276+
# trivial by adding to its value.
1277+
return
1278+
12731279
m = node.value
12741280
n = next_node.value
12751281

0 commit comments

Comments
 (0)