brk-code

hypothesis の API リファレンス

hypothesis (HypothesisWorks/hypothesis) の公開 API 62 件 —— クラス 23、関数 23、メソッド 16。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。

リポジトリ: HypothesisWorks/hypothesis

種別件数
クラス23
関数23
メソッド16

API 一覧

funchypothesis.src._hypothesis_ftz_detector.modules_imported_by(mod:str) -> FTZCulprits
Return the set of modules imported transitively by mod.
classhypothesis.src.hypothesis._settings.duration
A timedelta specifically measured in milliseconds.
funchypothesis.src.hypothesis.control.event(value:str, payload:Any='') -> None
Record an event that occurred during this test.
funchypothesis.src.hypothesis.control.note(value:object) -> None
Record a note on this |test case|.
funchypothesis.src.hypothesis.core.seed(seed:Hashable) -> Callable[[TestFunc], TestFunc]
Seed the randomness for this test.
methodhypothesis.src.hypothesis.database.ExampleDatabase.add_listener(f:ListenerT) -> None
Add a change listener.
methodhypothesis.src.hypothesis.database.ExampleDatabase.clear_listeners() -> None
Remove all change listeners.
methodhypothesis.src.hypothesis.database.ExampleDatabase.delete(key:bytes, value:bytes) -> None
Remove ``value`` from ``key``.
methodhypothesis.src.hypothesis.database.ExampleDatabase.fetch(key:bytes) -> Iterable[bytes]
Return an iterable over all values matching this key.
methodhypothesis.src.hypothesis.database.ExampleDatabase.move(src:bytes, dest:bytes, value:bytes) -> None
Move ``value`` from key ``src`` to key ``dest``.
methodhypothesis.src.hypothesis.database.ExampleDatabase.remove_listener(f:ListenerT) -> None
Removes ``f`` from the list of change listeners.
methodhypothesis.src.hypothesis.database.ExampleDatabase.save(key:bytes, value:bytes) -> None
Save ``value`` under ``key``.
classhypothesis.src.hypothesis.database.MultiplexedDatabase
A wrapper around multiple databases.
classhypothesis.src.hypothesis.database.ReadOnlyDatabase
A wrapper to make the given database read-only.
funchypothesis.src.hypothesis.database.choices_from_bytes(buffer:bytes) -> tuple[ChoiceT, ...] | None
Deserialize a bytestring to a tuple of choices.
funchypothesis.src.hypothesis.database.choices_to_bytes(choices:Iterable[ChoiceT]) -> bytes
Serialize a list of choices to a bytestring.
classhypothesis.src.hypothesis.errors.ChoiceTooLarge
An internal error raised by choice_from_index.
classhypothesis.src.hypothesis.errors.FailedHealthCheck
Raised when a test fails a health check.
classhypothesis.src.hypothesis.errors.Flaky
Base class for indeterministic failures.
classhypothesis.src.hypothesis.errors.Found
Signal that the example matches condition.
classhypothesis.src.hypothesis.errors.HypothesisDeprecationWarning
A deprecation warning issued by Hypothesis.
classhypothesis.src.hypothesis.errors.HypothesisException
Generic parent class for exceptions thrown by Hypothesis.
classhypothesis.src.hypothesis.errors.HypothesisWarning
A generic warning issued by Hypothesis.
classhypothesis.src.hypothesis.errors.UnsatisfiedAssumption
An internal error raised by assume.
funchypothesis.src.hypothesis.extra.cli.obj_name(s:str) -> object
This "type" imports whatever object is named by a dotted string.
funchypothesis.src.hypothesis.extra.lark.get_terminal_names(terminals:list[TerminalDef], rules:list[Rule], ignore_names:list[str]) -> set[str]
Get names of all terminals in the grammar.
funchypothesis.src.hypothesis.extra.numpy.boolean_dtypes() -> st.SearchStrategy['np.dtype[np.bool_]']
Return a strategy for boolean dtypes.
classhypothesis.src.hypothesis.extra.pandas.impl.column
Data object for describing a column in a DataFrame.
classhypothesis.src.hypothesis.internal.cache.GenericCache
Generic supertype for cache implementations.
methodhypothesis.src.hypothesis.internal.cache.GenericCache.check_valid() -> None
Debugging method for use in tests.
methodhypothesis.src.hypothesis.internal.cache.GenericCache.clear() -> None
Remove all keys, regardless of their pinned status.
methodhypothesis.src.hypothesis.internal.cache.GenericCache.is_pinned(key:K) -> bool
Returns True if the key is currently pinned.
methodhypothesis.src.hypothesis.internal.cache.GenericCache.pin(key:K, value:V) -> None
Mark ``key`` as pinned (with the given value).
methodhypothesis.src.hypothesis.internal.cache.GenericCache.unpin(key:K) -> None
Undo one previous call to ``pin(key)``.
methodhypothesis.src.hypothesis.internal.conjecture.data.Span.choice_count() -> int
The number of choices in this span.
methodhypothesis.src.hypothesis.internal.conjecture.data.Span.depth() -> int
Depth of this span in the span tree.
classhypothesis.src.hypothesis.internal.conjecture.datatree.Conclusion
Represents a transition to a finished state.
methodhypothesis.src.hypothesis.internal.conjecture.datatree.TreeNode.mark_forced(i:int) -> None
Note that the draw at node i was forced.
funchypothesis.src.hypothesis.internal.conjecture.floats.reverse64(v:int) -> int
Reverse a 64-bit integer bitwise.
funchypothesis.src.hypothesis.internal.conjecture.junkdrawer.stack_depth_of_caller() -> int
Get stack size for caller's frame.
funchypothesis.src.hypothesis.internal.conjecture.shrinking.choicetree.random_selection_order(random:Random) -> Callable[[int, int], Iterable[int]]
Select choices uniformly at random.
classhypothesis.src.hypothesis.internal.conjecture.shrinking.integer.Integer
Attempts to find a smaller integer.
funchypothesis.src.hypothesis.internal.conjecture.utils.fisher_yates_shuffle(data:'ConjectureData', ls:list[T]) -> None
Shuffle ``ls`` in place, drawing from ``data``.
classhypothesis.src.hypothesis.internal.conjecture.utils.many
Utility class for collections.
methodhypothesis.src.hypothesis.internal.conjecture.utils.many.reject(why:str | None=None) -> None
Reject the last example (i.e.
funchypothesis.src.hypothesis.internal.filtering.get_numeric_predicate_bounds(predicate:Predicate) -> ConstructivePredicate
Shared logic for understanding numeric bounds.
funchypothesis.src.hypothesis.internal.floats.sign_aware_lte(x:float | int, y:float | int) -> bool
Less-than-or-equals, but strictly orders -0.0 and 0.0
funchypothesis.src.hypothesis.internal.observability.add_observability_callback(f:CallbackT, *all_threads:bool=False) -> None
Adds ``f`` as a callback for |observability|.
funchypothesis.src.hypothesis.internal.observability.remove_observability_callback(f:CallbackT) -> None
Removes ``f`` from the |observability| callbacks.
funchypothesis.src.hypothesis.internal.reflection.is_first_param_referenced_in_function(f:Any) -> bool
Is the given name referenced within f?
funchypothesis.src.hypothesis.internal.reflection.is_mock(obj:object) -> bool
Determine if the given argument is a mock type.
classhypothesis.src.hypothesis.internal.scrutineer.Tracer
A super-simple branch coverage tracer.
funchypothesis.src.hypothesis.internal.statistics.stdtr(df:int, t:float) -> float
Student's t CDF for integer df >= 1, evaluated at t.
classhypothesis.src.hypothesis.stateful.Bundle
A collection of values for use in stateful testing.
funchypothesis.src.hypothesis.strategies._internal.core.binary(*min_size:int=0, *max_size:int | None=None) -> SearchStrategy[bytes]
Generates :class:`python:bytes`.
classhypothesis.src.hypothesis.strategies._internal.misc.JustStrategy
A strategy which always returns a single fixed value.
funchypothesis.src.hypothesis.strategies._internal.misc.just(value:T) -> SearchStrategy[T]
Return a strategy which only generates ``value``.
funchypothesis.src.hypothesis.strategies._internal.misc.none() -> SearchStrategy[None]
Return a strategy which only generates None.
classhypothesis.src.hypothesis.strategies._internal.numbers.FloatStrategy
A strategy for floating point numbers.
classhypothesis.src.hypothesis.strategies._internal.strategies.OneOfStrategy
Implements a union of strategies.
classhypothesis.src.hypothesis.utils.conventions.UniqueIdentifier
A factory for sentinel objects with nice reprs.
classhypothesis.src.hypothesis.utils.threading.ThreadLocal
Manages thread-local state.

この情報について

掲載しているシグネチャは HypothesisWorks/hypothesis の公開ソースコードを Python の ast モジュールで静的解析し、引数名・デフォルト値・ 型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。 詳しくは仕組みの解説をご覧ください。

収録ライブラリ一覧(全 805 件)へ戻る