Skip to content

Commit aaa1430

Browse files
committed
Clarify docs for max_examples
1 parent f80df10 commit aaa1430

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

hypothesis-python/src/hypothesis/_settings.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
99
# obtain one at https://mozilla.org/MPL/2.0/.
1010

11-
"""A module controlling settings for Hypothesis to use in falsification.
11+
"""The settings module configures runtime options for Hypothesis.
1212
1313
Either an explicit settings object can be used or the default object on
1414
this module can be modified.
@@ -120,9 +120,8 @@ def __setattr__(cls, name, value):
120120

121121

122122
class settings(metaclass=settingsMeta):
123-
"""A settings object controls a variety of parameters that are used in
124-
falsification. These may control both the falsification strategy and the
125-
details of the data that is generated.
123+
"""A settings object configures options including verbosity, runtime controls,
124+
persistence, determinism, and more.
126125
127126
Default values are picked up from the settings.default object and
128127
changes made there will be picked up in newly created settings.
@@ -364,7 +363,12 @@ def _max_examples_validator(x):
364363
validator=_max_examples_validator,
365364
description="""
366365
Once this many satisfying examples have been considered without finding any
367-
counter-example, falsification will terminate.
366+
counter-example, Hypothesis will stop looking.
367+
368+
Note that we might call your test function fewer times if we find a bug early
369+
or can tell that we've exhausted the search space; or more if we discard some
370+
examples due to use of .filter(), assume(), or a few other things that can
371+
prevent the test case from completing successfully.
368372
369373
The default value is chosen to suit a workflow where the test will be part of
370374
a suite that is regularly executed locally or on a CI server, balancing total

0 commit comments

Comments
 (0)