File tree 1 file changed +2
-3
lines changed
hypothesis-python/src/hypothesis/internal/conjecture 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1218,7 +1218,6 @@ def minimize_floats(self, chooser):
1218
1218
and not is_simple (node .value ),
1219
1219
)
1220
1220
1221
- i = self .nodes .index (node )
1222
1221
# the Float shrinker was only built to handle positive floats. We'll
1223
1222
# shrink the positive portion and reapply the sign after, which is
1224
1223
# equivalent to this shrinker's previous behavior. We'll want to refactor
@@ -1228,9 +1227,9 @@ def minimize_floats(self, chooser):
1228
1227
Float .shrink (
1229
1228
abs (node .value ),
1230
1229
lambda val : self .consider_new_tree (
1231
- self .nodes [:i ]
1230
+ self .nodes [: node . index ]
1232
1231
+ [node .copy (with_value = sign * val )]
1233
- + self .nodes [i + 1 :]
1232
+ + self .nodes [node . index + 1 :]
1234
1233
),
1235
1234
random = self .random ,
1236
1235
node = node ,
You can’t perform that action at this time.
0 commit comments