Skip to content

Commit d5ec1d3

Browse files
danielknellZac-HD
authored andcommitted
clarify docs for data_too_large health check
1 parent dfd0b2f commit d5ec1d3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

hypothesis-python/src/hypothesis/_settings.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,14 @@ def all(cls) -> List["HealthCheck"]:
461461
return list(HealthCheck)
462462

463463
data_too_large = 1
464-
"""Check for when the typical size of the examples you are generating
465-
exceeds the maximum allowed size too often."""
464+
"""Checks if too many examples are aborted for being too large.
465+
466+
This is measured by the number of random choices that Hypothesis makes
467+
in order to generate something, not the size of the generated object.
468+
For example, choosing a 100MB object from a predefined list would take
469+
only a few bits, while generating 10KB of JSON from scratch might trigger
470+
this health check.
471+
"""
466472

467473
filter_too_much = 2
468474
"""Check for when the test is filtering out too many examples, either

0 commit comments

Comments
 (0)