@@ -675,6 +675,7 @@ def execute_explicit_examples(state, wrapped_test, arguments, kwargs, original_s
675
675
"Falsifying example" , "Falsifying explicit example" , 1
676
676
)
677
677
678
+ empty_data .freeze ()
678
679
tc = make_testcase (
679
680
run_start = state ._start_timestamp ,
680
681
property = state .test_identifier ,
@@ -1302,6 +1303,7 @@ def _execute_once_for_engine(self, data: ConjectureData) -> None:
1302
1303
data ._observability_args = {}
1303
1304
self ._string_repr = "<backend failed to realize symbolic arguments>"
1304
1305
1306
+ data .freeze ()
1305
1307
tc = make_testcase (
1306
1308
run_start = self ._start_timestamp ,
1307
1309
property = self .test_identifier ,
@@ -1498,6 +1500,7 @@ def run_engine(self):
1498
1500
# execute_once() will always raise either the expected error, or Flaky.
1499
1501
raise NotImplementedError ("This should be unreachable" )
1500
1502
finally :
1503
+ ran_example .freeze ()
1501
1504
# log our observability line for the final failing example
1502
1505
tc = make_testcase (
1503
1506
run_start = self ._start_timestamp ,
@@ -1521,11 +1524,7 @@ def run_engine(self):
1521
1524
f"{ reproduction_decorator (falsifying_example .choices )} "
1522
1525
"as a decorator on your test case"
1523
1526
)
1524
- # Mostly useful for ``find`` and ensuring that objects that
1525
- # hold on to a reference to ``data`` know that it's now been
1526
- # finished and they can't draw more data from it.
1527
- ran_example .freeze () # pragma: no branch
1528
- # No branch is possible here because we never have an active exception.
1527
+
1529
1528
_raise_to_user (
1530
1529
errors_to_report ,
1531
1530
self .settings ,
@@ -2096,6 +2095,7 @@ def fuzz_one_input(
2096
2095
raise
2097
2096
finally :
2098
2097
if TESTCASE_CALLBACKS :
2098
+ data .freeze ()
2099
2099
tc = make_testcase (
2100
2100
run_start = state ._start_timestamp ,
2101
2101
property = state .test_identifier ,
0 commit comments