Skip to content

Commit 3419e24

Browse files
committed
zero rather than random extend during optimisation
1 parent f73db91 commit 3419e24

File tree

1 file changed

+4
-2
lines changed
  • hypothesis-python/src/hypothesis/internal/conjecture

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ def attempt_replace(v):
124124
# component we want to give it a couple of tries to succeed.
125125
for _ in range(3):
126126
attempt = self.engine.cached_test_function(
127-
prefix + v_as_bytes + self.current_data.buffer[block.end :],
128-
extend=BUFFER_SIZE,
127+
prefix
128+
+ v_as_bytes
129+
+ self.current_data.buffer[block.end :]
130+
+ bytes(BUFFER_SIZE),
129131
)
130132

131133
if self.consider_new_test_data(attempt):

0 commit comments

Comments
 (0)