MCPcopy Create free account

hub / github.com/HypothesisWorks/hypothesis / functions

Functions6,315 in github.com/HypothesisWorks/hypothesis

↓ 281 callersMethoddraw
Like :obj:`~hypothesis.strategies.DrawFn`.
hypothesis/src/hypothesis/strategies/_internal/core.py:2388
↓ 246 callersFunctionminimal
( definition: SearchStrategy[T], condition=lambda x: True, settings: Settings | None = None, )
hypothesis/tests/common/debug.py:33
↓ 167 callersFunctionfind_any
(definition, condition=lambda _: True, settings=None)
hypothesis/tests/common/debug.py:86
↓ 148 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
↓ 130 callersMethodappend
(self, n: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:144
↓ 102 callersFunctionassume
(condition: Literal[False] | None)
hypothesis/src/hypothesis/control.py:57
↓ 92 callersMethodfor_choices
( cls, choices: Sequence[ChoiceTemplate | ChoiceT], *, observer: DataObserver
hypothesis/src/hypothesis/internal/conjecture/data.py:609
↓ 90 callersMethodfilter
(self, condition)
hypothesis/src/hypothesis/stateful.py:691
↓ 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
↓ 86 callersMethodadd
(self, constant: ConstantT)
hypothesis/src/hypothesis/internal/constants_ast.py:62
↓ 80 callersMethodappend
(self, n)
hypothesis/tests/nocover/test_conjecture_int_list.py:41
↓ 79 callersFunctionget_pretty_function_description
(f: object)
hypothesis/src/hypothesis/internal/reflection.py:271
↓ 78 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
↓ 62 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:254
↓ 58 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
↓ 52 callersMethodmap
(self, pack)
hypothesis/src/hypothesis/stateful.py:688
↓ 49 callersMethodrun
(self)
hypothesis/src/hypothesis/internal/conjecture/engine.py:987
↓ 48 callersFunctioncheck_type
(typ: type | tuple[type, ...], arg: object, name: str)
hypothesis/src/hypothesis/internal/validation.py:20
↓ 44 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
↓ 44 callersMethodsplit
(self, left, right)
hypothesis/tests/nocover/test_stateful.py:59
↓ 41 callersMethodflatmap
( self, expand: Callable[[Any], "SearchStrategy[Any]"] )
hypothesis/src/hypothesis/strategies/_internal/misc.py:113
↓ 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
↓ 38 callersMethodfreeze
(self)
hypothesis/src/hypothesis/internal/conjecture/data.py:329
↓ 38 callersMethodvalidate
(self)
hypothesis/tests/cover/test_direct_strategies.py:530
↓ 37 callersMethoddraw_integer
( self, min_value: int | None = None, max_value: int | None = None, *,
hypothesis/tests/conjecture/test_provider.py:80
↓ 37 callersFunctionunwrap_strategies
(s)
hypothesis/src/hypothesis/strategies/_internal/lazy.py:31
↓ 36 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
↓ 35 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:210
↓ 34 callersMethodmap
(self, pack: Callable[[Any], Any])
hypothesis/src/hypothesis/strategies/_internal/misc.py:107
↓ 33 callersFunctionf
(x: int)
hypothesis/tests/cover/test_lookup.py:1366
↓ 31 callersFunctionassert_no_examples
(strategy, condition=lambda _: True)
hypothesis/tests/common/debug.py:104
↓ 31 callersFunctiondatetimes
( min_value: NaiveDatetime | None = None, max_value: NaiveDatetime | None = None, *, timezones
hypothesis/src/hypothesis/strategies/_internal/datetime.py:449
↓ 31 callersMethodextend
(self, ls: Iterable[int])
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:163
↓ 30 callersMethoddraw_boolean
( self, p: float = 0.5, )
hypothesis/tests/conjecture/test_provider.py:74
↓ 30 callersMethodpop
(self, i: int = -1)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:211
↓ 30 callersMethodstop_span
(self)
hypothesis/src/hypothesis/internal/conjecture/utils.py:297
↓ 29 callersFunctioncapture_out
()
hypothesis/tests/common/utils.py:81
↓ 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:862
↓ 29 callersFunctionraises
(data)
hypothesis/tests/conjecture/test_engine.py:404
↓ 29 callersMethodstart_span
(self, label)
hypothesis/src/hypothesis/internal/conjecture/utils.py:301
↓ 28 callersMethodcopy
( self, *, with_value: ChoiceT | None = None, with_constraints: ChoiceConstrai
hypothesis/src/hypothesis/internal/conjecture/choice.py:92
↓ 28 callersMethodmark_invalid
(self, why: str | None = None)
hypothesis/src/hypothesis/internal/conjecture/data.py:1359
↓ 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 callersFunctionfloat_to_int
(value: f64, width: u32)
hypothesis/rust/src/internal/floats.rs:146
↓ 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
↓ 26 callersMethoddraw_bytes
( self, min_size: int = 0, max_size: int = COLLECTION_DEFAULT_MAX_SIZE, )
hypothesis/tests/conjecture/test_provider.py:160
↓ 26 callersFunctionreject
()
hypothesis/src/hypothesis/control.py:42
↓ 25 callersFunctioncheck
(t, ex)
hypothesis/tests/cover/test_lookup_py37.py:29
↓ 25 callersMethodmark_interesting
(self, interesting_origin: InterestingOrigin)
hypothesis/src/hypothesis/internal/conjecture/data.py:1356
↓ 25 callersFunctiontemp_register_backend
(name, provider_cls)
hypothesis/tests/conjecture/test_provider.py:176
↓ 24 callersMethodis_valid
(self, rule)
hypothesis/src/hypothesis/stateful.py:1240
↓ 24 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
↓ 24 callersMethodrun
(self)
hypothesis/docs/conf.py:102
↓ 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 callersMethodcount
(self, value: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:101
↓ 23 callersFunctioncurrent_build_context
()
hypothesis/src/hypothesis/control.py:99
↓ 23 callersMethodnew_observer
(self)
hypothesis/src/hypothesis/internal/conjecture/datatree.py:877
↓ 22 callersFunctioncheck_strategy
(arg: object, name: str = "")
hypothesis/src/hypothesis/strategies/_internal/strategies.py:1272
↓ 22 callersFunctionchoice_equal
(choice1: ChoiceT, choice2: ChoiceT)
hypothesis/src/hypothesis/internal/conjecture/choice.py:579
↓ 22 callersFunctionnote
Record a note on this |test case|. Non-string values will be automatically converted to a string. This value is reported for the |minima
hypothesis/src/hypothesis/control.py:271
↓ 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 callersFunctioncapture_observations
(*, choices=None)
hypothesis/tests/common/utils.py:237
↓ 21 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:1188
↓ 21 callersFunctionrun_test_for_failing_test_case
(test_fn)
hypothesis/tests/common/utils.py:348
↓ 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:2428
↓ 19 callersFunction_instant
A sort key ordering aware datetimes by the moment they refer to. Unlike comparison of datetimes which share a tzinfo - which falls back to ig
hypothesis/src/hypothesis/strategies/_internal/datetime.py:136
↓ 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 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 callersFunctioncall_for_statistics
(test_function)
hypothesis/tests/cover/test_statistical_events.py:36
↓ 16 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
↓ 16 callersFunctionget_signature
( target: Any, *, follow_wrapped: bool = True, eval_str: bool = False )
hypothesis/src/hypothesis/internal/reflection.py:131
↓ 16 callersFunctionpredicate
(value)
hypothesis/tests/conjecture/test_minimizer.py:114
↓ 16 callersMethodrunTest
(self)
hypothesis/src/hypothesis/stateful.py:505
↓ 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_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:375
↓ 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:1135
↓ 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 callersFunctionfunc
(a, b: int, *c: str, d: int | None = None)
hypothesis/tests/cover/test_compat.py:104
↓ 14 callersFunctionobservability_enabled
Returns whether or not Hypothesis considers |observability| to be enabled. Observability is enabled if there is at least one observability
hypothesis/src/hypothesis/internal/observability.py:318
↓ 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:310
↓ 14 callersFunctiontimes
times(min_value=datetime.time.min, max_value=datetime.time.max, *, timezones=none()) A strategy for times between ``min_value`` and ``max_value``
hypothesis/src/hypothesis/strategies/_internal/datetime.py:620
↓ 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
next →1–100 of 6,315, ranked by callers