File tree 2 files changed +7
-4
lines changed
hypothesis-python/src/hypothesis/internal/conjecture
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,11 @@ def __stoppable_test_function(self, data):
239
239
# correct engine.
240
240
raise
241
241
242
+ def ir_tree_to_data (self , ir_tree_nodes ):
243
+ data = ConjectureData .for_ir_tree (ir_tree_nodes )
244
+ self .__stoppable_test_function (data )
245
+ return data
246
+
242
247
def test_function (self , data ):
243
248
if self .__pending_call_explanation is not None :
244
249
self .debug (self .__pending_call_explanation )
@@ -316,8 +321,7 @@ def test_function(self, data):
316
321
317
322
# drive the ir tree through the test function to convert it
318
323
# to a buffer
319
- data = ConjectureData .for_ir_tree (data .examples .ir_tree_nodes )
320
- self .__stoppable_test_function (data )
324
+ data = self .ir_tree_to_data (data .examples .ir_tree_nodes )
321
325
self .__data_cache [data .buffer ] = data .as_result ()
322
326
323
327
key = data .interesting_origin
Original file line number Diff line number Diff line change @@ -376,8 +376,7 @@ def calls(self):
376
376
return self .engine .call_count
377
377
378
378
def consider_new_tree (self , tree ):
379
- data = ConjectureData .for_ir_tree (tree )
380
- self .engine .test_function (data )
379
+ data = self .engine .ir_tree_to_data (tree )
381
380
382
381
return self .consider_new_buffer (data .buffer )
383
382
You can’t perform that action at this time.
0 commit comments