MCPcopy Create free account

hub / github.com/HypothesisWorks/hypothesis / functions

Functions6,164 in github.com/HypothesisWorks/hypothesis

↓ 13 callersFunctionconvert_positional_arguments
Return a tuple (new_args, new_kwargs) where all possible arguments have been moved to kwargs. new_args will only be non-empty if function has
hypothesis/src/hypothesis/internal/reflection.py:216
↓ 13 callersFunctionmake_strategies_namespace
Creates a strategies namespace for the given array module. * ``xp`` is the Array API library to automatically pass to the namespaced methods.
hypothesis/src/hypothesis/extra/array_api.py:842
↓ 13 callersFunctionnext_up
Return the first float larger than finite `val` - IEEE 754's `nextUp`. From https://stackoverflow.com/a/10426033, with thanks to Mark Dickinson.
hypothesis/src/hypothesis/internal/floats.py:89
↓ 13 callersFunctionobservability_enabled
Returns whether or not Hypothesis considers :ref:`observability <observability>` to be enabled. Observability is enabled if there is at least
hypothesis/src/hypothesis/internal/observability.py:316
↓ 13 callersMethodoptimise_targets
If any target observations have been made, attempt to optimise them all.
hypothesis/src/hypothesis/internal/conjecture/engine.py:1510
↓ 13 callersMethodsample
( self, data: "ConjectureData", *, forced: int | None = None, )
hypothesis/src/hypothesis/internal/conjecture/utils.py:216
↓ 13 callersFunctiontarget
()
hypothesis/tests/cover/test_cache_implementation.py:327
↓ 13 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:262
↓ 13 callersFunctionto_jsonable
Recursively convert an object to json-encodable form. This is not intended to round-trip, but rather provide an analysis-ready format for obs
hypothesis/src/hypothesis/strategies/_internal/utils.py:217
↓ 13 callersMethodvalidate
Throw an exception if the strategy is not valid. Strategies should implement ``do_validate``, which is called by this method. They sh
hypothesis/src/hypothesis/strategies/_internal/strategies.py:497
↓ 12 callersFunctionceil
(x)
hypothesis/src/hypothesis/internal/compat.py:213
↓ 12 callersFunctionget_mypy_analysed_type
(fname)
whole_repo_tests/types/test_mypy.py:62
↓ 12 callersMethodgetstate
(self, *args: Any, **kwargs: Any)
hypothesis/src/hypothesis/internal/entropy.py:33
↓ 12 callersMethodinsert
(self, i: int, v: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:126
↓ 12 callersFunctionsets
This has the same behaviour as lists, but returns sets instead. Note that Hypothesis cannot tell if values are drawn from elements are hashab
hypothesis/src/hypothesis/strategies/_internal/core.py:417
↓ 12 callersFunctionsort_key
Returns a sort key such that "simpler" choice sequences are smaller than "more complicated" ones. We define sort_key so that x is simpler tha
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:71
↓ 12 callersMethodstart
(self)
hypothesis/src/hypothesis/internal/conjecture/data.py:209
↓ 11 callersFunction_get_pyright_errors
(file: Path)
whole_repo_tests/types/test_pyright.py:372
↓ 11 callersMethodadd_listener
(self)
hypothesis/tests/cover/test_database_backend.py:621
↓ 11 callersFunctioncheck_argument
(condition, fail_message, *f_args, **f_kwargs)
hypothesis/src/hypothesis/extra/_array_helpers.py:62
↓ 11 callersMethoddraw_boolean
( self, value: bool, *, constraints: BooleanConstraints, was_forced: bool )
hypothesis/src/hypothesis/internal/conjecture/data.py:565
↓ 11 callersMethodfetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:387
↓ 11 callersFunctionfn
A trivial test function.
hypothesis/tests/patching/callables.py:24
↓ 11 callersFunctionint_to_float
(value: int, width: int = 64)
hypothesis/src/hypothesis/internal/floats.py:84
↓ 11 callersMethodload_profile
Makes the settings profile registered under ``name`` the active profile. If no settings profile is registered under ``name``, raises
hypothesis/src/hypothesis/_settings.py:1162
↓ 11 callersFunctionnext_down
(value: float, width: int = 64)
hypothesis/src/hypothesis/internal/floats.py:110
↓ 11 callersMethodsave
(self, key: bytes, value: bytes)
hypothesis/src/hypothesis/database.py:494
↓ 11 callersFunctionstorage_directory
(*names: str, intent_to_write: bool = True)
hypothesis/src/hypothesis/configuration.py:57
↓ 11 callersMethodunion
Merge two sequences of intervals into a single tuple of intervals. Any integer bounded by `x` or `y` is also bounded by the result.
hypothesis/src/hypothesis/internal/intervalsets.py:135
↓ 10 callersFunction_broadcast_shapes
Returns the shape resulting from broadcasting the input shapes together. Raises ValueError if the shapes are not broadcast-compatible
hypothesis/tests/numpy/test_gen_data.py:623
↓ 10 callersFunctionbuilds
Generates values by drawing from ``args`` and ``kwargs`` and passing them to the callable (provided as the first positional argument) in the a
hypothesis/src/hypothesis/strategies/_internal/core.py:1158
↓ 10 callersFunctioncalc_label_from_name
(name: str)
hypothesis/src/hypothesis/internal/conjecture/utils.py:34
↓ 10 callersFunctioncathetus
(h: f64, a: f64)
hypothesis/rust/src/internal/cathetus.rs:30
↓ 10 callersMethodchoice
( self, values: Sequence[T], *, forced: T | None = None, observe: bool
hypothesis/src/hypothesis/internal/conjecture/data.py:1318
↓ 10 callersFunctionchoices_from_bytes
Deserialize a bytestring to a tuple of choices. Inverts choices_to_bytes. Returns None if the given bytestring is not a valid serialization
hypothesis/src/hypothesis/database.py:1338
↓ 10 callersFunctiondefine_function_signature
A decorator which sets the name, signature and docstring of the function passed into it.
hypothesis/src/hypothesis/internal/reflection.py:374
↓ 10 callersMethoddraw_boolean
(self, value: bool, *, was_forced: bool, constraints: dict)
hypothesis/tests/conjecture/test_test_data.py:190
↓ 10 callersMethodfetch
(self, key: bytes)
hypothesis/tests/cover/test_database_backend.py:803
↓ 10 callersMethodfrom_exception
( cls, exception: BaseException, /, seen: tuple[BaseException, ...] = () )
hypothesis/src/hypothesis/internal/escalation.py:119
↓ 10 callersFunctionfunction_digest
Returns a string that is stable across multiple invocations across multiple processes and is prone to changing significantly in response to mi
hypothesis/src/hypothesis/internal/reflection.py:83
↓ 10 callersMethodindex
(self, value: int)
hypothesis/src/hypothesis/internal/intervalsets.py:102
↓ 10 callersFunctionint_from_bytes
(data: bytes | bytearray)
hypothesis/src/hypothesis/internal/compat.py:99
↓ 10 callersMethodregister_profile
Register a settings object as a settings profile, under the name ``name``. The ``parent`` and ``kwargs`` arguments to this method are
hypothesis/src/hypothesis/_settings.py:1104
↓ 9 callersMethod__init__
(self, value)
hypothesis/tests/cover/test_stateful.py:1477
↓ 9 callersFunction_get_qualname
(obj: Any, *, include_module: bool = False)
hypothesis/src/hypothesis/extra/ghostwriter.py:762
↓ 9 callersFunctionadd_note
(exc, note)
hypothesis/src/hypothesis/internal/compat.py:83
↓ 9 callersFunctionchoice_from_index
( index: int, choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT )
hypothesis/src/hypothesis/internal/conjecture/choice.py:425
↓ 9 callersFunctioncondition
(n)
hypothesis/tests/numpy/test_from_dtype.py:335
↓ 9 callersFunctionconvert_keyword_arguments
Returns a pair of a tuple and a dictionary which would be equivalent passed as positional and keyword args to the function. Unless function has
hypothesis/src/hypothesis/internal/reflection.py:204
↓ 9 callersMethoddraw_float
( self, *, min_value: float = -math.inf, max_value: float = math.inf,
hypothesis/tests/conjecture/test_provider.py:103
↓ 9 callersMethodexample
(self)
hypothesis/src/hypothesis/strategies/_internal/core.py:2426
↓ 9 callersMethodfetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:479
↓ 9 callersFunctionfind_integer
Finds a (hopefully large) integer such that f(n) is True and f(n + 1) is False. f(0) is assumed to be True and will not be checked.
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:406
↓ 9 callersFunctionfresh_data
(*, random=None, observer=None)
hypothesis/tests/conjecture/common.py:110
↓ 9 callersFunctiongiven
( _: EllipsisType, / )
hypothesis/src/hypothesis/core.py:1803
↓ 9 callersMethodis_enabled
Tests whether the feature named ``name`` should be enabled on this test run.
hypothesis/src/hypothesis/strategies/_internal/featureflags.py:77
↓ 9 callersFunctionis_hypothesis_test
Returns ``True`` if ``f`` represents a test function that has been defined with Hypothesis. This is true for: * Functions decorated with
hypothesis/src/hypothesis/internal/detection.py:14
↓ 9 callersFunctionlocal_settings
(s: settings)
hypothesis/src/hypothesis/_settings.py:1188
↓ 9 callersMethodmap
(self, f)
hypothesis/src/hypothesis/strategies/_internal/core.py:2417
↓ 9 callersFunctionminimal_from
(start, condition, *, constraints=None)
hypothesis/tests/conjecture/test_float_encoding.py:140
↓ 9 callersFunctionnone
Return a strategy which only generates None. Examples from this strategy do not shrink (because there is only one).
hypothesis/src/hypothesis/strategies/_internal/misc.py:83
↓ 9 callersFunctionorder_check
(name, floor, min_, max_)
hypothesis/src/hypothesis/extra/_array_helpers.py:68
↓ 9 callersMethodpin
Mark ``key`` as pinned (with the given value). That is, it may not be evicted until ``unpin(key)`` has been called. The same key may be
hypothesis/src/hypothesis/internal/cache.py:141
↓ 9 callersMethodremove_listener
(self)
hypothesis/tests/cover/test_database_backend.py:629
↓ 9 callersFunctionrun_concurrently
(function, *, n: int)
hypothesis/tests/common/utils.py:305
↓ 9 callersFunctionsign_aware_lte
Less-than-or-equals, but strictly orders -0.0 and 0.0
hypothesis/src/hypothesis/internal/floats.py:186
↓ 9 callersFunctionskip_on_missing_unique_values
(xp)
hypothesis/tests/array_api/test_arrays.py:34
↓ 9 callersFunctiontest
(x)
hypothesis/tests/cover/test_reproduce_failure.py:94
↓ 9 callersFunctiontest
(i)
hypothesis/tests/cover/test_slippage.py:44
↓ 9 callersMethodxfail
Mark this example as an expected failure, similarly to :obj:`pytest.mark.xfail(strict=True) <pytest.mark.xfail>`. Expected-failing ex
hypothesis/src/hypothesis/core.py:248
↓ 8 callersFunction_write_call
Write a call to `func` with explicit and implicit arguments. >>> _write_call(sorted, "my_seq", "func") "builtins.sorted(my_seq, key=func, rev
hypothesis/src/hypothesis/extra/ghostwriter.py:771
↓ 8 callersFunctionadd_observability_callback
Adds ``f`` as a callback for :ref:`observability <observability>`. ``f`` should accept one argument, which is an observation. Whenever Hypoth
hypothesis/src/hypothesis/internal/observability.py:260
↓ 8 callersFunctiondescribe_statistics
Return a multi-line string describing the passed run statistics. `stats_dict` must be a dictionary of data in the format collected by `hypoth
hypothesis/src/hypothesis/statistics.py:68
↓ 8 callersFunctiondtype_factory
(kind, sizes, valid_sizes, endianness)
hypothesis/src/hypothesis/extra/numpy.py:644
↓ 8 callersFunctionfail_health_check
( settings: "Settings", message: str, health_check: "HealthCheck" )
hypothesis/src/hypothesis/internal/healthcheck.py:19
↓ 8 callersMethodfetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:1134
↓ 8 callersFunctionfrom_lark
A strategy for strings accepted by the given context-free grammar. ``grammar`` must be a ``Lark`` object, which wraps an EBNF specification.
hypothesis/src/hypothesis/extra/lark.py:208
↓ 8 callersFunctionget_patch_for
( func: Any, examples: Sequence[tuple[str, str]], *, strip_via: tuple[str, ...] = (), )
hypothesis/src/hypothesis/extra/_patching.py:162
↓ 8 callersMethodget_profile
Returns the settings profile registered under ``name``. If no settings profile is registered under ``name``, raises |InvalidArgument|
hypothesis/src/hypothesis/_settings.py:1150
↓ 8 callersFunctionindent
(text: str, prefix: str)
hypothesis/src/hypothesis/extra/_patching.py:68
↓ 8 callersMethodintersection
Set intersection for lists of intervals.
hypothesis/src/hypothesis/internal/intervalsets.py:248
↓ 8 callersFunctionnicerepr
(v: Any)
hypothesis/src/hypothesis/internal/reflection.py:292
↓ 8 callersFunctionregister_random
Register (a weakref to) the given Random-like instance for management by Hypothesis. You can pass instances of structural subtypes of ``rando
hypothesis/src/hypothesis/internal/entropy.py:77
↓ 8 callersFunctionrule
( *, targets: Sequence[Bundle[Ex]], target: None = ..., **kwargs: SearchStrategy, )
hypothesis/src/hypothesis/stateful.py:781
↓ 8 callersFunctionrun
(cmd, *, cwd=None)
hypothesis/tests/ghostwriter/test_ghostwriter_cli.py:39
↓ 8 callersFunctionstrategy
(draw)
hypothesis/tests/conjecture/test_engine.py:522
↓ 8 callersFunctiontest
(r1, r2)
hypothesis/tests/cover/test_randoms.py:146
↓ 8 callersFunctiontimedeltas
timedeltas(min_value=datetime.timedelta.min, max_value=datetime.timedelta.max) A strategy for timedeltas between ``min_value`` and ``max_value``.
hypothesis/src/hypothesis/strategies/_internal/datetime.py:380
↓ 8 callersFunctiontimezones
Any timezone in the Olsen database, as a pytz tzinfo object. This strategy minimises to UTC, or the smallest possible fixed offset, and is de
hypothesis/src/hypothesis/extra/pytz.py:39
↓ 7 callersMethod__init__
(self)
hypothesis/src/hypothesis/database.py:231
↓ 7 callersFunction_are_annotations_used
(*functions: Callable)
hypothesis/src/hypothesis/extra/ghostwriter.py:1062
↓ 7 callersFunction_assert_eq
(style: str, a: str, b: str)
hypothesis/src/hypothesis/extra/ghostwriter.py:578
↓ 7 callersFunction_check_except
(except_: Except)
hypothesis/src/hypothesis/extra/ghostwriter.py:162
↓ 7 callersFunction_check_style
(style: str)
hypothesis/src/hypothesis/extra/ghostwriter.py:195
↓ 7 callersFunction_make_test
(imports: ImportSet, body: str)
hypothesis/src/hypothesis/extra/ghostwriter.py:1074
↓ 7 callersFunction_make_test_body
( *funcs: Callable, ghost: str, test_body: str, except_: tuple[type[Exception], ...], asse
hypothesis/src/hypothesis/extra/ghostwriter.py:817
↓ 7 callersFunctionbc
()
hypothesis/tests/cover/test_control.py:39
↓ 7 callersFunctionbuffer_size_limit
(n)
hypothesis/tests/conjecture/common.py:77
↓ 7 callersFunctionchoice_to_index
(choice: ChoiceT, constraints: ChoiceConstraintsT)
hypothesis/src/hypothesis/internal/conjecture/choice.py:307
↓ 7 callersFunctionchoices_key
(choices: Sequence[ChoiceT])
hypothesis/src/hypothesis/internal/conjecture/choice.py:564
← previousnext →101–200 of 6,164, ranked by callers