MCPcopy Create free account

hub / github.com/HypothesisWorks/hypothesis / functions

Functions6,164 in github.com/HypothesisWorks/hypothesis

↓ 7 callersFunctionclamp
(lower: int, value: int, upper: int)
hypothesis/src/hypothesis/internal/floats.py:195
↓ 7 callersFunctioncleanup
Register a function to be called when the current test has finished executing. Any exceptions thrown in teardown will be printed but not rethr
hypothesis/src/hypothesis/control.py:252
↓ 7 callersMethodclose
(self)
hypothesis/tests/cover/test_phases.py:67
↓ 7 callersFunctioncombine_labels
(*labels: int)
hypothesis/src/hypothesis/internal/conjecture/utils.py:61
↓ 7 callersMethodcreate
(self)
hypothesis/tests/cover/test_stateful.py:869
↓ 7 callersMethodcreate_if_missing
(self)
hypothesis/src/hypothesis/configuration.py:47
↓ 7 callersFunctioncurrently_in_test_context
Return ``True`` if the calling code is currently running inside an |@given| or :ref:`stateful <stateful>` test, and ``False`` otherwise. This
hypothesis/src/hypothesis/control.py:88
↓ 7 callersMethoddata
(self)
hypothesis/src/hypothesis/internal/cache.py:87
↓ 7 callersFunctiondates
dates(min_value=datetime.date.min, max_value=datetime.date.max) A strategy for dates between ``min_value`` and ``max_value``. Examples from
hypothesis/src/hypothesis/strategies/_internal/datetime.py:333
↓ 7 callersMethoddebug
(self, message: str)
hypothesis/src/hypothesis/internal/conjecture/engine.py:946
↓ 7 callersFunctiondecimals
Generates instances of :class:`python:decimal.Decimal`, which may be: - A finite rational number, between ``min_value`` and ``max_value``. -
hypothesis/src/hypothesis/strategies/_internal/core.py:1840
↓ 7 callersFunctionfixed_dictionaries
( mapping: Mapping[K, SearchStrategy[V]], )
hypothesis/src/hypothesis/strategies/_internal/core.py:522
↓ 7 callersMethodflatmap
( self, expand: Callable[[Any], "SearchStrategy[Any]"] )
hypothesis/src/hypothesis/strategies/_internal/misc.py:113
↓ 7 callersMethodfuzz_one_input
Run the test as a fuzz target, driven with the ``buffer`` of bytes. Depending on the passed ``buffer`` one of three things will happ
hypothesis/src/hypothesis/core.py:1709
↓ 7 callersFunctionga_empty_artifact
Creates an empty GitHub artifact.
hypothesis/tests/cover/test_database_backend.py:226
↓ 7 callersFunctionget_test_function
(source_code, settings_decorator=lambda fn: fn)
hypothesis/tests/ghostwriter/test_ghostwriter.py:47
↓ 7 callersMethodgetrandbits
(self, k: int)
hypothesis/src/hypothesis/internal/conjecture/providers.py:1257
↓ 7 callersFunctionis_negative
(x: SupportsFloat)
hypothesis/src/hypothesis/internal/floats.py:54
↓ 7 callersFunctionmultiple
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:688
↓ 7 callersFunctionnothing
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
↓ 7 callersMethodreject
Reject the last example (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:344
↓ 7 callersFunctionreport
(text: str)
hypothesis/src/hypothesis/reporting.py:54
↓ 7 callersMethodrun
Rerun the test case with this visitor and return the results of ``self.finish()``.
hypothesis/src/hypothesis/internal/conjecture/data.py:259
↓ 7 callersFunctionsource_exec_as_module
(source: str)
hypothesis/src/hypothesis/internal/reflection.py:341
↓ 7 callersMethodstep
( self, selection_order: Callable[[int, int], Iterable[int]], f: Callable[[Chooser], N
hypothesis/src/hypothesis/internal/conjecture/shrinking/choicetree.py:130
↓ 7 callersFunctiontarget
()
hypothesis/tests/nocover/test_threading.py:155
↓ 7 callersFunctiontest_function
(data)
hypothesis/tests/nocover/test_exceptiongroup.py:32
↓ 7 callersFunctiontry_convert
(typ, value, name)
hypothesis/src/hypothesis/internal/validation.py:80
↓ 7 callersMethodwith_detail
(cls, detail: str)
hypothesis/src/hypothesis/errors.py:122
↓ 7 callersFunctionwith_reporter
(new_reporter: ReporterT)
hypothesis/src/hypothesis/reporting.py:35
↓ 7 callersMethodwith_value
(self, value: T)
hypothesis/src/hypothesis/utils/dynamicvariables.py:33
↓ 6 callersMethod__init__
(self, owner: "Spans", index: int)
hypothesis/src/hypothesis/internal/conjecture/data.py:173
↓ 6 callersMethod__init__
(self, conjecturedata: "ConjectureData | None", /)
hypothesis/tests/conjecture/test_provider.py:70
↓ 6 callersFunction_get_module
(obj)
hypothesis/src/hypothesis/extra/ghostwriter.py:747
↓ 6 callersFunction_get_output
(test_fn)
hypothesis/tests/cover/test_custom_reprs.py:20
↓ 6 callersFunction_get_params
Get non-vararg parameters of `func` as an ordered dict.
hypothesis/src/hypothesis/extra/ghostwriter.py:480
↓ 6 callersFunction_hash
(key: bytes)
hypothesis/src/hypothesis/database.py:418
↓ 6 callersMethod_key_path
(self, key: bytes)
hypothesis/src/hypothesis/database.py:468
↓ 6 callersFunctionarrays
( dtype: Union["np.dtype[G]", st.SearchStrategy["np.dtype[G]"]], shape: int | st.SearchStrategy[int] |
hypothesis/src/hypothesis/extra/numpy.py:469
↓ 6 callersFunctiondraw_value
(choice_type, constraints)
hypothesis/tests/conjecture/common.py:159
↓ 6 callersFunctionevent
Record an event that occurred during this test. Statistics on the number of test runs with each event will be reported at the end if you run Hypot
hypothesis/src/hypothesis/control.py:283
↓ 6 callersFunctionf
(x)
hypothesis/tests/conjecture/test_provider.py:696
↓ 6 callersFunctionfloor
(x)
hypothesis/src/hypothesis/internal/compat.py:206
↓ 6 callersFunctionfractions
Returns a strategy which generates Fractions. If ``min_value`` is not None then all generated values are no less than ``min_value``. If ``ma
hypothesis/src/hypothesis/strategies/_internal/core.py:1713
↓ 6 callersFunctionis_first_param_referenced_in_function
Is the given name referenced within f?
hypothesis/src/hypothesis/internal/reflection.py:255
↓ 6 callersFunctionis_identity_function
(f: Callable)
hypothesis/src/hypothesis/internal/reflection.py:502
↓ 6 callersFunctionmake_mock_xp
( *, exclude: tuple[str, ...] = (), exclude_methods: tuple[str, ...] = () )
hypothesis/tests/array_api/test_partial_adoptors.py:60
↓ 6 callersMethodof_length
(cls, n: int)
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:92
↓ 6 callersFunctionremove_observability_callback
Removes ``f`` from the :ref:`observability <observability>` callbacks. If ``f`` is not in the list of observability callbacks, silently do n
hypothesis/src/hypothesis/internal/observability.py:292
↓ 6 callersFunctionrestore_callbacks
()
hypothesis/tests/cover/test_observability.py:580
↓ 6 callersMethodreuse_existing_examples
If appropriate (we have a database and have been told to use it), try to reload existing examples from the database. If there are a l
hypothesis/src/hypothesis/internal/conjecture/engine.py:1013
↓ 6 callersFunctionrun_tox
(task, version, *args)
tooling/src/hypothesistooling/__main__.py:677
↓ 6 callersMethodsave
(self, key: bytes, value: bytes)
hypothesis/src/hypothesis/extra/redis.py:107
↓ 6 callersMethodseed
(self, *args: Any, **kwargs: Any)
hypothesis/src/hypothesis/internal/entropy.py:32
↓ 6 callersFunctiontest_fn
(x)
hypothesis/tests/cover/test_explicit_examples.py:270
↓ 6 callersFunctiontimezones
Any timezone from :pypi:`dateutil <python-dateutil>`. This strategy minimises to UTC, or the timezone with the smallest offset from UTC as of
hypothesis/src/hypothesis/extra/dateutil.py:44
↓ 6 callersFunctionunique_events
(stats)
hypothesis/tests/cover/test_statistical_events.py:47
↓ 6 callersMethodunpin
Undo one previous call to ``pin(key)``. The value stays the same. Once all calls are undone this key may be evicted as normal.
hypothesis/src/hypothesis/internal/cache.py:155
↓ 5 callersMethod_draw
(self, choice_type, constraints)
hypothesis/src/hypothesis/internal/conjecture/provider_conformance.py:400
↓ 5 callersMethod_draw
( self, choice_type: Literal["integer"], constraints: IntegerConstraints, *,
hypothesis/src/hypothesis/internal/conjecture/data.py:739
↓ 5 callersFunction_float_to_position
Map a non-negative float to a linear integer position such that adjacent representable floats correspond to adjacent integers. For ``f <= MAX
hypothesis/src/hypothesis/internal/conjecture/shrinking/floats.py:24
↓ 5 callersMethod_pooled_constraints
( self, choice_type: Literal["integer"], constraints: IntegerConstraints )
hypothesis/src/hypothesis/internal/conjecture/data.py:1001
↓ 5 callersFunctionall_children
( choice_type: ChoiceTypeT, constraints: ChoiceConstraintsT )
hypothesis/src/hypothesis/internal/conjecture/datatree.py:286
↓ 5 callersFunctionall_files
()
tooling/src/hypothesistooling/git.py:123
↓ 5 callersFunctionassert_falsifying_output
( test, example_type="Falsifying", expected_exception=AssertionError, **kwargs )
hypothesis/tests/common/utils.py:177
↓ 5 callersFunctionbinary
Generates :class:`python:bytes`. The generated :class:`python:bytes` will have a length of at least ``min_size`` and at most ``max_size``. I
hypothesis/src/hypothesis/strategies/_internal/core.py:981
↓ 5 callersMethodbundle
(self, name)
hypothesis/src/hypothesis/stateful.py:372
↓ 5 callersFunctioncapture_verbosity
()
hypothesis/tests/cover/test_verbosity.py:23
↓ 5 callersFunctioncheck_valid_bound
Checks that value is either unspecified, or a valid interval bound. Otherwise raises InvalidArgument.
hypothesis/src/hypothesis/internal/validation.py:52
↓ 5 callersFunctioncheck_valid_dims
(dims, name)
hypothesis/src/hypothesis/extra/_array_helpers.py:84
↓ 5 callersFunctioncheck_valid_size
Checks that value is either unspecified, or a valid non-negative size expressed as an integer. Otherwise raises InvalidArgument.
hypothesis/src/hypothesis/internal/validation.py:95
↓ 5 callersFunctioncurrent_verbosity
()
hypothesis/src/hypothesis/reporting.py:39
↓ 5 callersFunctiondedent
(text: str)
hypothesis/src/hypothesis/extra/_patching.py:61
↓ 5 callersMethoddelete
(self, key: bytes, value: bytes)
hypothesis/src/hypothesis/extra/redis.py:111
↓ 5 callersFunctiondeliver_observation
(observation: Observation)
hypothesis/src/hypothesis/internal/observability.py:344
↓ 5 callersFunctiondictionaries
Generates dictionaries of type ``dict_class`` with keys drawn from the ``keys`` argument and values drawn from the ``values`` argument. The s
hypothesis/src/hypothesis/strategies/_internal/core.py:602
↓ 5 callersFunctiondo_work
(*, multiplier=1)
hypothesis/tests/nocover/test_threading.py:63
↓ 5 callersMethoddraw_value
( self, choice_type: ChoiceTypeT, value: ChoiceT, *, was_forced: bool,
hypothesis/src/hypothesis/internal/conjecture/datatree.py:1029
↓ 5 callersFunctionf
(n)
hypothesis/tests/crosshair/test_crosshair.py:35
↓ 5 callersFunctionf
(n1)
hypothesis/tests/cover/test_health_checks.py:208
↓ 5 callersFunctionf
(v1, v2, data)
hypothesis/tests/cover/test_observability.py:112
↓ 5 callersFunctionf
()
hypothesis/tests/cover/test_reflection.py:311
↓ 5 callersFunctionfrom_model
Return a strategy for examples of ``model``. .. warning:: Hypothesis creates saved models. This will run inside your testing tran
hypothesis/src/hypothesis/extra/django/_impl.py:65
↓ 5 callersFunctiongc_cumulative_time
()
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:453
↓ 5 callersMethodgenerate_novel_prefix
Generate a short random string that (after rewriting) is not a prefix of any choice sequence previously added to the tree. The result
hypothesis/src/hypothesis/internal/conjecture/datatree.py:702
↓ 5 callersFunctionget_output
(testdir, suite, *args)
hypothesis/tests/pytest/test_statistics.py:19
↓ 5 callersFunctionget_pyright_analysed_type
(fname)
whole_repo_tests/types/test_pyright.py:376
↓ 5 callersFunctionget_trimmed_traceback
Return the current traceback, minus any frames added by Hypothesis.
hypothesis/src/hypothesis/internal/escalation.py:60
↓ 5 callersFunctioninner
(a)
hypothesis/tests/cover/test_given_error_conditions.py:49
↓ 5 callersFunctionis_generic_type
Decides whether a given type is generic or not.
hypothesis/src/hypothesis/strategies/_internal/types.py:515
↓ 5 callersMethodmove
(self, src: bytes, dest: bytes, value: bytes)
hypothesis/src/hypothesis/extra/redis.py:115
↓ 5 callersMethodnode_program
(self, program: str)
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:1340
↓ 5 callersFunctionpartition_attributes_and_stubs
( xp: Any, attributes: Iterable[str] )
hypothesis/src/hypothesis/extra/array_api.py:90
↓ 5 callersFunctionprecisely_shrink
Generates a random value from the strategy and then precisely shrinks it, by shrinking it with some value immediately afterwards that is not allow
hypothesis/tests/nocover/test_precise_shrinking.py:86
↓ 5 callersMethodremove_discarded
Try removing all nodes marked as discarded. This is primarily to deal with data that has been ignored while doing rejection sampling
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:1289
↓ 5 callersMethodrewrite
Use previously seen ConjectureData objects to return a tuple of the rewritten choice sequence and the status we would get from running
hypothesis/src/hypothesis/internal/conjecture/datatree.py:817
↓ 5 callersMethodsave
(self, key: bytes, value: bytes)
hypothesis/tests/cover/test_database_backend.py:802
↓ 5 callersMethodshrink_interesting_examples
If we've found interesting examples, try to replace each of them with a minimal interesting example with the same interesting_origin.
hypothesis/src/hypothesis/internal/conjecture/engine.py:1602
↓ 5 callersMethodsimulate_test_function
Run a simulated version of the test function recorded by this tree. Note that this does not currently call ``stop_span`` or ``start_sp
hypothesis/src/hypothesis/internal/conjecture/datatree.py:829
↓ 5 callersFunctionstartswith
(l1: Sequence[T], l2: Sequence[T])
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:504
← previousnext →201–300 of 6,164, ranked by callers