Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HypothesisWorks/hypothesis
/ functions
Functions
6,838 in github.com/HypothesisWorks/hypothesis
⨍
Functions
6,838
◇
Types & classes
772
↳
Endpoints
144
↓ 14 callers
Function
func
(a, b: int, *c: str, d: int | None = None)
hypothesis/tests/cover/test_compat.py:100
↓ 14 callers
Function
observability_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:321
↓ 14 callers
Method
optimise_targets
If any target observations have been made, attempt to optimise them all, stopping early if ``self.valid_test_cases`` reaches ``max_valid``.
hypothesis/src/hypothesis/internal/conjecture/engine.py:1588
↓ 14 callers
Function
repr_call
( f: Any, args: Sequence[object], kwargs: dict[str, object], *, reorder: bool = True )
hypothesis/src/hypothesis/internal/reflection.py:316
↓ 14 callers
Function
times
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:996
↓ 13 callers
Function
choice_permitted
(choice: ChoiceT, constraints: ChoiceConstraintsT)
hypothesis/src/hypothesis/internal/conjecture/choice.py:542
↓ 13 callers
Method
conclude_test
(self, status, reason)
hypothesis/tests/conjecture/test_test_data.py:231
↓ 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:420
↓ 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:214
↓ 13 callers
Method
filter
(self, condition: Callable[[Any], Any])
hypothesis/src/hypothesis/strategies/_internal/misc.py:115
↓ 13 callers
Method
getstate
(self, *args: Any, **kwargs: Any)
hypothesis/src/hypothesis/internal/entropy.py:34
↓ 13 callers
Function
int_to_float
(value: u64, width: u32)
hypothesis/rust/src/internal/floats.rs:169
↓ 13 callers
Function
next_up
(value: f64, width: u32)
hypothesis/rust/src/internal/floats.rs:183
↓ 13 callers
Function
run_conformance_test
Test that the given ``Provider`` class conforms to the |PrimitiveProvider| interface. For instance, this tests that ``Provider`` does no
hypothesis/src/hypothesis/internal/conjecture/provider_conformance.py:634
↓ 13 callers
Method
sample
( self, data: "ConjectureData", *, forced: int | None = None, )
hypothesis/src/hypothesis/internal/conjecture/utils.py:217
↓ 13 callers
Method
start
(self)
hypothesis/src/hypothesis/internal/conjecture/data.py:241
↓ 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:531
↓ 12 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:1182
↓ 12 callers
Function
ceil
(x)
hypothesis/src/hypothesis/internal/compat.py:178
↓ 12 callers
Method
draw_boolean
( self, value: bool, *, constraints: BooleanConstraints, was_forced: bool )
hypothesis/src/hypothesis/internal/conjecture/data.py:640
↓ 12 callers
Function
fn
A trivial test function.
hypothesis/tests/patching/callables.py:24
↓ 12 callers
Function
from_field
Return a strategy for values that fit the given field. This function is used by :func:`~hypothesis.extra.django.from_form` and :func:`~hypoth
hypothesis/src/hypothesis/extra/django/_fields.py:362
↓ 12 callers
Function
get_mypy_analysed_type
(fname)
whole_repo_tests/types/test_mypy.py:62
↓ 12 callers
Method
insert
(self, i: int, v: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:146
↓ 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:432
↓ 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:73
↓ 11 callers
Function
_get_pyright_errors
(file: Path)
whole_repo_tests/types/test_pyright.py:390
↓ 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
data
(self)
hypothesis/src/hypothesis/internal/cache.py:87
↓ 11 callers
Method
fetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:385
↓ 11 callers
Method
from_exception
( cls, exception: BaseException, /, seen: tuple[BaseException, ...] = () )
hypothesis/src/hypothesis/internal/escalation.py:126
↓ 11 callers
Method
index
(self, value: int)
hypothesis/src/hypothesis/internal/intervalsets.py:99
↓ 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:1178
↓ 11 callers
Function
next_down
(value: f64, width: u32)
hypothesis/rust/src/internal/floats.rs:206
↓ 11 callers
Method
reject
Reject the current element (i.e. don't count it towards our budget of elements because it's not going to go in the final collection).
hypothesis/src/hypothesis/internal/conjecture/utils.py:360
↓ 11 callers
Function
run_concurrently
(function, *, n: int)
hypothesis/tests/common/utils.py:315
↓ 11 callers
Method
save
(self, key: bytes, value: bytes)
hypothesis/src/hypothesis/database.py:492
↓ 11 callers
Function
sign_aware_lte
Less-than-or-equals, but strictly orders -0.0 and 0.0
hypothesis/src/hypothesis/internal/floats.py:82
↓ 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:132
↓ 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
calc_label_from_name
(name: str)
hypothesis/src/hypothesis/internal/conjecture/utils.py:35
↓ 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:1503
↓ 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:1343
↓ 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:397
↓ 10 callers
Method
draw_boolean
(self, value: bool, *, was_forced: bool, constraints: dict)
hypothesis/tests/conjecture/test_test_data.py:201
↓ 10 callers
Method
fetch
(self, key: bytes)
hypothesis/tests/cover/test_database_backend.py:805
↓ 10 callers
Function
fresh_data
(*, random=None, observer=None)
hypothesis/tests/conjecture/common.py:110
↓ 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:82
↓ 10 callers
Function
int_from_bytes
(data: bytes | bytearray)
hypothesis/src/hypothesis/internal/compat.py:64
↓ 10 callers
Function
nicerepr
(v: Any)
hypothesis/src/hypothesis/internal/reflection.py:306
↓ 10 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:88
↓ 10 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:172
↓ 10 callers
Method
pop
(self, value)
hypothesis/tests/cover/test_stateful.py:1611
↓ 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:1120
↓ 9 callers
Method
__init__
(self, value)
hypothesis/tests/cover/test_stateful.py:1514
↓ 9 callers
Function
_get_qualname
(obj: Any, *, include_module: bool = False)
hypothesis/src/hypothesis/extra/ghostwriter.py:772
↓ 9 callers
Method
_step
(self, requested)
hypothesis/src/hypothesis/internal/conjecture/provider_conformance.py:768
↓ 9 callers
Function
choice_from_index
( index: int, choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT )
hypothesis/src/hypothesis/internal/conjecture/choice.py:443
↓ 9 callers
Method
close
(self)
hypothesis/tests/cover/test_phases.py:67
↓ 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:202
↓ 9 callers
Method
draw_float
( self, *, min_value: float = -math.inf, max_value: float = math.inf,
hypothesis/tests/conjecture/test_provider.py:111
↓ 9 callers
Method
example
(self)
hypothesis/src/hypothesis/strategies/_internal/core.py:2480
↓ 9 callers
Function
f
(v1, v2, data)
hypothesis/tests/cover/test_observability.py:129
↓ 9 callers
Method
fetch
(self, key: bytes)
hypothesis/src/hypothesis/database.py:477
↓ 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:435
↓ 9 callers
Method
from_string
Return a tuple of intervals, covering the codepoints of characters in `s`. >>> IntervalSet.from_string('abcdef0123456789') ((48, 57),
hypothesis/src/hypothesis/internal/intervalsets.py:34
↓ 9 callers
Function
given
( _: EllipsisType, / )
hypothesis/src/hypothesis/core.py:1867
↓ 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:1204
↓ 9 callers
Method
map
(self, pack)
hypothesis/src/hypothesis/strategies/_internal/core.py:2471
↓ 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:850
↓ 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:129
↓ 9 callers
Function
order_check
(name, floor, min_, max_)
hypothesis/src/hypothesis/extra/_array_helpers.py:68
↓ 9 callers
Method
remove_listener
(self)
hypothesis/tests/cover/test_database_backend.py:631
↓ 9 callers
Function
run
(cmd, *, cwd=None)
hypothesis/tests/ghostwriter/test_ghostwriter_cli.py:42
↓ 9 callers
Function
rust_build_env
(*, profile="dev")
tooling/src/hypothesistooling/cargo.py:25
↓ 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:43
↓ 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
with_value
(self, value: T)
hypothesis/src/hypothesis/utils/dynamicvariables.py:33
↓ 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:255
↓ 8 callers
Method
__init__
(self, conjecturedata: "ConjectureData | None", /)
hypothesis/tests/conjecture/test_provider.py:78
↓ 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:781
↓ 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:265
↓ 8 callers
Function
choices_key
(choices: Sequence[ChoiceT])
hypothesis/src/hypothesis/internal/conjecture/choice.py:582
↓ 8 callers
Function
clamp
(lower: int, value: int, upper: int)
hypothesis/src/hypothesis/internal/floats.py:91
↓ 8 callers
Method
create
(self)
hypothesis/tests/cover/test_stateful.py:939
↓ 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:69
↓ 8 callers
Method
draw
( self, strategy: "SearchStrategy[Ex]", label: int | None = None, observe_as:
hypothesis/src/hypothesis/internal/conjecture/data.py:1290
↓ 8 callers
Function
dtype_factory
(kind, sizes, valid_sizes, endianness)
hypothesis/src/hypothesis/extra/numpy.py:642
↓ 8 callers
Function
fail_health_check
( settings: "Settings", message: str, health_check: "HealthCheck" )
hypothesis/src/hypothesis/internal/healthcheck.py:19
← previous
next →
101–200 of 6,838, ranked by callers