Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/HypothesisWorks/hypothesis
/ types & classes
Types & classes
721 in github.com/HypothesisWorks/hypothesis
⨍
Functions
6,164
◇
Types & classes
721
↳
Endpoints
128
↓ 180 callers
Class
settings
A settings object controls the following aspects of test behavior: |~settings.max_examples|, |~settings.derandomize|, |~settings.database|,
hypothesis/src/hypothesis/_settings.py:570
↓ 118 callers
Class
InvalidArgument
Used to indicate that the arguments to a Hypothesis function were in some manner incorrect.
hypothesis/src/hypothesis/errors.py:205
↓ 104 callers
Class
ConjectureRunner
hypothesis/src/hypothesis/internal/conjecture/engine.py:282
↓ 70 callers
Class
InMemoryExampleDatabase
A non-persistent example database, implemented in terms of an in-memory dictionary. This can be useful if you call a test function several ti
hypothesis/src/hypothesis/database.py:368
↓ 29 callers
Class
Bundle
A collection of values for use in stateful testing. Bundles are a kind of strategy where values can be added by rules, and (like any strategy
hypothesis/src/hypothesis/stateful.py:587
↓ 26 callers
Class
ShrinkPass
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:124
↓ 23 callers
Class
DataTree
A DataTree tracks the structured history of draws in some test function, across multiple ConjectureData objects. This information is use
hypothesis/src/hypothesis/internal/conjecture/datatree.py:546
↓ 19 callers
Class
DirectoryBasedExampleDatabase
Use a directory to store Hypothesis examples as files. Each test corresponds to a directory, and each example to a file within that directory
hypothesis/src/hypothesis/database.py:422
↓ 19 callers
Class
IntervalSet
A compact and efficient representation of a set of ``(a, b)`` intervals. Can be treated like a set of integers, in that ``n in intervals`` wi
hypothesis/src/hypothesis/internal/intervalsets.py:28
↓ 17 callers
Class
Constants
hypothesis/src/hypothesis/internal/constants_ast.py:35
↓ 14 callers
Class
IntList
Class for storing a list of non-negative integers compactly. We store them as the smallest size integer array we can get away with. When we t
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:63
↓ 13 callers
Class
ConjectureData
hypothesis/src/hypothesis/internal/conjecture/data.py:601
↓ 12 callers
Class
GitHubArtifactDatabase
A file-based database loaded from a `GitHub Actions <https://docs.github.com/en/actions>`_ artifact. You can use this for sharing example da
hypothesis/src/hypothesis/database.py:816
↓ 9 callers
Class
FilteredStrategy
hypothesis/src/hypothesis/strategies/_internal/strategies.py:1141
↓ 9 callers
Class
LazySequenceCopy
A "copy" of a sequence that works by inserting a mask in front of the underlying sequence, so that you can mutate it without changing the unde
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:193
↓ 9 callers
Class
RedisExampleDatabase
Store Hypothesis examples as sets in the given :class:`~redis.Redis` datastore. This is particularly useful for shared databases, as per the reci
hypothesis/src/hypothesis/extra/redis.py:24
↓ 8 callers
Class
LRUReusedCache
The only concrete implementation of GenericCache we use outside of tests currently. Adopts a modified least-recently used eviction policy: It
hypothesis/src/hypothesis/internal/cache.py:259
↓ 8 callers
Class
LazyStrategy
A strategy which is defined purely by conversion to and from another strategy. Its parameter and distribution come from that other strategy.
hypothesis/src/hypothesis/strategies/_internal/lazy.py:66
↓ 8 callers
Class
ResolutionFailed
Hypothesis had to resolve a type to a strategy, but this failed. Type inference is best-effort, so this only happens when an annotation exist
hypothesis/src/hypothesis/errors.py:210
↓ 8 callers
Class
StopTest
Raised when a test should stop running and return control to the Hypothesis engine, which should then continue normally.
hypothesis/src/hypothesis/errors.py:308
↓ 8 callers
Class
ThreadLocal
Manages thread-local state. ThreadLocal forwards getattr and setattr to a threading.local() instance. The passed kwargs defines the available
hypothesis/src/hypothesis/utils/threading.py:16
↓ 8 callers
Class
example
Add an explicit input to a Hypothesis test, which Hypothesis will always try before generating random inputs. This combines the randomized na
hypothesis/src/hypothesis/core.py:179
↓ 7 callers
Class
ChoiceTemplate
hypothesis/src/hypothesis/internal/conjecture/choice.py:75
↓ 7 callers
Class
ChoiceTree
Records sequences of choices made during shrinking so that we can track what parts of a pass has run. Used to create Chooser objects that are
hypothesis/src/hypothesis/internal/conjecture/shrinking/choicetree.py:116
↓ 6 callers
Class
BuildContext
hypothesis/src/hypothesis/control.py:144
↓ 6 callers
Class
ChoiceNode
hypothesis/src/hypothesis/internal/conjecture/choice.py:85
↓ 6 callers
Class
HasSetupAndTeardown
hypothesis/tests/cover/test_setup_teardown.py:58
↓ 6 callers
Class
ensure_free_stackframes
Context manager that ensures there are at least N free stackframes (for a reasonable value of N).
hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:366
↓ 5 callers
Class
ConstructivePredicate
Return constraints to the appropriate strategy, and the predicate if needed. For example:: integers().filter(lambda x: x >= 0) -
hypothesis/src/hypothesis/internal/filtering.py:50
↓ 5 callers
Class
ExampleDatabase
A Hypothesis database, for use in |settings.database|. Hypothesis automatically saves failures to the database set in |settings.database
hypothesis/src/hypothesis/database.py:172
↓ 5 callers
Class
Frozen
Raised when a mutation method has been called on a ConjectureData object after freeze() has been called.
hypothesis/src/hypothesis/errors.py:264
↓ 5 callers
Class
HypothesisException
Generic parent class for exceptions thrown by Hypothesis.
hypothesis/src/hypothesis/errors.py:23
↓ 5 callers
Class
InvalidDefinition
Used to indicate that a class definition was not well put together and has something wrong with it.
hypothesis/src/hypothesis/errors.py:223
↓ 5 callers
Class
OneCharStringStrategy
A strategy which generates single character strings of text type.
hypothesis/src/hypothesis/strategies/_internal/strings.py:51
↓ 4 callers
Class
BackendCannotProceed
Raised by alternative backends when a |PrimitiveProvider| cannot proceed. This is expected to occur inside one of the ``.draw_*()`` methods,
hypothesis/src/hypothesis/errors.py:342
↓ 4 callers
Class
ConstantVisitor
hypothesis/src/hypothesis/internal/constants_ast.py:104
↓ 4 callers
Class
Context
hypothesis/src/hypothesis/strategies/_internal/regex.py:117
↓ 4 callers
Class
DynamicVariable
hypothesis/src/hypothesis/utils/dynamicvariables.py:19
↓ 4 callers
Class
LRUCache
This is a drop-in replacement for a GenericCache (despite the lack of inheritance) in performance critical environments. It turns out that Ge
hypothesis/src/hypothesis/internal/cache.py:291
↓ 4 callers
Class
OneOfStrategy
Implements a union of strategies. Given a number of strategies this generates values which could have come from any of them. The conditional
hypothesis/src/hypothesis/strategies/_internal/strategies.py:809
↓ 4 callers
Class
ReadOnlyDatabase
A wrapper to make the given database read-only. The implementation passes through ``fetch``, and turns ``save``, ``delete``, and ``move`` int
hypothesis/src/hypothesis/database.py:709
↓ 4 callers
Class
SampledFromStrategy
A strategy which samples from a set of elements. This is essentially equivalent to using a OneOfStrategy over Just strategies but may be more
hypothesis/src/hypothesis/strategies/_internal/strategies.py:580
↓ 4 callers
Class
TreeNode
A node, or collection of directly descended nodes, in a DataTree. We store the DataTree as a radix tree (https://en.wikipedia.org/wiki/Radix
hypothesis/src/hypothesis/internal/conjecture/datatree.py:330
↓ 4 callers
Class
UniqueIdentifier
A factory for sentinel objects with nice reprs.
hypothesis/src/hypothesis/utils/conventions.py:12
↓ 3 callers
Class
ArtificialRandom
hypothesis/src/hypothesis/strategies/_internal/random.py:176
↓ 3 callers
Class
BackgroundWriteDatabase
A wrapper which defers writes on the given database to a background thread. Calls to :meth:`~hypothesis.database.ExampleDatabase.fetch` wait for
hypothesis/src/hypothesis/database.py:1166
↓ 3 callers
Class
DataObserver
Observer class for recording the behaviour of a ConjectureData object, primarily used for tracking the behaviour in the tree cache.
hypothesis/src/hypothesis/internal/conjecture/data.py:526
↓ 3 callers
Class
FeatureFlags
Object that can be used to control a number of feature flags for a given test run. This enables an approach to data generation called swarm t
hypothesis/src/hypothesis/strategies/_internal/featureflags.py:21
↓ 3 callers
Class
FlakyFailure
This function appears to fail non-deterministically: We have seen it fail when passed this example at least once, but a subsequent invocation
hypothesis/src/hypothesis/errors.py:153
↓ 3 callers
Class
HashItAnyway
hypothesis/tests/cover/test_pretty.py:521
↓ 3 callers
Class
MultiplexedDatabase
A wrapper around multiple databases. Each ``save``, ``fetch``, ``move``, or ``delete`` operation will be run against all of the wrapped datab
hypothesis/src/hypothesis/database.py:748
↓ 3 callers
Class
RandomState
hypothesis/src/hypothesis/strategies/_internal/random.py:150
↓ 3 callers
Class
TextStrategy
hypothesis/src/hypothesis/strategies/_internal/strings.py:165
↓ 3 callers
Class
ValueScored
hypothesis/tests/cover/test_cache_implementation.py:73
↓ 3 callers
Class
Valueless
hypothesis/tests/cover/test_executors.py:48
↓ 3 callers
Class
many
Utility class for collections. Bundles up the logic we use for "should I keep drawing more values?" and handles starting and stopping examples in
hypothesis/src/hypothesis/internal/conjecture/utils.py:261
↓ 2 callers
Class
A
hypothesis/tests/pandas/test_data_frame.py:295
↓ 2 callers
Class
A
hypothesis/tests/pandas/test_series.py:58
↓ 2 callers
Class
A
hypothesis/tests/numpy/test_gen_data.py:1289
↓ 2 callers
Class
Banana
hypothesis/tests/cover/test_pretty.py:825
↓ 2 callers
Class
BasicIndexStrategy
hypothesis/src/hypothesis/extra/_array_helpers.py:639
↓ 2 callers
Class
BroadcastableShapes
hypothesis/src/hypothesis/extra/_array_helpers.py:56
↓ 2 callers
Class
BuildsStrategy
hypothesis/src/hypothesis/strategies/_internal/core.py:1072
↓ 2 callers
Class
BundleReferenceStrategy
hypothesis/src/hypothesis/stateful.py:566
↓ 2 callers
Class
CharmField
hypothesis/tests/django/toystore/models.py:31
↓ 2 callers
Class
CustomishField
hypothesis/tests/django/toystore/models.py:36
↓ 2 callers
Class
DepthCharge
hypothesis/tests/nocover/test_stateful.py:78
↓ 2 callers
Class
FeatureStrategy
hypothesis/src/hypothesis/strategies/_internal/featureflags.py:126
↓ 2 callers
Class
FlatMapStrategy
hypothesis/src/hypothesis/strategies/_internal/flatmapped.py:30
↓ 2 callers
Class
FloatStrategy
A strategy for floating point numbers.
hypothesis/src/hypothesis/strategies/_internal/numbers.py:146
↓ 2 callers
Class
Foo
hypothesis/tests/cover/test_detection.py:24
↓ 2 callers
Class
Foo
hypothesis/tests/cover/test_setup_teardown.py:108
↓ 2 callers
Class
HashableArrayModuleFactory
mock_xp cannot be hashed and thus cannot be used in our cache. So just for the purposes of testing the cache, we wrap it with an unsafe hash
hypothesis/tests/array_api/test_strategies_namespace.py:34
↓ 2 callers
Class
HealthCheck
A |HealthCheck| is proactively raised by Hypothesis when Hypothesis detects that your test has performance problems, which may result in less
hypothesis/src/hypothesis/_settings.py:213
↓ 2 callers
Class
HealthCheckState
hypothesis/src/hypothesis/internal/conjecture/engine.py:117
↓ 2 callers
Class
HypothesisHandle
This object is provided as the .hypothesis attribute on @given tests. Downstream users can reassign its attributes to insert custom logic into
hypothesis/src/hypothesis/core.py:1689
↓ 2 callers
Class
Integer
Attempts to find a smaller integer. Guaranteed things to try ``0``, ``1``, ``initial - 1``, ``initial - 2``. Plenty of optimisations beyond t
hypothesis/src/hypothesis/internal/conjecture/shrinking/integer.py:19
↓ 2 callers
Class
JustStrategy
A strategy which always returns a single fixed value. It's implemented as a length-one SampledFromStrategy so that all our special-case logic
hypothesis/src/hypothesis/strategies/_internal/misc.py:31
↓ 2 callers
Class
LocalTest
hypothesis/tests/django/toystore/test_basic_configuration.py:59
↓ 2 callers
Class
MappedStrategy
A strategy which is defined purely by conversion to and from another strategy. Its parameter and distribution come from that other strategy.
hypothesis/src/hypothesis/strategies/_internal/strategies.py:1015
↓ 2 callers
Class
MutuallyBroadcastableShapesStrategy
hypothesis/src/hypothesis/extra/_array_helpers.py:496
↓ 2 callers
Class
Obj
hypothesis/tests/cover/test_pretty.py:683
↓ 2 callers
Class
Ordering
A shrinker that tries to make a sequence more sorted. Will not change the length or the contents, only tries to reorder the elements of the s
hypothesis/src/hypothesis/internal/conjecture/shrinking/ordering.py:16
↓ 2 callers
Class
ParetoFront
Maintains an approximate pareto front of ConjectureData objects. That is, we try to maintain a collection of objects such that no element of the
hypothesis/src/hypothesis/internal/conjecture/pareto.py:104
↓ 2 callers
Class
Phase
Options for the |settings.phases| argument to |@settings|.
hypothesis/src/hypothesis/_settings.py:142
↓ 2 callers
Class
ProducesMultiple
hypothesis/tests/cover/test_stateful.py:283
↓ 2 callers
Class
ReportableError
hypothesis/src/hypothesis/core.py:171
↓ 2 callers
Class
Reredirects
hypothesis/docs/_ext/hypothesis_redirects.py:68
↓ 2 callers
Class
Sampler
Sampler based on Vose's algorithm for the alias method. See http://www.keithschwarz.com/darts-dice-coins/ for a good explanation. The general
hypothesis/src/hypothesis/internal/conjecture/utils.py:192
↓ 2 callers
Class
Shrinker
A shrinker is a child object of a ConjectureRunner which is designed to manage the associated state of a particular shrink problem. That is, we
hypothesis/src/hypothesis/internal/conjecture/shrinker.py:147
↓ 2 callers
Class
SomeDataClass
hypothesis/tests/cover/test_pretty.py:777
↓ 2 callers
Class
StateForActualGivenExecution
hypothesis/src/hypothesis/core.py:917
↓ 2 callers
Class
StorageDirectory
hypothesis/src/hypothesis/configuration.py:42
↓ 2 callers
Class
TC
hypothesis/tests/cover/test_cache_implementation.py:261
↓ 2 callers
Class
Terminal
hypothesis/tests/nocover/test_explore_arbitrary_languages.py:47
↓ 2 callers
Class
TreeNode
hypothesis/src/hypothesis/internal/conjecture/shrinking/choicetree.py:145
↓ 2 callers
Class
TrivialProvider
hypothesis/tests/conjecture/test_provider.py:283
↓ 2 callers
Class
TrueRandom
hypothesis/src/hypothesis/strategies/_internal/random.py:392
↓ 2 callers
Class
TupleStrategy
A strategy responsible for fixed length tuples based on heterogeneous strategies for each of their elements.
hypothesis/src/hypothesis/strategies/_internal/collections.py:49
↓ 2 callers
Class
Unsatisfiable
We ran out of time or examples before we could find enough examples which satisfy the assumptions of this hypothesis. This could be because t
hypothesis/src/hypothesis/errors.py:52
next →
1–100 of 721, ranked by callers