Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HypothesisWorks/hypothesis
/ functions
Functions
6,315 in github.com/HypothesisWorks/hypothesis
⨍
Functions
6,315
◇
Types & classes
724
↳
Endpoints
134
↓ 13 callers
Method
conclude_test
(self, status, reason)
hypothesis/tests/conjecture/test_test_data.py:214
↓ 13 callers
Method
consider
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 callers
Method
consider_new_nodes
(self, nodes: Sequence[ChoiceNode])
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:415
↓ 13 callers
Function
convert_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:217
↓ 13 callers
Method
draw_integer
( self, value: int, *, constraints: IntegerConstraints, was_forced: bool )
hypothesis/src/hypothesis/internal/conjecture/data.py:549
↓ 13 callers
Method
filter
(self, condition: Callable[[Any], Any])
hypothesis/src/hypothesis/strategies/_internal/misc.py:110
↓ 13 callers
Function
int_to_float
(value: u64, width: u32)
hypothesis/rust/src/internal/floats.rs:169
↓ 13 callers
Function
make_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 callers
Function
next_up
(value: f64, width: u32)
hypothesis/rust/src/internal/floats.rs:183
↓ 13 callers
Method
optimise_targets
If any target observations have been made, attempt to optimise them all.
hypothesis/src/hypothesis/internal/conjecture/engine.py:1506
↓ 13 callers
Method
sample
( self, data: "ConjectureData", *, forced: int | None = None, )
hypothesis/src/hypothesis/internal/conjecture/utils.py:216
↓ 13 callers
Function
target
()
hypothesis/tests/cover/test_cache_implementation.py:327
↓ 13 callers
Function
to_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 callers
Method
validate
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 callers
Function
ceil
(x)
hypothesis/src/hypothesis/internal/compat.py:213
↓ 12 callers
Function
fn
A trivial test function.
hypothesis/tests/patching/callables.py:24
↓ 12 callers
Function
get_mypy_analysed_type
(fname)
whole_repo_tests/types/test_mypy.py:62
↓ 12 callers
Method
getstate
(self, *args: Any, **kwargs: Any)
hypothesis/src/hypothesis/internal/entropy.py:33
↓ 12 callers
Method
insert
(self, i: int, v: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:124
↓ 12 callers
Function
sets
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 callers
Function
sort_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 callers
Method
start
(self)
hypothesis/src/hypothesis/internal/conjecture/data.py:209
↓ 11 callers
Function
_get_pyright_errors
(file: Path)
whole_repo_tests/types/test_pyright.py:372
↓ 11 callers
Method
add_listener
(self)
hypothesis/tests/cover/test_database_backend.py:623
↓ 11 callers
Function
check_argument
(condition, fail_message, *f_args, **f_kwargs)
hypothesis/src/hypothesis/extra/_array_helpers.py:62
↓ 11 callers
Method
draw_boolean
( self, value: bool, *, constraints: BooleanConstraints, was_forced: bool )
hypothesis/src/hypothesis/internal/conjecture/data.py:569
↓ 11 callers
Method
fetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:387
↓ 11 callers
Method
load_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:1177
↓ 11 callers
Function
next_down
(value: f64, width: u32)
hypothesis/rust/src/internal/floats.rs:206
↓ 11 callers
Method
save
(self, key: bytes, value: bytes)
hypothesis/src/hypothesis/database.py:494
↓ 11 callers
Function
storage_directory
(*names: str, intent_to_write: bool = True)
hypothesis/src/hypothesis/configuration.py:57
↓ 11 callers
Method
union
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 callers
Function
_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 callers
Function
builds
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 callers
Function
calc_label_from_name
(name: str)
hypothesis/src/hypothesis/internal/conjecture/utils.py:34
↓ 10 callers
Function
cathetus
(h: f64, a: f64)
hypothesis/rust/src/internal/cathetus.rs:30
↓ 10 callers
Method
choice
( self, values: Sequence[T], *, forced: T | None = None, observe: bool
hypothesis/src/hypothesis/internal/conjecture/data.py:1328
↓ 10 callers
Function
choices_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 callers
Function
define_function_signature
A decorator which sets the name, signature and docstring of the function passed into it.
hypothesis/src/hypothesis/internal/reflection.py:384
↓ 10 callers
Method
draw_boolean
(self, value: bool, *, was_forced: bool, constraints: dict)
hypothesis/tests/conjecture/test_test_data.py:184
↓ 10 callers
Method
fetch
(self, key: bytes)
hypothesis/tests/cover/test_database_backend.py:805
↓ 10 callers
Method
from_exception
( cls, exception: BaseException, /, seen: tuple[BaseException, ...] = () )
hypothesis/src/hypothesis/internal/escalation.py:119
↓ 10 callers
Function
function_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 callers
Method
index
(self, value: int)
hypothesis/src/hypothesis/internal/intervalsets.py:102
↓ 10 callers
Function
int_from_bytes
(data: bytes | bytearray)
hypothesis/src/hypothesis/internal/compat.py:99
↓ 10 callers
Function
nicerepr
(v: Any)
hypothesis/src/hypothesis/internal/reflection.py:300
↓ 10 callers
Method
pop
(self, value)
hypothesis/tests/cover/test_stateful.py:1596
↓ 10 callers
Method
register_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:1119
↓ 10 callers
Function
run_concurrently
(function, *, n: int)
hypothesis/tests/common/utils.py:315
↓ 9 callers
Method
__init__
(self, value)
hypothesis/tests/cover/test_stateful.py:1499
↓ 9 callers
Function
_get_qualname
(obj: Any, *, include_module: bool = False)
hypothesis/src/hypothesis/extra/ghostwriter.py:762
↓ 9 callers
Function
add_note
(exc, note)
hypothesis/src/hypothesis/internal/compat.py:83
↓ 9 callers
Function
choice_from_index
( index: int, choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT )
hypothesis/src/hypothesis/internal/conjecture/choice.py:425
↓ 9 callers
Function
condition
(n)
hypothesis/tests/numpy/test_from_dtype.py:335
↓ 9 callers
Function
convert_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:205
↓ 9 callers
Method
draw_float
( self, *, min_value: float = -math.inf, max_value: float = math.inf,
hypothesis/tests/conjecture/test_provider.py:103
↓ 9 callers
Method
example
(self)
hypothesis/src/hypothesis/strategies/_internal/core.py:2426
↓ 9 callers
Method
fetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:479
↓ 9 callers
Function
find_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:413
↓ 9 callers
Function
fresh_data
(*, random=None, observer=None)
hypothesis/tests/conjecture/common.py:110
↓ 9 callers
Function
given
( _: EllipsisType, / )
hypothesis/src/hypothesis/core.py:1826
↓ 9 callers
Method
is_enabled
Tests whether the feature named ``name`` should be enabled on this test run.
hypothesis/src/hypothesis/strategies/_internal/featureflags.py:77
↓ 9 callers
Function
is_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 callers
Function
local_settings
(s: settings)
hypothesis/src/hypothesis/_settings.py:1203
↓ 9 callers
Method
map
(self, f)
hypothesis/src/hypothesis/strategies/_internal/core.py:2417
↓ 9 callers
Function
minimal_from
(start, condition, *, constraints=None)
hypothesis/tests/conjecture/test_float_encoding.py:140
↓ 9 callers
Function
multiple
This function can be used to pass multiple results to the target(s) of a rule. Just use ``return multiple(result1, result2, ...)`` in your rule.
hypothesis/src/hypothesis/stateful.py:751
↓ 9 callers
Function
none
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 callers
Function
nothing
This strategy never successfully draws a value and will always reject on an attempt to draw. Examples from this strategy do not shrink (becau
hypothesis/src/hypothesis/strategies/_internal/misc.py:124
↓ 9 callers
Function
order_check
(name, floor, min_, max_)
hypothesis/src/hypothesis/extra/_array_helpers.py:68
↓ 9 callers
Method
pin
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 callers
Method
remove_listener
(self)
hypothesis/tests/cover/test_database_backend.py:631
↓ 9 callers
Function
sign_aware_lte
Less-than-or-equals, but strictly orders -0.0 and 0.0
hypothesis/src/hypothesis/internal/floats.py:82
↓ 9 callers
Function
skip_on_missing_unique_values
(xp)
hypothesis/tests/array_api/test_arrays.py:34
↓ 9 callers
Function
test
(x)
hypothesis/tests/cover/test_reproduce_failure.py:94
↓ 9 callers
Function
test
(i)
hypothesis/tests/cover/test_slippage.py:44
↓ 9 callers
Function
timezones
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
↓ 9 callers
Method
xfail
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:252
↓ 8 callers
Function
_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 callers
Function
add_observability_callback
Adds ``f`` as a callback for |observability|. ``f`` should accept one argument, which is an observation. Whenever Hypothesis produces a n
hypothesis/src/hypothesis/internal/observability.py:262
↓ 8 callers
Method
close
(self)
hypothesis/tests/cover/test_phases.py:67
↓ 8 callers
Method
data
(self)
hypothesis/src/hypothesis/internal/cache.py:87
↓ 8 callers
Function
describe_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 callers
Function
dtype_factory
(kind, sizes, valid_sizes, endianness)
hypothesis/src/hypothesis/extra/numpy.py:644
↓ 8 callers
Function
fail_health_check
( settings: "Settings", message: str, health_check: "HealthCheck" )
hypothesis/src/hypothesis/internal/healthcheck.py:19
↓ 8 callers
Method
fetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:1134
↓ 8 callers
Function
from_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:223
↓ 8 callers
Function
get_patch_for
( func: Any, examples: Sequence[tuple[str, str]], *, strip_via: tuple[str, ...] = (), )
hypothesis/src/hypothesis/extra/_patching.py:162
↓ 8 callers
Method
get_profile
Returns the settings profile registered under ``name``. If no settings profile is registered under ``name``, raises |InvalidArgument|
hypothesis/src/hypothesis/_settings.py:1165
↓ 8 callers
Function
indent
(text: str, prefix: str)
hypothesis/src/hypothesis/extra/_patching.py:68
↓ 8 callers
Method
intersection
Set intersection for lists of intervals.
hypothesis/src/hypothesis/internal/intervalsets.py:248
↓ 8 callers
Function
register_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 callers
Function
rule
( *, targets: Sequence[Bundle[Ex]], target: None = ..., **kwargs: SearchStrategy, )
hypothesis/src/hypothesis/stateful.py:844
↓ 8 callers
Function
run
(cmd, *, cwd=None)
hypothesis/tests/ghostwriter/test_ghostwriter_cli.py:39
↓ 8 callers
Function
rust_build_env
(*, profile="dev")
tooling/src/hypothesistooling/cargo.py:25
↓ 8 callers
Function
strategy
(draw)
hypothesis/tests/conjecture/test_engine.py:522
↓ 8 callers
Function
test
(r1, r2)
hypothesis/tests/cover/test_randoms.py:159
↓ 8 callers
Function
timedeltas
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:730
↓ 8 callers
Function
width_smallest_normals
(width: u32)
hypothesis/rust/src/internal/floats.rs:234
↓ 8 callers
Function
with_reporter
(new_reporter: ReporterT)
hypothesis/src/hypothesis/reporting.py:35
← previous
next →
101–200 of 6,315, ranked by callers