Skip to content

Commit

Permalink
status reason for overruns while shrinking
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Feb 19, 2024
1 parent 4ecd0e5 commit 3adb0ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions hypothesis-python/src/hypothesis/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ def _execute_once_for_engine(self, data: ConjectureData) -> None:
arguments={**self._jsonable_arguments, **data._observability_args},
timing=self._timing_features,
coverage=tractable_coverage_report(trace) or None,
phase=phase,
)
deliver_json_blob(tc)
self._timing_features = {}
Expand Down
3 changes: 3 additions & 0 deletions hypothesis-python/src/hypothesis/internal/observability.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ def make_testcase(
arguments: Optional[dict] = None,
timing: Dict[str, float],
coverage: Optional[Dict[str, List[int]]] = None,
phase: Optional[str] = None,
) -> dict:
if data.interesting_origin:
status_reason = str(data.interesting_origin)
elif phase == "shrink" and data.status == Status.OVERRUN:
status_reason = "exceeded size of current best example"
else:
status_reason = str(data.events.pop("invalid because", ""))

Expand Down

0 comments on commit 3adb0ef

Please sign in to comment.