MCPcopy Create free account

hub / github.com/HypothesisWorks/hypothesis / functions

Functions6,164 in github.com/HypothesisWorks/hypothesis

↓ 277 callersMethoddraw
Like :obj:`~hypothesis.strategies.DrawFn`.
hypothesis/src/hypothesis/strategies/_internal/core.py:2388
↓ 245 callersFunctionminimal
( definition: SearchStrategy[T], condition=lambda x: True, settings: Settings | None = None, )
hypothesis/tests/common/debug.py:33
↓ 166 callersFunctionfind_any
(definition, condition=lambda _: True, settings=None)
hypothesis/tests/common/debug.py:86
↓ 142 callersFunctioncheck_can_generate_examples
Tries to generate a small number of examples from the strategy, to verify that it can do so without raising. Nothing is returned, it only che
hypothesis/tests/common/debug.py:154
↓ 128 callersMethodappend
(self, n: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:146
↓ 102 callersFunctionassume
(condition: Literal[False] | None)
hypothesis/src/hypothesis/control.py:57
↓ 94 callersMethodfor_choices
( cls, choices: Sequence[ChoiceTemplate | ChoiceT], *, observer: DataObserver
hypothesis/src/hypothesis/internal/conjecture/data.py:603
↓ 93 callersMethodfilter
(self, condition: Callable[[Any], Any])
hypothesis/src/hypothesis/strategies/_internal/misc.py:110
↓ 87 callersFunctionintegers
Returns a strategy which generates integers. If min_value is not None then all values will be >= min_value. If max_value is not None then all
hypothesis/src/hypothesis/strategies/_internal/numbers.py:112
↓ 85 callersMethodadd
(self, constant: ConstantT)
hypothesis/src/hypothesis/internal/constants_ast.py:62
↓ 83 callersMethodmap
(self, pack: Callable[[Any], Any])
hypothesis/src/hypothesis/strategies/_internal/misc.py:107
↓ 79 callersMethodappend
(self, n)
hypothesis/tests/nocover/test_conjecture_int_list.py:41
↓ 73 callersFunctionget_pretty_function_description
(f: object)
hypothesis/src/hypothesis/internal/reflection.py:270
↓ 65 callersFunctionassert_all_examples
Asserts that all examples of the given strategy match the predicate. :param strategy: Hypothesis strategy to check :param predicate: (callabl
hypothesis/tests/common/debug.py:111
↓ 57 callersFunctionlists
Returns a list containing values drawn from elements with length in the interval [min_size, max_size] (no bounds in that direction if these are
hypothesis/src/hypothesis/strategies/_internal/core.py:289
↓ 53 callersMethodcached_test_function
If ``error_on_discard`` is set to True this will raise ``ContainsDiscard`` in preference to running the actual test function. This is
hypothesis/src/hypothesis/internal/conjecture/engine.py:454
↓ 49 callersMethodrun
(self)
hypothesis/src/hypothesis/internal/conjecture/engine.py:991
↓ 49 callersFunctionrun_state_machine_as_test
Run a state machine definition as a test, either silently doing nothing or printing a minimal breaking program and raising an exception. stat
hypothesis/src/hypothesis/stateful.py:252
↓ 48 callersFunctioncheck_type
(typ: type | tuple[type, ...], arg: object, name: str)
hypothesis/src/hypothesis/internal/validation.py:20
↓ 43 callersMethodsplit
(self, left, right)
hypothesis/tests/nocover/test_stateful.py:59
↓ 40 callersFunctionassert_simple_property
Like assert_all_examples, intended as a self-documenting shortcut for simple constant properties (`is`, `isinstance`, `==`, ...) that can be adequ
hypothesis/tests/common/debug.py:135
↓ 39 callersFunctionfloats
Returns a strategy which generates floats. - If min_value is not None, all values will be ``>= min_value`` (or ``> min_value`` if ``exclude
hypothesis/src/hypothesis/strategies/_internal/numbers.py:250
↓ 39 callersMethodpop
(self, i: int = -1)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:211
↓ 38 callersMethodfreeze
(self)
hypothesis/src/hypothesis/internal/conjecture/data.py:326
↓ 37 callersMethoddraw_integer
( self, min_value: int | None = None, max_value: int | None = None, *,
hypothesis/tests/conjecture/test_provider.py:80
↓ 35 callersMethodvalidate
(self)
hypothesis/tests/cover/test_direct_strategies.py:530
↓ 34 callersMethodflatmap
(self, expand)
hypothesis/src/hypothesis/stateful.py:639
↓ 34 callersFunctiontemp_registered
Register and un-register a type for st.from_type(). This is not too hard, but there's a subtlety in restoring the previously-registered strat
hypothesis/tests/common/utils.py:200
↓ 32 callersFunctionfrom_type
Looks up the appropriate search strategy for the given type. |st.from_type| is used internally to fill in missing arguments to |st.builds| an
hypothesis/src/hypothesis/strategies/_internal/core.py:1247
↓ 31 callersFunctionassert_no_examples
(strategy, condition=lambda _: True)
hypothesis/tests/common/debug.py:104
↓ 31 callersMethodextend
(self, ls: Iterable[int])
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:165
↓ 31 callersFunctionf
(x: int)
hypothesis/tests/cover/test_lookup.py:1366
↓ 30 callersMethoddraw_boolean
( self, p: float = 0.5, )
hypothesis/tests/conjecture/test_provider.py:74
↓ 30 callersMethodstop_span
(self)
hypothesis/src/hypothesis/internal/conjecture/utils.py:297
↓ 29 callersMethodfixate_shrink_passes
Run steps from each pass in ``passes`` until the current shrink target is a fixed point of all of them.
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:843
↓ 29 callersFunctionraises
(data)
hypothesis/tests/conjecture/test_engine.py:404
↓ 29 callersMethodstart_span
(self, label)
hypothesis/src/hypothesis/internal/conjecture/utils.py:301
↓ 28 callersFunctioncapture_out
()
hypothesis/tests/common/utils.py:75
↓ 28 callersMethodcopy
( self, *, with_value: ChoiceT | None = None, with_constraints: ChoiceConstrai
hypothesis/src/hypothesis/internal/conjecture/choice.py:92
↓ 28 callersMethodshrink
Run the full set of shrinks and update shrink_target. This method is "mostly idempotent" - calling it twice is unlikely to have any e
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:437
↓ 27 callersFunctioninteresting_origin
Creates and returns an InterestingOrigin, parameterized by n, such that interesting_origin(n) == interesting_origin(m) iff n = m. Since
hypothesis/tests/conjecture/common.py:39
↓ 27 callersFunctionunwrap_strategies
(s)
hypothesis/src/hypothesis/strategies/_internal/lazy.py:31
↓ 26 callersMethoddraw_bytes
( self, min_size: int = 0, max_size: int = COLLECTION_DEFAULT_MAX_SIZE, )
hypothesis/tests/conjecture/test_provider.py:160
↓ 26 callersMethodmark_invalid
(self, why: str | None = None)
hypothesis/src/hypothesis/internal/conjecture/data.py:1349
↓ 26 callersFunctionreject
()
hypothesis/src/hypothesis/control.py:42
↓ 25 callersFunctioncheck
(t, ex)
hypothesis/tests/cover/test_lookup_py37.py:29
↓ 25 callersFunctionfloat_to_int
(value: float, width: int = 64)
hypothesis/src/hypothesis/internal/floats.py:77
↓ 25 callersMethodmark_interesting
(self, interesting_origin: InterestingOrigin)
hypothesis/src/hypothesis/internal/conjecture/data.py:1346
↓ 25 callersFunctiontemp_register_backend
(name, provider_cls)
hypothesis/tests/conjecture/test_provider.py:176
↓ 24 callersMethodis_valid
(self, rule)
hypothesis/src/hypothesis/stateful.py:1177
↓ 23 callersFunctionbooleans
Returns a strategy which generates instances of :class:`python:bool`. Examples from this strategy will shrink towards ``False`` (i.e. shrinki
hypothesis/src/hypothesis/strategies/_internal/core.py:154
↓ 23 callersFunctioncurrent_build_context
()
hypothesis/src/hypothesis/control.py:99
↓ 23 callersFunctionjust
Return a strategy which only generates ``value``. Note: ``value`` is not copied. Be wary of using mutable values. If ``value`` is the result
hypothesis/src/hypothesis/strategies/_internal/misc.py:68
↓ 23 callersMethodnew_observer
(self)
hypothesis/src/hypothesis/internal/conjecture/datatree.py:877
↓ 23 callersMethodrun
(self)
hypothesis/docs/conf.py:101
↓ 22 callersFunctioncheck_strategy
(arg: object, name: str = "")
hypothesis/src/hypothesis/strategies/_internal/strategies.py:1270
↓ 22 callersFunctionchoice_equal
(choice1: ChoiceT, choice2: ChoiceT)
hypothesis/src/hypothesis/internal/conjecture/choice.py:579
↓ 22 callersMethodcount
(self, value: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:103
↓ 22 callersMethodget_current_profile_name
The name of the current settings profile. For example: .. code-block:: python >>> settings.load_profile("myprofile")
hypothesis/src/hypothesis/_settings.py:1173
↓ 22 callersFunctionnote_deprecation
( message: str, *, since: str, has_codemod: bool, stacklevel: int = 0 )
hypothesis/src/hypothesis/utils/deprecation.py:17
↓ 21 callersMethodall
(cls)
hypothesis/src/hypothesis/_settings.py:288
↓ 21 callersFunctionnote
Report this value for the minimal failing example.
hypothesis/src/hypothesis/control.py:275
↓ 21 callersFunctionsampled_from
(elements: Sequence[T])
hypothesis/src/hypothesis/strategies/_internal/core.py:164
↓ 21 callersFunctiontext
Generates strings with characters drawn from ``alphabet``, which should be a collection of length one strings or a strategy generating such string
hypothesis/src/hypothesis/strategies/_internal/core.py:832
↓ 20 callersFunctionassert_mypy_errors
(fname, expected, python_version=None)
whole_repo_tests/types/test_mypy.py:101
↓ 20 callersMethodclear
Remove all keys, regardless of their pinned status.
hypothesis/src/hypothesis/internal/cache.py:171
↓ 20 callersFunctionfind
Returns the minimal example from the given strategy ``specifier`` that matches the predicate function ``condition``.
hypothesis/src/hypothesis/core.py:2405
↓ 20 callersFunctionrun_test_for_falsifying_example
(test_fn)
hypothesis/tests/common/utils.py:338
↓ 19 callersFunctionchoices_to_bytes
Serialize a list of choices to a bytestring. Inverts choices_from_bytes.
hypothesis/src/hypothesis/database.py:1267
↓ 19 callersMethodmore
Should I draw another element to add to the collection?
hypothesis/src/hypothesis/internal/conjecture/utils.py:305
↓ 19 callersFunctionrecur
(strat: SearchStrategy)
hypothesis/src/hypothesis/strategies/_internal/strategies.py:133
↓ 18 callersFunctioncapture_observations
(*, choices=None)
hypothesis/tests/common/utils.py:227
↓ 18 callersFunctioncharacters
r"""Generates characters, length-one :class:`python:str`\ ings, following specified filtering rules. - When no filtering rules are specified,
hypothesis/src/hypothesis/strategies/_internal/core.py:637
↓ 18 callersFunctiontuples
()
hypothesis/src/hypothesis/strategies/_internal/collections.py:94
↓ 17 callersMethodadd
Attempts to add ``data`` to the pareto front. Returns True if ``data`` is now in the front, including if data is already in the collec
hypothesis/src/hypothesis/internal/conjecture/pareto.py:149
↓ 17 callersFunctioncall_for_statistics
(test_function)
hypothesis/tests/cover/test_statistical_events.py:36
↓ 16 callersFunctiondatetimes
datetimes(min_value=datetime.datetime.min, max_value=datetime.datetime.max, *, timezones=none(), allow_imaginary=True) A strategy for generating
hypothesis/src/hypothesis/strategies/_internal/datetime.py:191
↓ 16 callersMethodrunTest
(self)
hypothesis/src/hypothesis/stateful.py:503
↓ 16 callersMethodsave
(self, key: bytes, value: bytes)
hypothesis/src/hypothesis/database.py:390
↓ 15 callersFunction_write_config
(config_dir: Path, data: dict[str, Any] | None = None)
whole_repo_tests/types/test_pyright.py:393
↓ 15 callersMethodcached_test_function
( self, nodes: Sequence[ChoiceNode] )
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:391
↓ 15 callersFunctioncomplex_numbers
Returns a strategy that generates :class:`~python:complex` numbers. This strategy draws complex numbers with constrained magnitudes. The
hypothesis/src/hypothesis/strategies/_internal/core.py:2146
↓ 15 callersFunctionget_signature
( target: Any, *, follow_wrapped: bool = True, eval_str: bool = False )
hypothesis/src/hypothesis/internal/reflection.py:131
↓ 15 callersFunctionget_type_hints
Like the typing version, but tries harder and never errors. Tries harder: if the thing to inspect is a class but typing.get_type_hints raises
hypothesis/src/hypothesis/internal/compat.py:130
↓ 15 callersFunctionpip_tool
(name, *args, **kwargs)
tooling/src/hypothesistooling/scripts.py:66
↓ 15 callersMethodremove
(self, f)
hypothesis/src/hypothesis/internal/observability.py:373
↓ 15 callersFunctiontest_function
(n)
hypothesis/tests/conjecture/test_provider.py:331
↓ 14 callersMethodas_result
Convert the result of running this test into either an Overrun object or a ConjectureResult.
hypothesis/src/hypothesis/internal/conjecture/data.py:1129
↓ 14 callersFunctioncheck_valid_interval
Checks that lower_bound and upper_bound are either unspecified, or they define a valid interval on the number line. Otherwise raises InvalidA
hypothesis/src/hypothesis/internal/validation.py:109
↓ 14 callersMethodchoose
Return some element of values satisfying the condition that will not lead to an exhausted branch, or raise DeadBranch if no such eleme
hypothesis/src/hypothesis/internal/conjecture/shrinking/choicetree.py:63
↓ 14 callersMethoddraw_integer
( self, value: int, *, constraints: IntegerConstraints, was_forced: bool )
hypothesis/src/hypothesis/internal/conjecture/data.py:545
↓ 14 callersFunctionfunc
(a, b: int, *c: str, d: int | None = None)
hypothesis/tests/cover/test_compat.py:104
↓ 14 callersFunctionpredicate
(value)
hypothesis/tests/conjecture/test_minimizer.py:114
↓ 14 callersMethodrandom
(self)
hypothesis/src/hypothesis/internal/conjecture/providers.py:1264
↓ 14 callersFunctionrepr_call
( f: Any, args: Sequence[object], kwargs: dict[str, object], *, reorder: bool = True )
hypothesis/src/hypothesis/internal/reflection.py:302
↓ 13 callersFunctionchoice_permitted
(choice: ChoiceT, constraints: ChoiceConstraintsT)
hypothesis/src/hypothesis/internal/conjecture/choice.py:524
↓ 13 callersFunctioncompute_max_children
( choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT )
hypothesis/src/hypothesis/internal/conjecture/datatree.py:194
↓ 13 callersMethodconclude_test
(self, status, reason)
hypothesis/tests/conjecture/test_test_data.py:220
↓ 13 callersMethodconsider
Try using ``value`` as a possible candidate improvement. Return True if self.current is canonically equal to value after the call, either bec
hypothesis/src/hypothesis/internal/conjecture/shrinking/common.py:110
↓ 13 callersMethodconsider_new_nodes
(self, nodes: Sequence[ChoiceNode])
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:415
next →1–100 of 6,164, ranked by callers