
    iѸ                        % S r SSKrSSKrSSKrSSKrSSKJrJrJr  SSK	J
r
JrJr  SSKJr  SSKJrJrJrJrJr  SSKJr  SSKJr  SS	KJr  SS
KJrJr  SSKJr  SSK J!r!  SSK"J#r#  \(       a  SSK$J%r%  S/r&\" S5      r'/ SQr(\)\*   \+S'   \\ " S S\
5      5       5       r,\ " S S\
5      5       r- " S S\5      r.\ " S S\
\.S95       r/ " S S\R`                  5      r1SSSSSSSSSSSSS.r2S \34S! jr4\#\S      " S5      r5S"\*S#\'S$\\6   S \'4S% jr7S&\S#\6S"\*S \4S' jr8S(\9S \94S) jr:S*\S+   S \S+   4S, jr;S-\\-   S \\-   4S. jr<S/\9S \94S0 jr=S1\6S \>\/S24   4S3 jr?S4\9\@-  \R`                  -  S-  S \1S-  4S5 jrAS6\*S \*4S7 jrB " S8 S9\C5      rD " S: S\DS9rE\R                  S;\ES \\ESS4   4S< j5       rG\E" S=S>\\,R                  \>" \-5      S?S@SA\1" SBSC9S>SDS9rI\ER                  SE\I5        \ER                  SE5        \ER                  c   e\E" S@SSS@\/R                  /SF9rM\ER                  SG\M5        \4" 5       (       a  \ER                  SG5        \ER                  c   e\N" \(5      \R                  " \ER                  5      R                  R                  5        V s1 s H5  n U R                  \R                  R                  :X  d  M)  U R                  iM7     sn :X  d   egs  sn f )HzThe settings module configures runtime options for Hypothesis.

Either an explicit settings object can be used or the default object on
this module can be modified.
    N)
Collection	GeneratorSequence)EnumEnumMetaunique)total_ordering)TYPE_CHECKINGAnyClassVarOptionalTypeVarInvalidArgument)AVAILABLE_PROVIDERS)get_pretty_function_description)
check_typetry_convert)not_set)note_deprecation)DynamicVariableExampleDatabasesettingsTmax_examplesderandomizedatabase	verbosityphasesstateful_step_countreport_multiple_bugssuppress_health_checkdeadline
print_blobbackendall_settingsc                      ^  \ rS rSrSrSr Sr Sr Sr \	S 5       r
S\4S	 jr\S
S S\4S j5       rS\S\4U 4S jjrS\S\4S jrSrU =r$ )	Verbosity?   z=Options for the |settings.verbosity| argument to |@settings|.quietnormalverbosedebugc                     [        U[        5      (       a@  [        U[        5      (       d+  SSSSS.nX;   a  [        SU SX!    S3S	S
SS9  U " X!   5      $ g )Nr,   r-   r.   r/   )r            zPassing Verbosity(zn) as an integer is deprecated. Hypothesis now treats Verbosity values as strings, not integers. Use Verbosity.	 instead.
2025-11-05Fr2   sincehas_codemod
stacklevel
isinstanceintboolr   clsvalueint_to_names      S/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/_settings.py	_missing_Verbosity._missing_a   st     eS!!*UD*A*A%(yWMK# ( 0%%0%7$8	C ' %  ;-..    returnc                      SU R                    3$ )Nz
Verbosity.nameselfs    rB   __repr__Verbosity.__repr__r   s    DII;''rE   r@   c                 v   [         R                  R                  S[         R                  R                  S[         R                  R                  S[         R
                  R                  S0n[        UR                  5       5      [          Vs/ s H  o"R                  PM     sn:X  d   eXR                     $ s  snf )Nr   r1   r2   r3   )r*   r,   rI   r-   r.   r/   listkeys)r@   mappingr    s      rB   
_int_valueVerbosity._int_valueu   s     OO  !!!1""AOO  !	
 GLLN#	'R	9	'RRRRzz"" (Ss   B6otherc                 |   > [        U[        5      (       a  [        TU ]  U5      $ [        R	                  U 5      U:H  $ N)r;   r*   super__eq__rR   )rK   rT   	__class__s     rB   rX   Verbosity.__eq__   s5    eY''7>%((##D)U22rE   c                     [         R                  U 5      n[        U[         5      (       a  [         R                  U5      OUnX#:  $ rV   )r*   rR   r;   )rK   rT   value1value2s       rB   __gt__Verbosity.__gt__   s9    %%d+0:5)0L0L%%e,RWrE    )__name__
__module____qualname____firstlineno____doc__r,   r-   r.   r/   classmethodrC   strrL   staticmethodr<   rR   r   r=   rX   r^   __static_attributes____classcell__rY   s   @rB   r*   r*   ?   s     HE F
 G	 E
   (# ( 
#+ 
## 
# 
#3C 3D 3
C D  rE   r*   c                   Z    \ rS rSrSrSr Sr Sr Sr Sr	 Sr
 \S	 5       rS
\4S jrSrg)Phase   z:Options for the |settings.phases| argument to |@settings|.explicitreusegeneratetargetshrinkexplainc                     [        U[        5      (       aB  [        U[        5      (       d-  SSSSSSS.nX;   a  [        SU S	X!    S
3SSSS9  U " X!   5      $ g )Nro   rp   rq   rr   rs   rt   )r   r1   r2   r3         zPassing Phase(zf) as an integer is deprecated. Hypothesis now treats Phase values as strings, not integers. Use Phase.r4   r5   Fr2   r6   r:   r>   s      rB   rC   Phase._missing_   s     eS!!*UD*A*AK # $UG ,!!,!3 4I? ' %  ;-..rE   rF   c                      SU R                    3$ )NzPhase.rH   rJ   s    rB   rL   Phase.__repr__   s    		{##rE   r`   N)ra   rb   rc   rd   re   ro   rp   rq   rr   rs   rt   rf   rC   rg   rL   ri   r`   rE   rB   rm   rm      sk    DH E H F F G  .$# $rE   rm   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )HealthCheckMeta   c                    >^ [         R                  [         R                  4m[        U4S j[        TU ]  5        5       5      $ )Nc              3   6   >#    U  H  oT;  d  M
  Uv   M     g 7frV   r`   ).0x
deprecateds     rB   	<genexpr>+HealthCheckMeta.__iter__.<locals>.<genexpr>   s     I1!j5HAA1   		)HealthCheckreturn_valuenot_a_test_methoditerrW   __iter__)rK   r   rY   s    @rB   r   HealthCheckMeta.__iter__   s2    !..0M0MN
Iuw/1IIIrE   r`   )ra   rb   rc   rd   r   ri   rj   rk   s   @rB   r|   r|      s    J JrE   r|   c                       \ rS rSrSr\S 5       rS\4S jr\S\	S    4S j5       r
Sr Sr S	r S
r Sr Sr Sr Sr SrSrg)r      a   
A |HealthCheck| is proactively raised by Hypothesis when Hypothesis detects
that your test has performance problems, which may result in less rigorous
testing than you expect. For example, if your test takes a long time to generate
inputs, or filters away too many  inputs using |assume| or |filter|, Hypothesis
will raise a corresponding health check.

A health check is a proactive warning, not an error. We encourage suppressing
health checks where you have evaluated they will not pose a problem, or where
you have evaluated that fixing the underlying issue is not worthwhile.

With the exception of |HealthCheck.function_scoped_fixture| and
|HealthCheck.differing_executors|, all health checks warn about performance
problems, not correctness errors.

Disabling health checks
-----------------------

Health checks can be disabled by |settings.suppress_health_check|. To suppress
all health checks, you can pass ``suppress_health_check=list(HealthCheck)``.

.. seealso::

    See also the :doc:`/how-to/suppress-healthchecks` how-to.

Correctness health checks
-------------------------

Some health checks report potential correctness errors, rather than performance
problems.

* |HealthCheck.function_scoped_fixture| indicates that a function-scoped
  pytest fixture is used by an |@given| test. Many Hypothesis users expect
  function-scoped fixtures to reset once per input, but they actually reset once
  per test. We proactively raise |HealthCheck.function_scoped_fixture| to
  ensure you have considered this case.
* |HealthCheck.differing_executors| indicates that the same |@given| test has
  been executed multiple times with multiple distinct executors.

We recommend treating these particular health checks with more care, as
suppressing them may result in an unsound test.
c           
          [        U[        5      (       aE  [        U[        5      (       d0  SSSSSSSSS	S
.	nX;   a  [        SU SX!    S3SSSS9  U " X!   5      $ g )Ndata_too_largefilter_too_muchtoo_slowr   large_base_exampler   function_scoped_fixturediffering_executorsnested_given)	r1   r2   r3   rw         	   
      zPassing HealthCheck(zr) as an integer is deprecated. Hypothesis now treats HealthCheck values as strings, not integers. Use HealthCheck.r4   r5   Fr2   r6   r:   r>   s      rB   rC   HealthCheck._missing_  s     eS!!*UD*A*A#$!'&,)"
K # *5' 2''2'9&:)E ' %  ;-..rE   rF   c                 L    U R                   R                   SU R                   3$ )N.)rY   ra   rI   rJ   s    rB   rL   HealthCheck.__repr__  s"    ..))*!DII;77rE   c                 8    [        SSSSS9  [        [        5      $ )NzC`HealthCheck.all()` is deprecated; use `list(HealthCheck)` instead.z
2023-04-16Tr1   r6   )r   rO   r   r?   s    rB   allHealthCheck.all  s%     	Q		
 K  rE   r   r   r   r   r   r   r   r   r   r`   N)ra   rb   rc   rd   re   rf   rC   rg   rL   rO   r   r   r   r   r   r   r   r   r   r   ri   r`   rE   rB   r   r      s    )V  48# 8 !D' ! ! &N (O H "LI- ,S 8J" 0	% "LrE   r   )	metaclassc                   &    \ rS rSrSrS\4S jrSrg)durationi~  z2A timedelta specifically measured in milliseconds.rF   c                 j    U R                  5       S-  nSU[        U5      :X  a  [        U5      OU< S3$ )Ni  ztimedelta(milliseconds=))total_secondsr<   )rK   mss     rB   rL   duration.__repr__  s5    !D((B#b'MRr(LANNrE   r`   N)ra   rb   rc   rd   re   rg   rL   ri   r`   rE   rB   r   r   ~  s    <O# OrE   r   true)CI&__TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CITF_BUILDzbamboo.buildKey	BUILDKITECIRCLECI	CIRRUS_CICODEBUILD_BUILD_IDGITHUB_ACTIONS	GITLAB_CIHEROKU_TEST_RUN_IDTEAMCITY_VERSIONrF   c                  J    [        S [        R                  5        5       5      $ )Nc              3      #    U  HB  u  pU[         R                  ;   =(       a!    US L =(       d    [         R                  U   U:H  v   MD     g 7frV   )osenviron)r   keyr@   s      rB   r   is_in_ci.<locals>.<genexpr>  s@      *JC 	rzzIu}H

350HI*s   A
A)any_CI_VARSitemsr`   rE   rB   is_in_cir     s#     "..*  rE   rI   r@   choicesc                @    X;  a  SU  SU< SU< 3n[        U5      eU$ )NzInvalid , z. Valid choices: r   )rI   r@   r   msgs       rB   _validate_choicesr     s1    b	):7+Fc""LrE   r?   c                     U " U5      $ ! [          a+    [        U SU SSR                  S U  5       5       35      S ef = f)N=z( is not a valid value. The options are: r   c              3   L   #    U  H  n[        UR                  5      v   M     g 7frV   )reprrI   )r   ms     rB   r   '_validate_enum_value.<locals>.<genexpr>  s     8Cqd166llCs   "$)
ValueErrorr   join)r?   r@   rI   s      rB   _validate_enum_valuer     s\    5z fAeW II8C889;
 	s   
 5?r   c                 P    [        [        U SS9  U S:  a  [        SU < S35      eU $ )Nr   rH   r1   zmax_examples=zg must be at least one. If you want to disable generation entirely, use phases=[Phase.explicit] instead.r   r<   r   )r   s    rB   _validate_max_examplesr     s?    sL~6aL+ ,S S
 	
 rE   r   r   c                 N    SSK Jn  U b  [        X5      (       a  U $ [        S5      e)Nr   r   zArguments to the database setting must be None or an instance of ExampleDatabase. Use one of the database classes in hypothesis.database)hypothesis.databaser   r;   r   )r   r   s     rB   _validate_databaser     s.     4:h@@
	 rE   r!   c                    ^  [        [        T S5      m [        S T  5       5      m [        U 4S j[        [        5       5       5      $ )Nr!   c              3   @   #    U  H  n[        [        US S9v   M     g7f)r!   rH   N)r   rm   )r   phases     rB   r   #_validate_phases.<locals>.<genexpr>  s      GMeUE9v   c              3   6   >#    U  H  oT;   d  M
  Uv   M     g 7frV   r`   )r   r   r!   s     rB   r   r     s     CK5F?Kr   )r   tuplerO   rm   )r!   s   `rB   _validate_phasesr     s?    1F GM F CDKCCCrE   r"   c                 P    [        [        U SS9  U S:  a  [        SU < S35      eU $ )Nr"   rH   r1   zstateful_step_count=z must be at least one.r   )r"   s    rB   _validate_stateful_step_countr     s<    s'.CDQ"#6"99OP
 	
 rE   suppressions.c                     [        [        U S5      n U  HC  nU[        R                  [        R                  4;   d  M)  [        SUR                   S3SSSS9  ME     [        S U  5       5      $ )	Nr$   zThe z= health check is deprecated, because this is always an error.z
2023-03-15Fr2   r6   c              3   @   #    U  H  n[        [        US S9v   M     g7f)r$   rH   N)r   r   )r   health_checks     rB   r   2_validate_suppress_health_check.<locals>.<genexpr>  s!      (L 	[,=TU(r   )r   r   r   r   r   r   rI   )r   r   s     rB   _validate_suppress_health_checkr     su    ul4KLL$K44k6S6STT|(())fg"!	 %  (  rE   r%   c                    U c  U $ [        SU < S[        U 5      R                   S35      n[        U [        [
        45      (       a!  [        U [        5      (       a  Ue [        U S9n [        U [        R                  5      (       aA  U [        R                  " S5      ::  a  [        SU < S35      e[        U R                  5       S9$ Ue! [         a    [        SU < S35      S ef = f)	Nz	deadline=z (type zx) must be a timedelta object, an integer or float number of milliseconds, or None to disable the per-test-case deadline.millisecondszi is invalid, because it is too large to represent as a timedelta. Use deadline=None to disable deadlines.r   zf is invalid, because it is impossible to meet a deadline <= 0. Use deadline=None to disable deadlines.)seconds)r   typera   r;   r<   floatr=   r   OverflowErrordatetime	timedeltar   )r%   invalid_deadline_errors     rB   _validate_deadliner     s    ,
H<wtH~'>'>&? @" 	"
 (S%L))h%%((	X6H (H..//x))!,,!H< (I I   6 6 899
    	!H< (J J 	s   	C
 
C&r'   c                     U [         ;  a:  U S:X  a  Sn[        SU < SU 35      e[        SU < S[        [         5      < 35      eU $ )N	crosshairz4`pip install "hypothesis[crosshair]"` and try again.zbackend=z is not available.  zP is not available - maybe you need to install a plugin?
    Installed backends: )r   r   sorted)r'   installs     rB   _validate_backendr     sc    ))k!LG!HWK7KG9"UVVwk "))/0C)D(GI
 	
 NrE   c                   h   ^  \ rS rSrU 4S jr\S\S   4S j5       rS\S\	SS4U 4S	 jjr
S
 rSrU =r$ )settingsMetai  c                 &   > [         TU ]  " U0 UD6  g rV   )rW   __init__)r?   argskwargsrY   s      rB   r   settingsMeta.__init__  s    $)&)rE   rF   r   c                    [         R                  nUb  U$ [        [        SS 5      bI  [        R                  c   e[        R                  [        R                  5        [         R                  c   e[         R                  $ )N_current_profile)default_variabler@   getattrr   r   load_profile)r?   vs     rB   defaultsettingsMeta.default  sk    ""=H8/6B,,888!!(";";<#))555%%%rE   rI   r@   Nc                    > US:X  a  [        S5      eUR                  S5      (       d  [        SU SU< S35      e[        TU ]  X5        g )Nr  z^Cannot assign to the property settings.default - consider using settings.load_profile instead._z"Cannot assign hypothesis.settings.r   z - the settings class is immutable.  You can change the global default settings with settings.load_profile, or use @settings(...) to decorate your test instead.)AttributeError
startswithrW   __setattr__)r?   rI   r@   rY   s      rB   r  settingsMeta.__setattr__'  sc    9 @  %% 4TF!E9 E1 1  	D(rE   c                     g)Nzhypothesis.settingsr`   r   s    rB   rL   settingsMeta.__repr__6  s    $rE   r`   )ra   rb   rc   rd   r   propertyr   r  rg   objectr  rL   ri   rj   rk   s   @rB   r   r     sL    * &, & &)s )6 )d )% %rE   r   c                   r  ^  \ rS rSr% Sr0 r\\\S 4      \	S'   Sr
\\S-     \	S'    S1\\\\\\\\\\\S.S\S    S\S	\S
\S   SSS\S   S\S\S\S   S\\-  \R$                  -  S-  S\S\SS4S jjjr\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S  5       r\S! 5       r\S" 5       r\S# 5       rS$\ S\ 4S% jr!S&\S'\"SS4U 4S( jjr#S\4S) jr$S\4S* jr%\& S1S&\S\S    S+\'SS4S, jj5       r(\&S&\SS 4S- j5       r)\&S&\SS4S. j5       r*\&S\4S/ j5       r+S0r,U =r-$ )2r   i:  a  
A settings object controls the following aspects of test behavior:
|~settings.max_examples|, |~settings.derandomize|, |~settings.database|,
|~settings.verbosity|, |~settings.phases|, |~settings.stateful_step_count|,
|~settings.report_multiple_bugs|, |~settings.suppress_health_check|,
|~settings.deadline|, |~settings.print_blob|, and |~settings.backend|.

A settings object can be applied as a decorator to a test function, in which
case that test function will use those settings. A test may only have one
settings object applied to it. A settings object can also be passed to
|settings.register_profile| or as a parent to another |settings|.

Attribute inheritance
---------------------

Settings objects are immutable once created. When a settings object is created,
it uses the value specified for each attribute. Any attribute which is
not specified will inherit from its value in the ``parent`` settings object.
If ``parent`` is not passed, any attributes which are not specified will inherit
from the current settings profile instead.

For instance, ``settings(max_examples=10)`` will have a ``max_examples`` of ``10``,
and the value of all other attributes will be equal to its value in the
current settings profile.

Changes made from activating a new settings profile with |settings.load_profile|
will be reflected in settings objects created after the profile was loaded,
but not in existing settings objects.

.. _builtin-profiles:

Built-in profiles
-----------------

While you can register additional profiles with |settings.register_profile|,
Hypothesis comes with two built-in profiles: ``default`` and ``ci``.

By default, the ``default`` profile is active. If the ``CI`` environment
variable is set to any value, the ``ci`` profile is active by default. Hypothesis
also automatically detects various vendor-specific CI environment variables.

The attributes of the currently active settings profile can be retrieved with
``settings()`` (so ``settings().max_examples`` is the currently active default
for |settings.max_examples|).

The settings attributes for the built-in profiles are as follows:

.. code-block:: python

    default = settings.register_profile(
        "default",
        max_examples=100,
        derandomize=False,
        database=not_set,  # see settings.database for default behavior
        verbosity=Verbosity.normal,
        phases=tuple(Phase),
        stateful_step_count=50,
        report_multiple_bugs=True,
        suppress_health_check=(),
        deadline=duration(milliseconds=200),
        print_blob=False,
        backend="hypothesis",
    )

    ci = settings.register_profile(
        "ci",
        parent=default,
        derandomize=True,
        deadline=None,
        database=None,
        print_blob=True,
        suppress_health_check=[HealthCheck.too_slow],
    )

You can replace either of the built-in profiles with |settings.register_profile|:

.. code-block:: python

    # run more examples in CI
    settings.register_profile(
        "ci",
        settings.get_profile("ci"),
        max_examples=1000,
    )
	_profilesNr   r   parentr   r   r   r   r    r*   r!   rm   r"   r#   r$   r   r%   r&   r'   rF   c                   SU l         Ub  [        [        US5        U[        S4;  a  U[        S 4;  a  [	        SU< S35      eS nU=(       d    [        R
                  U l        U[        L a  U R                  R                  O
[        U5      U l	        U[        L a  U R                  R                  O[        SUSS/S9U l        U[        La  [        U5      nX@l        S U l        U[        L a  U R                  R                   O[#        [$        USS	9U l        U[        L a  U R                  R(                  O
[+        U5      U l        U[        L a  U R                  R.                  O
[1        U5      U l        U[        L a  U R                  R4                  O[        S
USS/S9U l        U	[        L a  U R                  R8                  O
[;        U	5      U l        U
[        L a  U R                  R>                  O
[A        U
5      U l!        U[        L a  U R                  RD                  O[        SUSS/S9U l#        U[        L a  U R                  RH                  O
[K        U5      U l&        SU l         g )NTr  Fz<derandomize=True implies database=None, so passing database=z too is invalid.r   )r   r    rH   r#   r&   )'_in_definitionr   r   r   r   r  	_fallbackr   r   _max_examplesr   r   _derandomizer   	_database_cached_databaser    r   r*   
_verbosityr!   r   _phasesr"   r   _stateful_step_countr#   _report_multiple_bugsr$   r   _suppress_health_checkr%   r   	_deadliner&   _print_blobr'   r   _backend)rK   r  r   r   r   r    r!   r"   r#   r$   r%   r&   r'   s                rB   r   settings.__init__  sT   ( #x2w...%!k!13  H  38#3#3 w& NN'''5 	 g% NN&&"=+e}U 	
 7")(3H! $ G# NN$$%iM 	   NN!!!&) 	 #g- NN.../BC 	! $w. NN//"&(<tUm 	" %/ NN0001FG 	# 7" NN###H- 	 W$ NN%%"<dE]S 	 '! NN"""7+ 	 $rE   c                     U R                   $ )as  
Once this many satisfying examples have been considered without finding any
counter-example, Hypothesis will stop looking.

Note that we might call your test function fewer times if we find a bug early
or can tell that we've exhausted the search space; or more if we discard some
examples due to use of .filter(), assume(), or a few other things that can
prevent the test case from completing successfully.

The default value is chosen to suit a workflow where the test will be part of
a suite that is regularly executed locally or on a CI server, balancing total
running time against the chance of missing a bug.

If you are writing one-off tests, running tens of thousands of examples is
quite reasonable as Hypothesis may miss uncommon bugs with default settings.
For very complex code, we have observed Hypothesis finding novel bugs after
*several million* examples while testing :pypi:`SymPy <sympy>`.
If you are running more than 100k examples for a test, consider using our
:ref:`integration for coverage-guided fuzzing <fuzz_one_input>` - it really
shines when given minutes or hours to run.

The default max examples is ``100``.
)r  rJ   s    rB   r   settings.max_examples  s    2 !!!rE   c                     U R                   $ )a   
If True, seed Hypothesis' random number generator using a hash of the test
function, so that every run will test the same set of examples until you
update Hypothesis, Python, or the test function.

This allows you to `check for regressions and look for bugs
<https://blog.nelhage.com/post/two-kinds-of-testing/>`__ using separate
settings profiles - for example running
quick deterministic tests on every commit, and a longer non-deterministic
nightly testing run.

The default is ``False``. If running on CI, the default is ``True`` instead.
)r  rJ   s    rB   r   settings.derandomize  s        rE   c                    SSK Jn  U R                  c!  U R                  [        L d   eU" [        5      $ U R
                  c:  U R                  [        L a  U R                  R                  OU R                  U l        U R
                  $ )a'  
An instance of |ExampleDatabase| that will be used to save examples to
and load previous examples from.

If not set, a |DirectoryBasedExampleDatabase| is created in the current
working directory under ``.hypothesis/examples``. If this location is
unusable, e.g. due to the lack of read or write permissions, Hypothesis
will emit a warning and fall back to an |InMemoryExampleDatabase|.

If ``None``, no storage will be used.

See the :ref:`database documentation <database>` for a list of database
classes, and how to define custom database classes.
r   )_db_for_path)r   r&  r  r  r   r  r   )rK   r&  s     rB   r   settings.database  st      	5 >>! >>W,,,((   (+/>>W+D''$.. ! $$$rE   c                     U R                   $ )a  
Control the verbosity level of Hypothesis messages.

To see what's going on while Hypothesis runs your tests, you can turn
up the verbosity setting.

.. code-block:: pycon

    >>> from hypothesis import settings, Verbosity
    >>> from hypothesis.strategies import lists, integers
    >>> @given(lists(integers()))
    ... @settings(verbosity=Verbosity.verbose)
    ... def f(x):
    ...     assert not any(x)
    ... f()
    Trying example: []
    Falsifying example: [-1198601713, -67, 116, -29578]
    Shrunk example to [-1198601713]
    Shrunk example to [-128]
    Shrunk example to [32]
    Shrunk example to [1]
    [1]

The four levels are |Verbosity.quiet|, |Verbosity.normal|,
|Verbosity.verbose|, and |Verbosity.debug|. |Verbosity.normal| is the
default. For |Verbosity.quiet|, Hypothesis will not print anything out,
not even the final falsifying example. |Verbosity.debug| is basically
|Verbosity.verbose| but a bit more so. You probably don't want it.

Verbosity can be passed either as a |Verbosity| enum value, or as the
corresponding string value, or as the corresponding integer value. For
example:

.. code-block:: python

    # these three are equivalent
    settings(verbosity=Verbosity.verbose)
    settings(verbosity="verbose")

If you are using :pypi:`pytest`, you may also need to :doc:`disable
output capturing for passing tests <pytest:how-to/capture-stdout-stderr>`
to see verbose output as tests run.
)r  rJ   s    rB   r    settings.verbosityD  s    Z rE   c                     U R                   $ )a  
Control which phases should be run.

Hypothesis divides tests into logically distinct phases.

- |Phase.explicit|: Running explicit examples from |@example|.
- |Phase.reuse|: Running examples from the database which previously failed.
- |Phase.generate|: Generating new random examples.
- |Phase.target|: Mutating examples for :ref:`targeted property-based
  testing <targeted>`. Requires |Phase.generate|.
- |Phase.shrink|: Shrinking failing examples.
- |Phase.explain|: Attempting to explain why a failure occurred.
  Requires |Phase.shrink|.

The phases argument accepts a collection with any subset of these. E.g.
``settings(phases=[Phase.generate, Phase.shrink])`` will generate new examples
and shrink them, but will not run explicit examples or reuse previous failures,
while ``settings(phases=[Phase.explicit])`` will only run explicit examples
from |@example|.

Phases can be passed either as a |Phase| enum value, or as the corresponding
string value. For example:

.. code-block:: python

    # these two are equivalent
    settings(phases=[Phase.explicit])
    settings(phases=["explicit"])

Following the first failure, Hypothesis will (usually, depending on
which |Phase| is enabled) track which lines of code are always run on
failing but never on passing inputs. On 3.12+, this uses
:mod:`sys.monitoring`, while 3.11 and earlier uses :func:`python:sys.settrace`.
For python 3.11 and earlier, we therefore automatically disable the explain
phase on PyPy, or if you are using :pypi:`coverage` or a debugger. If
there are no clearly suspicious lines of code, :pep:`we refuse the
temptation to guess <20>`.

After shrinking to a minimal failing example, Hypothesis will try to find
parts of the example -- e.g. separate args to |@given|
-- which can vary freely without changing the result
of that minimal failing example. If the automated experiments run without
finding a passing variation, we leave a comment in the final report:

.. code-block:: python

    test_x_divided_by_y(
        x=0,  # or any other generated value
        y=0,
    )

Just remember that the *lack* of an explanation sometimes just means that
Hypothesis couldn't efficiently find one, not that no explanation (or
simpler failing example) exists.
)r  rJ   s    rB   r!   settings.phasess  s    t ||rE   c                     U R                   $ )aJ  
The maximum number of times to call an additional |@rule| method in
:ref:`stateful testing <stateful>` before we give up on finding a bug.

Note that this setting is effectively multiplicative with max_examples,
as each example will run for a maximum of ``stateful_step_count`` steps.

The default stateful step count is ``50``.
)r  rJ   s    rB   r"   settings.stateful_step_count  s     (((rE   c                     U R                   $ )aK  
Because Hypothesis runs the test many times, it can sometimes find multiple
bugs in a single run.  Reporting all of them at once is usually very useful,
but replacing the exceptions can occasionally clash with debuggers.
If disabled, only the exception with the smallest minimal example is raised.

The default value is ``True``.
)r  rJ   s    rB   r#   settings.report_multiple_bugs  s     )))rE   c                     U R                   $ )a"  
Suppress the given |HealthCheck| exceptions. Those health checks will not
be raised by Hypothesis. To suppress all health checks, you can pass
``suppress_health_check=list(HealthCheck)``.

Health checks can be passed either as a |HealthCheck| enum value, or as
the corresponding string value. For example:

.. code-block:: python

    # these two are equivalent
    settings(suppress_health_check=[HealthCheck.filter_too_much])
    settings(suppress_health_check=["filter_too_much"])

Health checks are proactive warnings, not correctness errors, so we
encourage suppressing health checks where you have evaluated they will
not pose a problem, or where you have evaluated that fixing the underlying
issue is not worthwhile.

.. seealso::

    See also the :doc:`/how-to/suppress-healthchecks` how-to.
)r  rJ   s    rB   r$   settings.suppress_health_check  s    2 ***rE   c                     U R                   $ )ay  
The maximum allowed duration of an individual test case, in milliseconds.
You can pass an integer, float, or timedelta. If ``None``, the deadline
is disabled entirely.

We treat the deadline as a soft limit in some cases, where that would
avoid flakiness due to timing variability.

The default deadline is 200 milliseconds. If running on CI, the default is
``None`` instead.
)r  rJ   s    rB   r%   settings.deadline  s     ~~rE   c                     U R                   $ )z
If set to ``True``, Hypothesis will print code for failing examples that
can be used with |@reproduce_failure| to reproduce the failing example.

The default value is ``False``. If running on CI, the default is ``True`` instead.
)r  rJ   s    rB   r&   settings.print_blob  s     rE   c                     U R                   $ )z
.. warning::

    EXPERIMENTAL AND UNSTABLE - see :ref:`alternative-backends`.

The importable name of a backend which Hypothesis should use to generate
primitive types. We support heuristic-random, solver-based, and fuzzing-based
backends.
)r  rJ   s    rB   r'   settings.backend  s     }}rE   testc                    Un[        U5      (       d  [        SU< S35      e[        R                  " U5      (       a]  SSKJn  [        X#5      (       a<  Sn[        XS5      (       a  [        S5      e[        XS5        XR                  l
        U$ [        S	5      e[        US5      (       a*  [        U5      n[        U S
UR                  < SU < 35      eXl        SUl        U$ )zMake the settings object (self) an attribute of the test.

The settings are later discovered by looking them up on the test itself.
zNsettings objects can be called as a decorator with @given, but decorated test=z is not callable.r   )RuleBasedStateMachine%_hypothesis_internal_settings_appliedFzhApplying the @settings decorator twice would overwrite the first version; merge their arguments instead.Tzg@settings(...) can only be used as a decorator on functions, or on subclasses of RuleBasedStateMachine.zC has already been decorated with a settings object.
    Previous:  z
    This:  )callabler   inspectisclasshypothesis.statefulr:  
issubclassr   setattrTestCaser   hasattrr   !_hypothesis_internal_use_settingsr;  )rK   r8  _testr:  	attr_namedescrs         rB   __call__settings.__call__	  s     !'!%'8:  ??4  A%77C	4E22)# 
 .*.'%L  5ABB 4D9E!' ""'"I"I!L M"X'  37/6:3rE   rI   r@   c                    > UR                  S5      (       d  U R                  (       d  [        S5      e[        TU ]  X5      $ )Nr  zsettings objects are immutable)r  r  r  rW   r  )rK   rI   r@   rY   s      rB   r  settings.__setattr__:  s6    s##D,?,? !ABBw"4//rE   c                 v   ^  [        U 4S j[         5       5      nSR                  SR                  U5      5      $ )Nc              3   ~   >#    U  H2  nUS :w  d  [        [        5      S:  d  M  U S[        TU5      < 3v   M4     g7f)r'   r1   r   N)lenr   r   )r   rI   rK   s     rB   r   $settings.__repr__.<locals>.<genexpr>@  sB      
$	!S)<%=%A .tfAgdD),-$s   ==zsettings({})r   )r   r(   formatr   )rK   bitss   ` rB   rL   settings.__repr__?  s5     
$
 

 $$TYYt_55rE   c                     / n[          H;  n[        X5      nU[        [        U5      :w  d  M$  UR                  U SU< 35        M=     SR	                  [        U[        S95      $ )Nr   r   )r   )r(   r   r  appendr   r   rN  )rK   rQ  rI   r@   s       rB   show_changedsettings.show_changedG  sY     DD'E..tfAeY/0 ! yy#.//rE   r   c                    [        [        U S5        [        R                  (       aS  [        R
                  (       a>  [        R                  [        R                  [        R
                     :w  a  [        SSSS9  Ub	  U(       d  UO[	        SSU0UD6[        R                  U '   [        R
                  U :X  a  [        R                  U 5        gg)	a   
Register a settings object as a settings profile, under the name ``name``.
The ``parent`` and ``kwargs`` arguments to this method are as for
|settings|.

If a settings profile already exists under ``name``, it will be overwritten.
Registering a profile with the same name as the currently active profile
will cause those changes to take effect in the active profile immediately,
and do not require reloading the profile.

Registered settings profiles can be retrieved later by name with
|settings.get_profile|.
rI   zCannot register a settings profile when the current settings differ from the current profile (usually due to an @settings decorator). Register profiles at module level instead.z
2025-11-15F)r7   r8   Nr  r`   )	r   rg   r   r@   r   r   r  r   r   )rI   r  r   s      rB   register_profilesettings.register_profileO  s    & 	3f% "")) &&(*<*<X=V=V*WW= #! !& 2262 	4 
 $$,!!$' -rE   c                     [        [        U S5         [        R                  U    $ ! [         a    [        SU < S35      Sef = f)z
Returns the settings profile registered under ``name``. If no settings
profile is registered under ``name``, raises |InvalidArgument|.
rI   zProfile z is not registeredN)r   rg   r   r  KeyErrorr   rH   s    rB   get_profilesettings.get_profile}  sO     	3f%	S%%d++ 	S!HTH4F"GHdR	Ss	   & Ac                 x    [        [        U S5        U [        l        [        R	                  U 5      [
        l        g)z
Makes the settings profile registered under ``name`` the active profile.

If no settings profile is registered under ``name``, raises |InvalidArgument|.
rI   N)r   rg   r   r   r\  r   r@   rH   s    rB   r   settings.load_profile  s,     	3f%$(!!)!5!5d!;rE   c                  H    [         R                  c   e[         R                  $ )z
The name of the current settings profile. For example:

.. code-block:: python

    >>> settings.load_profile("myprofile")
    >>> settings.get_current_profile_name()
    'myprofile'
)r   r   r`   rE   rB   get_current_profile_name!settings.get_current_profile_name  s"     ((444(((rE   )r  r  r  r  r  r  r  r  r  r  r  r  r  r  rV   ).ra   rb   rc   rd   re   r  r   dictrg   __annotations__r   r   r   r<   r=   r   r   r   r   r   r  r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r   rH  r  r  rL   rU  rh   r   rX  r\  r   ra  ri   rj   rk   s   @rB   r   r   :  s   Tl 24IxS*_-.3-1hsTz*1 (,\$ $#07!(&-#*%,;B<C"%\$$\$ \$ \$ ,-\$ \$ 7#\$ !\$ #\$  *-8\$  + 2 22T9!\$" #\$$ %\$& 
'\$| " "4 ! !  #% #%J , ,\ 9 9v 
) 
) 	* 	* + +4       
 
/Q /1 /b0 0F 0t 0
6# 60c 0  (,+(+($+( +( 
	+( +(Z 	S# 	S* 	S 	S <3 <4 < < )c ) )rE   sc              #   r   #    [         R                  U 5         U v   S S S 5        g ! , (       d  f       g = f7frV   )r   
with_value)re  s    rB   local_settingsrh    s#     		$	$Q	' 
(	'	's   7&	7
47d   F2   Tr`      r   
hypothesisr  )r   r%   r   r&   r$   ci)Wre   
contextlibr   r=  r   collections.abcr   r   r   enumr   r   r   	functoolsr	   typingr
   r   r   r   r   hypothesis.errorsr   (hypothesis.internal.conjecture.providersr   hypothesis.internal.reflectionr   hypothesis.internal.validationr   r   hypothesis.utils.conventionsr   hypothesis.utils.deprecationr   !hypothesis.utils.dynamicvariablesr   r   r   __all__r   r(   rO   rg   rd  r*   rm   r|   r   r   r   r   r=   r   r   r  r   r   r<   r   r   r   r   r   r   r   r   r   r   r   r   contextmanagerrh  r-   r  rX  r   r   r   set	signaturer   
parametersvalueskind	ParameterKEYWORD_ONLYrI   )ps   0rB   <module>r     s      	 ; ; ' ' $  I J B 0 9 =3,CLd3i  I I  IX =$D =$ =$@Jh J f$/ f fROx!! O .2"$  #8J#78> C  x7G A c & 3 3   () DZ. D8E? Ds s & U;PSCS=T  !EkH...5!_!<	s 	s 	%4 %Df	) f	)R h 9XtT-A#B  
 <3' 	  )W -   i  # ##&//0 	  $ # ::$# ## <x001<<CCEEvv""/// AFFE    s   (K$K$