
    i#-                       % S SK r S SKrS SKrS SKrS SKJr  S SKJrJrJ	r	  S SK
JrJrJr  S SK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Jr  S S
KJrJrJrJr   S SK!J"r"  S SK#J$r$J%r%J&r&  S SK'J(r(J)r)J*r*J+r+J,r,  S SK-J.r.  S SK/J0r0J1r1J2r2J3r3  S SK4J5r5J6r6J7r7J8r8J9r9J:r:  S SK;J<r<J=r=J>r>J?r?J@r@JArA  S SKBJCrCJDrDJErE  S SKFJGrGJHrH  S SKIJJrJJKrKJLrL  S SKMJNrNJOrOJPrP  S SKQJRrRJSrSJTrT  S SKUJVrV  S SKWJXrX  S SKYJZrZJ[r[  S SK\J]r]J^r^J_r_  Sr`\a\bS'   Src\a\bS'   Srd\a\bS '   S!re\a\bS"'   S#rf\a\bS$'   \" 5       rgS% rh\" S&S'S(9 " S) S*5      5       riS+\jS,\jS-\k\a\a4   4S. jrl\l" S/S0S19u  rmrn " S2 S3\5      ro " S4 S5\p5      rqS6\rS-\P\s\P   -  4S7 jrt " S8 S9\15      ru\1" S:\j\v\u   \a\aS;.5      rw\1" S<\0\w   \0\w   \0\w   \0\r   \0\x\r\j4      \0\r   S=.5      ryS>\	\8\9-     S-\aS-  4S? jrz " S@ SA\>5      r{SB\<SC\|S-S4SD jr} " SE SF5      r~ " SG SH\p5      rg)I    N)defaultdict)Callable	GeneratorSequence)AbstractContextManagercontextmanagernullcontext)	dataclassfield)	timedelta)Enum)Random)LiteralNoReturncast)HealthCheckPhase	Verbositysettings)local_settings)ExampleDatabasechoices_from_byteschoices_to_bytes)BackendCannotProceedFlakyBackendFailureHypothesisExceptionInvalidArgumentStopTest)LRUReusedCache)NotRequired	TypedDictceiloverride)ChoiceConstraintsT
ChoiceKeyT
ChoiceNodeChoiceTChoiceTemplatechoices_key)ConjectureDataConjectureResultDataObserverOverrunStatus_Overrun)DataTreePreviouslyUnseenBehaviourTreeRecordingObserver)ensure_free_stackframes
startswith)NO_SCOREParetoFrontParetoOptimiser)AVAILABLE_PROVIDERSHypothesisProviderPrimitiveProvider)ShrinkerShrinkPredicateTsort_key)InterestingOrigin)fail_health_check)Observationwith_observability_callback)base_reportreportverbose_reporti  MAX_SHRINKSi,  MAX_SHRINKING_SECONDSi    BUFFER_SIZEi'  
CACHE_SIZE
   MIN_TEST_CALLSc                     [        U 5      U 4$ N)lenss    d/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/internal/conjecture/engine.pyshortlexrQ   o   s    FA;    TF)slotsfrozenc                       \ rS rSr% \" SS9r\\S'   \" SS9r\\S'   \" SS9r	\\S'   \" S S9r
\\\\   4   \S	'   \S
\4S j5       rS
\4S jrSrg)HealthCheckStates   r   )defaultvalid_examplesinvalid_examplesoverrun_examplesc                       [        [        5      $ rL   )r   list rR   rP   <lambda>HealthCheckState.<lambda>y   s	    D 1rR   )default_factory
draw_timesreturnc                 n    [         R                  " [        U R                  R	                  5       / S95      $ )N)start)mathfsumsumrb   valuesselfs    rP   total_draw_time HealthCheckState.total_draw_time|   s%    yyT__335R@AArR   c                    U R                   (       d  g[        S U R                    5       5      nSSSU 3 S3/n[        U R                   R                  5       S S9n[	        U5       GHC  u  nu  pVSUs=::  a  [        U R                   5      S	-
  :  aW  O  OT[        R                  " U5      S
-  U R                  :  a-  UR                  S[        U R                   5      U-
   S35          O[        U5      SS  Vs/ s H  owS:  d  M
  US S3PM     nnSR                  S/S-  U-   SS 5      R                  S5      n	UR                  S5      R                  S5      n
UR                  SU
SU 3 S[        U5      S S[        R                  " U5      U R                  -  S SU	 35        GMF     SR                  U5      $ s  snf )z2Return a terminal report describing what was slow. c              3   t   #    U  H.  n[        UR                  S 5      R                  S5      5      v   M0     g7f)	generate:: N)rM   removeprefixremovesuffix).0ks     rP   	<genexpr>1HealthCheckState.timing_report.<locals>.<genexpr>   s/      
IXAC{+88>??s   68z
  ^z0   count | fraction |    slowest draws (seconds)c                      [        U S   5      * $ N   )rh   kvs    rP   r_   0HealthCheckState.timing_report.<locals>.<lambda>   s    BqE
{rR   key         z  (skipped z rows of fast draws)NgMb@?z>6.3f, z    -- rq   rr   z  z | z>4z  | z>7.0%z  |  
)rb   maxsorteditems	enumeraterM   rf   rg   rl   appendjoinrstriprs   rt   )rk   widthoutargs_in_orderiargnametimestreprsdescargs              rP   timing_reportHealthCheckState.timing_report   s    
IM
 
 b5'	]"RSTt446<RS#,]#;A Q3#doo.23IIe$r)D,@,@@

[T__)=)A(BBVWX,25M"#,>K,>qd(]%y],>EK88i[1_u4bc:;BB3GD&&{3@@FCJJS5'	N#c%j_D99U#D$8$88?uTFL $<" yy~ Ls   ;	G
Gr^   N)__name__
__module____qualname____firstlineno__r   rY   int__annotations__rZ   r[   rb   r   strr]   floatpropertyrl   r   __static_attributes__r^   rR   rP   rV   rV   s   s}    *NC*!!,c,!!,c,0511JCe,-  B B Bs rR   rV   rcrc   c                     [         R                  " [         R                  " SU-
  5      [         R                  " SU -
  5      -  5      S-
  n[         R                  " SU -  5      nX#4$ r{   )rf   r"   log)r   r   baseper_ps       rP   _invalid_thresholdsr      sL    99TXXa!e_txxA67!;DIIa!eE;rR   g{Gz?gGz?)r   r   c                   F    \ rS rSrSrSrS\ S3rSrSr	Sr
S	\S
\4S jrSrg)
ExitReason   z&settings.max_examples={s.max_examples}zRsettings.max_examples={s.max_examples}, but < 1% of examples satisfied assumptionszshrunk example z timesznothing left to doztest was flakyzshrinking was very slowr   rc   c                 4    U R                   R                  US9$ )NrN   )valueformat)rk   r   s     rP   describeExitReason.describe   s    zz  8 ,,rR   r^   N)r   r   r   r   max_examplesmax_iterationsrE   max_shrinksfinishedflakyvery_slow_shrinkingSettingsr   r   r   r^   rR   rP   r   r      sD    ;L	5  $K=7K#HE3- -c -rR   r   c                       \ rS rSrSrg)RunIsComplete   r^   Nr   r   r   r   r   r^   rR   rP   r   r          rR   r   backendc                 F   [         U    n[        U[        5      (       a4  UR                  SS5      u  p#[	        [
        R                  " U5      U5      nUR                  S:X  a  U" S 5      $ UR                  S:X  a  U$ [        SUR                   SUR                   S35      e)N.r|   test_function	test_casezinvalid lifetime z for provider z/. Expected one of 'test_function', 'test_case'.)
r8   
isinstancer   rsplitgetattr	importlibimport_modulelifetimer   r   )r   provider_clsmodule_name
class_names       rP   _get_providerr      s    &w/L,$$"."5"5c1"=y66{CZP/D!!			+	- 5 56n\EZEZD[ \< <
 	
rR   c                   N    \ rS rSr% \\S'   \\S'   \\S'   \\S'   \\   \S'   Srg)		CallStats   statusruntimedrawtimegctimeeventsr^   N)	r   r   r   r   r   r   r   r]   r   r^   rR   rP   r   r      s     KNOMIrR   r   PhaseStatisticszduration-secondsz
test-caseszdistinct-failureszshrinks-successfulStatisticsDict)zgenerate-phasezreuse-phasezshrink-phasestopped-becausetargetsnodeidchoicesc                     SnU  H<  n[        U[        5      (       a  UR                  c    g XR                  -  nM7  US-  nM>     U$ )Nr   r|   )r   r(   count)r   r   choices      rP   choice_countr      sG    Efn--||#\\!EQJE  LrR   c                   ,    \ rS rSr\S\4S j5       rSrg)DiscardObserver   rc   c                     [         erL   )ContainsDiscardrj   s    rP   kill_branchDiscardObserver.kill_branch   s    rR   r^   N)r   r   r   r   r#   r   r   r   r^   rR   rP   r   r      s    X  rR   r   datafor_failurec                "   U R                    H  nU R                  R                  UR                  US9n[        [
        [        [        [        S.UR                     n[        U5      ULa;  [        SU SU R                  R                  R                   S[        U5       35      e[        [        UR                  R                  5        VVs0 s H  u  pVXPR                  R                  XaS9_M      snn5      nX2l        Xrl        M     g s  snnf )Nr   )stringr   integerbooleanbytesz	expected z from z, got )nodesproviderrealizer   r   r   r   boolr   typer   r   r   r$   constraintsr   )r   r   noder   expected_typerv   vr   s           rP   realize_choicesr      s    

%%djjk%J
 )) ;m+%M?&==((556fT%[MK 
  !,,2244DA ==(((DD4
 
&/ "s   %Dc                      \ rS rSrSSSSSS.S\\/S4   S\S-  S\S-  S\S-  S	\	S
\
\\	4   S-  SS4S jjr\S\	S\S   4S j5       r\S\	4S j5       rS\SS4S jrSNS jr\S\S   S\S   4S j5       r\S\	4S j5       rS\	4S jrS\SS4S jrS\\   S\\S4   4S jrS\SS4S jrSSS .S\\\ -     S!\	S"\\S#   -  S\!\"-  4S$ jjr#S\SS4S% jr$S\!SS4S& jr%S\\S4   4S' jr&S\SS4S( jr' SOS\\   S)\S-  SS4S* jjr(S\\   SS4S+ jr)S)\S-  S\S-  4S, jr*\S\S-  4S- j5       r+\S\S-  4S. j5       r,S/\SS4S0 jr-\S\	4S1 j5       r.S\\!-  SS4S2 jr/S\04S3 jr1SNS4 jr2\S\3S-  4S5 j5       r4S\	4S6 jr5SNS7 jr6S8\7SS4S9 jr8S\	4S: jr9SNS; jr:S\\!-  SS4S< jr;SNS= jr<SNS> jr=SNS? jr>SSS@.SA\\\ -     SB\?S-  SC\S-  S\4SD jjr@SNSE jrASNSF jrB  SPSG\\!-  SH\CS-  SI\\\!-  \/\	4   S-  S\\!-  4SJ jjrD  SPSG\\!-  SH\CS-  SI\\\!-  \/\	4   S-  S\E4SK jjrF SQSA\\G   S\H\\GS4      4SL jjrISMrJg)RConjectureRunneri  NF)r   randomdatabase_keyignore_limitsthread_overlapr   r   r   r   r   r  rc   c                   Xl         U=(       d
    [        5       U l        SU l        S U l        SU l        SU l        SU l        SU l        SU l	        U=(       d    [        [        R                  S5      5      U l        X@l        XPl        Uc  0 OUU l        SU l        0 U l        / U l        0 U l        S U l        S U l        [.        R0                  U l        [5        5       U l        S U l        [;        5       U l        [?        U R                  R@                  5      U l!        [E        S 5      U l#        0 U l$        S U l%        U R                  bV  U R                  RL                  b?  [O        U R                  5      U l%        U RJ                  RQ                  U RR                  5        [T        [V        [X        S4   [Z        [\        -  4   " [^        5      U l0        SU l1        S U l2        SU l3        SU l4        SU l5        S U l6        SU l7        g )Nr      z(not a phase)c                      [         $ rL   )r5   r^   rR   rP   r_   +ConjectureRunner.__init__.<locals>.<lambda>E  s    HrR   .F)8_test_functionr   r   shrinksfinish_shrinking_deadline
call_countmisaligned_countrY   rZ   r[   r   _randomgetrandbitsr   r   r   r  _current_phase
statisticsstats_per_test_caseinteresting_examplesfirst_bug_found_atlast_bug_found_atrf   inffirst_bug_found_timesetshrunk_exampleshealth_check_stater0   treer   r   r   r   best_observed_targets!best_examples_of_observed_targetspareto_frontdatabaser6   on_evicton_pareto_evictr   tupler%   r+   r/   rH   _ConjectureRunner__data_cache"reused_previously_shrunk_test_case+_ConjectureRunner__pending_call_explanation_backend_found_failure_backend_exceeded_deadline_backend_discard_count_verified_by_backend_switch_to_hypothesis_provider)rk   r   r   r   r   r   r  s          rP   __init__ConjectureRunner.__init__  s    AN"*"8hj7;& %&#$%&%&$Hw/B/B3/G(H*6#0$2$:b $3*,46 OQ!.2-1+/88!7:u;?&j	ERMM!!F
 ?J?
" OQ. 15(T]]-C-C-O +DKK 8D&&t';';< +*c/"$4x$??

 9>/6:',1#05'+,#04!49+rR   r   )NNNc              #   \   #    U R                   n Xl         S v   X l         g ! X l         f = f7frL   )r'  )rk   r   previouss      rP   #_with_switch_to_hypothesis_provider4ConjectureRunner._with_switch_to_hypothesis_providerd  s,      66	;27/2:/(/s   ,
! ,),c                 Z    U R                   R                  S:H  =(       d    U R                  $ )N
hypothesis)r   r   r'  rj   s    rP   using_hypothesis_backend)ConjectureRunner.using_hypothesis_backendo  s&     MM!!\1XT5X5X	
rR   explanationc                     Xl         g rL   r"  )rk   r2  s     rP   explain_next_call_as%ConjectureRunner.explain_next_call_asu  s    *5'rR   c                     S U l         g rL   r4  rj   s    rP   clear_call_explanation'ConjectureRunner.clear_call_explanationx  s
    *.'rR   phase)reusegenerateshrinkc              #     #    U R                   R                  5         [        R                  " 5       n Xl        S v   [        R                  " 5       U-
  [        U R                   5      [        U R                  5      U R                  S.U R                  US-   '   g ! [        R                  " 5       U-
  [        U R                   5      [        U R                  5      U R                  S.U R                  US-   '   f = f7f)Nr   z-phase)
r  cleartimeperf_counterr  r]   rM   r  r  r  )rk   r:  
start_times      rP   _log_phase_statistics&ConjectureRunner._log_phase_statistics{  s      	  &&(&&(
		"' %)$5$5$7*$D"4#;#;<%()B)B%C&*ll	1DOOEH,-$($5$5$7*$D"4#;#;<%()B)B%C&*ll	1DOOEH,-s   0C=
B AC=AC::C=c                 P    [         R                  U R                  R                  ;   $ rL   )r   targetr   phasesrj   s    rP   should_optimise ConjectureRunner.should_optimise  s    ||t}}3333rR   c                 T    U R                   R                  =(       a    U R                  $ rL   )r  is_exhaustedr0  rj   s    rP   __tree_is_exhausted$ConjectureRunner.__tree_is_exhausted  s    yy%%G$*G*GGrR   r   c                     [        5           U R                  U5        SSS5        g! [         a%  nUR                  UR                  :X  a   SnAN2e SnAff = f! , (       d  f       g= f)zRun ``self._test_function``, but convert a ``StopTest`` exception
into a normal return and avoid raising anything flaky for RecursionErrors.
N)r3   r  r   testcounter)rk   r   es      rP   __stoppable_test_function*ConjectureRunner.__stoppable_test_function  s\     %&##D) '&  	==D$4$44 
 	 '&s1   A'
AAAAAA
A'r   .c                     [        U5      $ rL   )r)   )rk   r   s     rP   
_cache_keyConjectureRunner._cache_key  s    7##rR   c                 v    UR                  5       nU R                  UR                  5      nX R                  U'   g rL   )	as_resultrT  r   r   )rk   r   resultr   s       rP   _cacheConjectureRunner._cache  s.    !oodll+!'#rR   r   )error_on_discardextendr[  r\  fullc                   [        S U 5       5      (       d^  [        [        [           U5      nU R	                  U5      n U R
                  U   nUS:X  d  UR                  [        R                  La  U$  US:X  a  SnO[        U5      =nc  SnOXs-   n[        5       nU(       a
  [        5       n U R                  XUS9n	U R                  R                  U	5        U	R!                  5         U R	                  U	R"                  5      nU	R                  [        R                  :  a   U R
                  U   $ [$        U R
                  U'   [$        $ ! [         a     Nf = f! [         a     Of = f U R
                  U   $ ! [         a     Of = f! [&         a     Of = fU R                  XS9n
U R)                  U
5        U
R+                  5       $ )a~  
If ``error_on_discard`` is set to True this will raise ``ContainsDiscard``
in preference to running the actual test function. This is to allow us
to skip test cases we expect to be redundant in some cases. Note that
it may be the case that we don't raise ``ContainsDiscard`` even if the
result has discards if we cannot determine from previous runs whether
it will have a discard.
c              3   B   #    U  H  n[        U[        5      v   M     g 7frL   )r   r(   )ru   r   s     rP   rw   8ConjectureRunner.cached_test_function.<locals>.<genexpr>  s     LG&:fn55Gs   r   r]  Nobservermax_choicesrc  )anyr   r   r'   rT  r   r   r.   OVERRUNKeyErrorr   r,   r   new_conjecture_datar  simulate_test_functionfreezer   r-   r1   r   rW  )rk   r   r[  r\  r   cached
max_lengthr   trial_observer
trial_datar   s              rP   cached_test_function%ConjectureRunner.cached_test_function  s   " LGLLL 8G,g6G//'*C**3/ Q;&--v~~"E!M #F
 VJ#G,,e5JJ /;n,.N	11j 2 J II,,Z8 //*"4"45C  6>>1,,S11 *1!!#&M  >   ((-- % ) 		* '''H4 ~~sH   3E 0+F %E 
EE
E*)E*.E= =
F
	F

FFc                   ^  T R                   b"  T R                  T R                   5        S T l         T =R                  S-  sl        SnS[        S[        SS 4U 4S jjnSn T R                  U5         U(       Gd^  UR                  b   eUR                  5         T R                  R                  S:w  a$   [        XR                  [        R                  L S	9  U(       d  UR                  R                  R!                  5       UR"                  UR$                  -
  [&        R(                  " UR*                  R-                  5       5      UR.                  UR0                  -
  [3        S
 UR4                  R7                  5        5       5      S.nT R8                  R;                  U5        T R=                  U5        UR>                  b  T =R@                  S-  sl         U(       a  g T RI                  U5        URJ                  (       aU  T RL                  bH  T RL                  RO                  URQ                  5       5      (       a  T RE                  URF                  SS9  UR                  [        RR                  :  Ga!  URJ                  R7                  5        GH  u  px[U        T RV                  U   U5      T RV                  U'   UT RX                  ;  a8  URQ                  5       n	[[        U	[\        5      (       a   eU	T RX                  U'   Mt  T RX                  U   n
U
RJ                  U   nX:  a  M  X:  d.  [_        UR`                  5      [_        U
R`                  5      :  d  M  URQ                  5       n	[[        U	[\        5      (       a   eU	T RX                  U'   GM     UR                  [        RR                  L a  T =Rb                  S-  sl1        UR                  [        Rd                  L a  T =Rf                  S-  sl3        UR                  [        Rh                  L a  T =Rj                  S-  sl5        UR                  [        R                  :X  Ga  T Rl                  (       Gd&  URn                  n[        Rp                  " URF                  5      nT Rs                  S5         T R                  U5        S S S 5        UR                  5         UR                  [        R                  :w  a  UR                  RR                  SUR                  Rd                  SUR                  Rh                  S0UR                     n[u        S[w        U5      Rx                   ST R                  R                  < SU S3U/5      eT R=                  U5        URz                  c   eURz                  nSn T R|                  U   n[_        UR`                  5      [_        UR`                  5      :  af  T =R~                  S-  sl?        T R                  URF                  5        T R                  R                  T R                  URF                  5      5        SnU(       a  T RE                  URF                  5        URQ                  5       T R|                  U'   T Rl                  (       d  ST lJ        T R                  R                  T R                  URF                  5      URQ                  5       5        T R                  R                  U5        T R~                  [        :  a  T R                  [        R                  5        T R                  (       dZ  T R                  bM  T R                  [        R                  " 5       :  a*  [        S5        T R                  [        R                  5        T R|                  (       d  T Rb                  T R                  R                  :  a  T R                  [        R                  5        T Rf                  T Rj                  -   [        [        T Rb                  -  -   :  a  T R                  [        R                  5        T R                  5       (       a  T R                  [        R                  5        T R                  U5        g ! [         a    Sne [         Ga  nU" XQ5        SnUR                  5          S nAU(       Gd  UR                  b   eUR                  5         T R                  R                  S:w  aF   [        XR                  [        R                  L S	9  O!! [         a  nU" XQ5        Sn S nAOS nAff = fU(       d  UR                  R                  R!                  5       UR"                  UR$                  -
  [&        R(                  " UR*                  R-                  5       5      UR.                  UR0                  -
  [3        S
 UR4                  R7                  5        5       5      S.nT R8                  R;                  U5        T R=                  U5        UR>                  b  T =R@                  S-  sl         g g g g S nAf[B         Ga    UR                  5         T R                  R                  S:w  Ga   [        USS	9  GO! [         Ga  nU" XQ5        Sn S nA U(       Gd  UR                  b   eUR                  5         T R                  R                  S:w  aF   [        XR                  [        R                  L S	9  O!! [         a  nU" XQ5        Sn S nAOS nAff = fU(       d  UR                  R                  R!                  5       UR"                  UR$                  -
  [&        R(                  " UR*                  R-                  5       5      UR.                  UR0                  -
  [3        S
 UR4                  R7                  5        5       5      S.nT R8                  R;                  U5        T R=                  U5        UR>                  b  T =R@                  S-  sl         g g g g S nAff = fT RE                  URF                  5        e f = f! [         a  nU" XQ5        Sn S nAGNS nAff = f! U(       Gd  UR                  b   eUR                  5         T R                  R                  S:w  aF   [        XR                  [        R                  L S	9  O!! [         a  nU" XQ5        Sn S nAOS nAff = fU(       d  UR                  R                  R!                  5       UR"                  UR$                  -
  [&        R(                  " UR*                  R-                  5       5      UR.                  UR0                  -
  [3        S
 UR4                  R7                  5        5       5      S.nT R8                  R;                  U5        T R=                  U5        UR>                  b  T =R@                  S-  sl         f f f f = f! , (       d  f       G	Ne= f! [         aO    SnT R                  T lE        T R                  c+  T R                  T lF        [        R                  " 5       T lI         GN2f = f)Nr|   Fexcr   rc   c                 p  > U R                   S;   a3  STl        U R                   S:X  a  TR                  R                  Tl        OU R                   S:X  a  T=R
                  S-  sl        TR
                  S:  a  TR
                  TR                  -  S:  az  [        STR                  R                  < S	TR
                   S
TR                   STR
                  TR                  -  S-  S STR                  R                  < 3
5        STl        T=R                  S-  sl        U R                   Ul	        g )N)verified	exhaustedTrt  discard_test_caser|   rI   g?zSwitching away from backend z$ to the Hypothesis backend, because z of z attempted test cases (d   z0.1fz%) were discarded by backend )
scoper'  r   r   r&  r%  r	  rD   rZ   cannot_proceed_scope)rr  r   rk   s     rP   _backend_cannot_proceed?ConjectureRunner.test_function.<locals>._backend_cannot_proceed  s    yy556:399
*040E0ED-11++q0+//"444tF#M"6t}}7L7L6O P##'#>#>"?tDOOCT U 77$//ICOPTU V559]]5J5J4MO ;?D7 !!Q&!(+		D%rR   Tr/  r   c              3   D   #    U  H  u  pUS :X  a  UOU SU 3v   M     g7f)ro   rr   Nr^   )ru   rv   r   s      rP   rw   1ConjectureRunner.test_function.<locals>.<genexpr>X  s.      )(; "#bA2aSk9(;s    )r   r   r   r   r      paretosub_keypassedzfailed filtersoverranz@Inconsistent results from replaying a failing test case! Raised z on backend=z, but z under backend='hypothesis'.ah  WARNING: Hypothesis has spent more than five minutes working to shrink a failing example, and stopped because it is making very slow progress.  When you re-run your tests, shrinking will resume and may take this long before aborting again.

PLEASE REPORT THIS if you can provide a reproducing example, so that we can improve shrinking performance for everyone.)^r"  debugr	  r   r*   *_ConjectureRunner__stoppable_test_functionKeyboardInterruptrj  ry  r   r   r   r   r.   INTERESTINGnamelowerfinish_timerB  rf   rg   rb   ri   gc_finish_timegc_start_timer   r   r   r  r   rY  misaligned_atr
  BaseExceptionsave_choicesr   
debug_datatarget_observationsr  addrW  VALIDr   r  r  r   r/   r=   r   rY   INVALIDrZ   rf  r[   r0  expected_exceptionfor_choicesr,  r   r   r   interesting_originr  r  downgrade_choicesr   unpinrT  rg  r  r  r@  	monotonicr  r#  pinr  discardrE   	exit_withr   r   r   r  rA  rC   r   r   INVALID_THRESHOLD_BASEINVALID_PER_VALIDr   $_ConjectureRunner__tree_is_exhaustedr   record_for_health_check)rk   r   interruptedrz  finally_early_returnrr  
call_statsrv   r   data_as_resultexisting_exampleexisting_scoreinitial_exceptiondesc_new_statusr   changedexistings   `                rP   r   ConjectureRunner.test_function  s   **6JJt667.2D+1	2%	2-;	2	2B  %9	3**404 00888==((L84' kkV=O=O.O ,"&++"2"2"8"8":#'#3#3doo#E$(IIdoo.D.D.F$G"&"5"58J8J"J"( )(,(9(9(;) #	-J ,,33J?KK%**6--2- $$!!-!!%%dnn&677dllI>;;&,,&0066803D4N4Nq4QST0U**1-DBBB%)^^%5N).(CCCC@ND::1=#'#I#I!#L !1!E!Ea!H%%$**)=$**A * &*^^%5N).(CCCC@ND::1=) 9, ;;&,,&1$;;&..(!!Q&!;;&..(!!Q&!;;&,,,000 %)$;$;!%11$,,? ==dC2248 D ;;&"4"44))8++-=++Y' kk	'#O
 .""&'8"9"B"B!C D##'==#8#8";6*++GI ++  D!**666))CG#44S9 DJJ'(8>>*BBLLA%L**8+;+;<%%++DOOH<L<L,MN"G!!$,,/151A))#.4426D/!!%%doodll&CT^^EUV$$,,S1||{*z556 ""..:..1B1B1DD - NN:99:((
 ""dmm&@&@@z667%%(=(==&):T=P=P)PP z889##%%NN:../$$T* ! 	K# 	#C.KKKM" 00888==((L84' kkV=O=O.O 0 4/:/3,4 ,"&++"2"2"8"8":#'#3#3doo#E$(IIdoo.D.D.F$G"&"5"58J8J"J"( )(,(9(9(;) #	-J ,,33J?KK%**6--2- 7 , !  	KKM}}$$4#Dd;+ +C6 #'K 00888==((L84' kkV=O=O.O 0 4/:/3,4 ,"&++"2"2"8"8":#'#3#3doo#E$(IIdoo.D.D.F$G"&"5"58J8J"J"( )(,(9(9(;) #	-J ,,33J?KK%**6--2- 7 ,  dll+	2 0 4/:/3,4 00888==((L84' kkV=O=O.O 0 4/:/3,4 ,"&++"2"2"8"8":#'#3#3doo#E$(IIdoo.D.D.F$G"&"5"58J8J"J"( )(,(9(9(;) #	-J ,,33J?KK%**6--2- 7 , j DC4  A)-&**2.2ooD+040@D-As   !b 5#q x#x qi6q< <#d   
d>*
d99d>9q 
j
qp7
p2!q%q< (#l 
l*
l%%l*2p77 qq< 
q9$
q44q9<Ax	?#s#"x	#
t-
s<7x	<tDx	
xAy76y7c                     U R                   R                  R                  U R                  [	        UR
                  5      5        g rL   )r   r  delete
pareto_keyr   r   )rk   r   s     rP   r   ConjectureRunner.on_pareto_evict  s*    %%doo7G7UVrR   c                 L    U R                   R                  U R                  5      $ )a(  Uses the tree to proactively generate a starting choice sequence
that we haven't explored yet for this test.

When this method is called, we assume that there must be at
least one novel prefix left to find. If there were not, then the
test run should have already stopped due to tree exhaustion.
)r  generate_novel_prefixr   rj   s    rP   r  &ConjectureRunner.generate_novel_prefix  s     yy..t{{;;rR   c           
      z   UR                   [        R                  :X  a  S U l        U R                  nUc  g UR                  R                  5        H#  u  p4UR                  U   R                  U5        M%     UR                   [        R                  :X  a  U=R                  S-  sl        OiUR                   [        R                  :X  a  U=R                  S-  sl
        O5UR                   [        R                  :X  d   eU=R                  S-  sl        SnSnSnUR                  U::  d   eUR                  U:X  a  S U l        g UR                  U:X  a@  [        U R                  SUR                   SUR                   S3[        R                   5        UR                  U:X  a@  [        U R                  SUR                   SUR                   S	3[        R"                  5        UR$                  nS
U R                  R&                  =(       d	    [)        SS9-  n	U[+        SU	R-                  5       5      :  Ga  U R.                  R1                  [2        R4                  " 5       S5      (       d  / n
UR                  (       a  U
R                  UR                   S35        UR                  (       a  U
R                  UR                   S35        SR7                  U
5      n
U
(       a  SU
 S3OSn
[        U R                  SUR                   SUS SU
 S3UR9                  5       -   S-   [        R:                  5        g g g )Nr|   rI   2   r   zKGenerated inputs routinely consumed more than the maximum allowed entropy: z+ inputs were generated successfully, while aW   inputs exceeded the maximum allowed entropy during generation.

Testing with inputs this large tends to be slow, and to produce failures that are both difficult to shrink and difficult to understand. Try decreasing the amount of data generated, for example by decreasing the minimum size of collection strategies like st.lists().

If you expect the average size of your input to be this large, you can disable this health check with @settings(suppress_health_check=[HealthCheck.data_too_large]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.z:It looks like this test is filtering out a lot of inputs. a   inputs were filtered out. 

An input might be filtered out by calls to assume(), strategy.filter(...), or occasionally by Hypothesis internals.

Applying this much filtering makes input generation slow, since Hypothesis must discard inputs which are filtered out and try generating it again. It is also possible that applying this much filtering will distort the domain and/or distribution of the test, leaving your testing less rigorous than expected.

If you expect this many inputs to be filtered out during generation, you can disable this health check with @settings(suppress_health_check=[HealthCheck.filter_too_much]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.r      )secondsg      ?Fz invalid inputsz2 inputs which exceeded the maximum allowed entropyz, and  ()ro   z4Input generation is slow: Hypothesis only generated z valid inputs after z.2fz secondsz.
aW  

This could be for a few reasons:
1. This strategy could be generating too much data per input. Try decreasing the amount of data generated, for example by decreasing the minimum size of collection strategies like st.lists().
2. Some other expensive computation could be running during input generation. For example, if @st.composite or st.data() is interspersed with an expensive computation, HealthCheck.too_slow is likely to trigger. If this computation is unrelated to input generation, move it elsewhere. Otherwise, try making it more efficient, or disable this health check if that is not possible.

If you expect input generation to take this long, you can disable this health check with @settings(suppress_health_check=[HealthCheck.too_slow]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.)r   r.   r  r  rb   r   r   r  rY   r  rZ   rf  r[   r?   r   r   data_too_largefilter_too_muchrl   deadliner   r   total_secondsr  get	threading	get_identr   r   too_slow)rk   r   staterv   r   max_valid_drawsmax_invalid_drawsmax_overrun_draws	draw_timedraw_time_limit	extra_strs              rP   r  (ConjectureRunner.record_for_health_check  s    ;;&,,,&*D#''=OO))+DAQ&&q) , ;;&,,&  A% [[FNN*""a'";;&..000""a'"##666?2&*D#!!%66$$)$8$8#9 :'','='=&> ?" **'* !!%66L''( )//0 1$ ++)2 ))	t}}55M19MNC!>!>!@AA ''++I,?,?,A5III%%  E$:$:#;?!KL%%  --. /. . !i0I-6"YKq)BIF''((<YsO L# % **,-00 $$5 J BrR   r  c                     U R                   R                  bE  U R                  U5      nUc  g U R                   R                  R                  U[	        U5      5        g g rL   )r   r  r  saver   )rk   r   r  r   s       rP   r  ConjectureRunner.save_choicesz  sO     ==!!-,,w'C{MM""''-=g-FG	 .rR   c                     [        U5      nU R                  R                  bJ  U R                  b<  U R                  R                  R	                  U R                  U R
                  U5        g g g rL   )r   r   r  r   movesecondary_key)rk   r   buffers      rP   r  "ConjectureRunner.downgrade_choices  sX    !'*==!!-$2C2C2OMM""''(9(94;M;MvV 3P-rR   c                 v    U R                   c  g Uc  U R                   $ SR                  U R                   U45      $ )N   .)r   r   )rk   r  s     rP   r  ConjectureRunner.sub_key  s<    $?$$$yy$++W566rR   c                 $    U R                  S5      $ )Ns	   secondaryr  rj   s    rP   r  ConjectureRunner.secondary_key  s    ||L))rR   c                 $    U R                  S5      $ )Nr~  r  rj   s    rP   r  ConjectureRunner.pareto_key  s    ||I&&rR   messagec                 l    U R                   R                  [        R                  :  a  [	        U5        g g rL   )r   	verbosityr   r  rB   )rk   r  s     rP   r  ConjectureRunner.debug  s%    ==""ioo5  6rR   c                 P    U R                   R                  [        R                  :  $ rL   )r   r  r   r  rj   s    rP   report_debug_info"ConjectureRunner.report_debug_info  s    }}&&)//99rR   c           	      @   U R                   (       d  g [        UR                  5      nUR                  [        R                  :X  a  U SUR
                  < S3nOlUR                  [        R                  :X  aN  [        U[        5      (       a9  [        U[        5      (       d   eU SUR                  R                  SS5       S3nSnU R                  [        UR                  5       SU SUR                   UR                  (       a  X1R                  -   OS 35        g )Nr  r  invalid because?z
	z choices -> ro   )r  reprr   r.   r  r  r  r   r*   r   r  r  rM   r   output)rk   r   r   newline_tabs       rP   r  ConjectureRunner.debug_data  s    %%dkk";;&,,,xr$"9"9!<A>F[[FNN*z$/O/OdN3333xr$++//2CS"I!J!LF

4<< !fXT$,,,0KK{[[(R@B	
rR   c                    ^  S[         SS 4U 4S jjnT R                  R                  S:w  aE  [        T R                  [
        5      (       a&  T R                  R                  (       a  [        U5      $ [        5       $ )Nobservationrc   c                    > U R                   S:X  d   e[        TR                  [        5      (       d   eTR                  (       d  TR                  R                  U 5        g g )Nr   )r   r   r   r:   r'  on_observation)r  rk   s    rP   r  =ConjectureRunner.observe_for_provider.<locals>.on_observation  sO    ##{222dmm->????66,,[9 7rR   r/  )	r@   r   r   r   r   r:   add_observability_callbackrA   r	   )rk   r  s   ` rP   observe_for_provider%ConjectureRunner.observe_for_provider  s^    	: 	: 	: MM!!\1 4==*;<<88.~>>}rR   c                    [        U R                  5         U R                  5           U R                  5         U R
                  R                  5        H  nU R                  U5        M     U R                  SU R                   SU R                   SU R                   S35        S S S 5        S S S 5        g ! [         a     Nf = f! , (       d  f       N'= f! , (       d  f       g = f)NzRun complete after z examples (z valid) and z shrinks)r   r   r  _runr   r  ri   r  r  r	  rY   r  )rk   r   s     rP   runConjectureRunner.run  s    DMM*D,E,E,G		 ..557" 8JJ%doo%6 7''(T\\N(L -H** !  -H,G**sE   CCB5A+C$C5
C?CCC
C	C
C$c                 J    U R                   c  g U R                  R                  $ rL   )r   r   r  rj   s    rP   r  ConjectureRunner.database  s!    $}}%%%rR   c                 z    U R                   S L=(       a'    [        R                  U R                  R                  ;   $ rL   )r  r   r;  r   rG  rj   s    rP   has_existing_examples&ConjectureRunner.has_existing_examples  s)    }}D(PU[[DMM<P<P-PPrR   c                    U R                  5       (       Ga0  U R                  S5        [        U R                  R                  R                  U R                  5      [        S9n[        R                  U R                  R                  ;   a  SOSn[        S[        X R                  R                  -  5      5      n[        U5      n[        U5      U:  a  [        U R                  R                  R                  U R                   5      5      nU[        U5      -
  n[        U5      U::  a  UnOU R"                  R%                  XV5      nUR'                  [        S9  UR)                  U5        SnSn	[+        U5       GHD  u  pX:  a
  U(       a    GO4[-        U5      nUc2  U R                  R                  R/                  U R                  U5        MU  U R1                  US	S
9nUR2                  [4        R6                  :w  ab  U R                  R                  R/                  U R                  U5        U R                  R                  R/                  U R                   U5        M  X:  a=  Sn[9        U[:        5      (       a   e[=        U5      [=        UR>                  5      :w  a  Sn	U R                  R@                  (       a  GME    O   U(       a  U	(       a  SU l!        U RD                  c   e[        U5      U:  GaO  U RF                  (       Gd<  U[        U5      -
  n[        U R                  R                  R                  U RH                  5      5      n[        U5      U:  a  U R"                  R%                  X5      nUR'                  [        S9  U H  n[-        U5      nUc2  U R                  R                  R/                  U RH                  U5        MC  U R1                  US	S
9nXRD                  ;  a0  U R                  R                  R/                  U RH                  U5        UR2                  [4        R6                  :X  d  M    g   gggg)a  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 lot we don't try all of them. We always try the
smallest example in the database (which is guaranteed to be the
last failure) and the largest (which is usually the seed example
which the last failure came from but we don't enforce that). We
then take a random sampling of the remainder and try those. Any
examples that are no longer interesting are cleared out.
zReusing examples from databaser   g?r|   r   FTNr]  )r\  )%r  r  r   r   r  fetchr   rQ   r   r<  rG  r   r"   r   rM   r]   r  r   samplesortr\  r   r   r  ro  r   r.   r  r   r/   r)   r   report_multiple_bugsr!  r  r  r  )rk   corpusfactordesired_sizeprimary_corpus_sizeextra_corpus	shortfallextrafound_interesting_in_primary%all_interesting_in_primary_were_exactr   r  r   r   desired_extrapareto_corpuss                   rP   reuse_existing_examples(ConjectureRunner.reuse_existing_examples  s`    %%''JJ78 &&,,T->->?XF #^^t}}/C/CCS!Fq$v0J0J'J"KLL"%f+6{\)#DMM$:$:$@$@ASAS$TU(3v;6	|$	1(E KK..|GE

x
(e$ ,1(481(0+0L,X6?MM**11$2C2CXN000H;;&"4"44MM**11$2C2CXNMM**11$2D2DhO.7;4#-dH#=#===&w/;t||3LLDIA====='  1( ,8>BD;
 $$000 6{\)$2K2K2K ,s6{ : $T]]%;%;%A%A$//%R S}%5$(KK$6$6}$TM""x"0 -H0:G..55dooxP 44WV4LD#4#44..55dooxP{{f&8&88 !. 3L)K (rR   reasonc                 2   U R                   (       a  g UR                  U R                  5      U R                  S'   U R                  (       a"  [        U R                  5      U R                  S'   U R                  SUR                   S35        Xl        [        e)Nr   r   z
exit_with(r  )
r   r   r   r  r  dictr  r  exit_reasonr   )rk   r	  s     rP   r  ConjectureRunner.exit_with<  sq    -3__T]]-K)*%%)-d.H.H)IDOOI&

Z}A./!rR   c                 0   [         [        U R                  -  -   nU R                  U R                  R                  :  d  U R
                  U R                  -   U:  a  gU R                  (       d  g[        R                  U R                  R                  ;  dA  U R                  R                  (       a&  [        R                  " 5       U R                  -
  S:  a  g[        U R                   ["        5      (       d   e[        U R$                  ["        5      (       d   eU R                   U R$                  s=::  a  U R&                  ::  d   e   eU R&                  [(        :  =(       d3    U R&                  [+        U R                   S-   U R$                  S-  5      :  $ )NFTrI   i  r   )r  r  rY   r   r   rZ   r[   r  r   r=  rG  r  r@  r  r  r   r  r   r  r	  rJ   min)rk   invalid_thresholds     rP   should_generate_more%ConjectureRunner.should_generate_moreF  sE    #%69L9L%LL 	 4==#=#==%%(=(==ARR
 ((
 LL 4 44==55~~$";";;b@$1137777$00#6666&&$*@*@SDOOSSSSS
 / 
4??S##d*D,B,BQ,FF
 4
 	
rR   c                 	   [         R                  U R                  R                  ;  a  g U R                  (       a  g U R                  S5        U R                  5       (       d   eSU l        U R                  [        SS S945      nUR                  [        R                  :  ag  [        U[        5      (       d   eUR                  cC  U R                   R#                  U R%                  UR&                  5      UR)                  5       5        UR                  [        R                  :X  dJ  UR                  [        R*                  :X  aQ  [        U[        5      (       a<  UR,                  S-  [.        :  a%  [1        U R                  S[2        R4                  5        [7        5       U l        Sn[;        U R                  R<                  S-  S	5      n[?        U R                  R<                  S-  US
-   S5      nSnSU l        U R                  5       (       Ga  U R@                  (       d$  U RC                  / 5      nU RE                  U5        MK  SU l#        U RI                  5       nU RJ                  U::  a  U RL                  SU-  ::  a  U R                  (       d  US:  a  U R                  U[        SS S94-   5      nUR                  [        R*                  :  a  US
-  nM  [        U[        5      (       d   eSn[O        UR&                  5      [O        U5      -
  n	[O        U5      U	S-  -   n
U RC                  XzS9n U RP                  RS                  U5        GMW  S n
U RC                  XzS9nU RE                  U5        UR                  [        R                  L a"  U
b  SUR\                  ;  a  SUR\                  S'   U R_                  U5        U RJ                  [?        X45      :  a   U(       d  SnSU l#        U Ra                  5         U R                  5       (       a  GM  g g ! [T         a     Of = f[        URV                  [X        5      (       d   eURV                  RZ                  (       a  GMk  U R                  5       (       d  g UR&                  nGN6)NzGenerating new examplesTsimplest)r   r   a  The smallest natural input for this test is very large. This makes it difficult for Hypothesis to generate good inputs, especially when trying to shrink failing inputs.

Consider reducing the amount of data generated by the strategy. Also consider introducing small alternative values for some strategies. For example, could you mark some arguments as optional by replacing `some_complex_strategy`with `st.none() | some_complex_strategy`?

If you are confident that the size of the smallest natural input to your test cannot be reduced, you can suppress this health check with @settings(suppress_health_check=[HealthCheck.large_base_example]). See https://hypothesis.readthedocs.io/en/latest/reference/api.html#hypothesis.HealthCheck for details.r   rI   r  r|   Fr<  r   rd  r  z@reduced max size for early examples (avoids flaky health checks)rF  )1r   r<  r   rG  r  r  r  r'  ro  r(   r   r.   rf  r   r+   ry  r   r  rT  r   rW  r  lengthrG   r?   r   large_base_examplerV   r  r  r   r   r0  rh  r   r  r  rY   r	  rM   r  ri  r1   rb  r2   killedr   generate_mutations_fromoptimise_targets)rk   	zero_data"consecutive_zero_extend_is_invalidsmall_example_capoptimise_atran_optimisationsr   prefixminimal_exampleminimal_extensionrl  rn  s               rP   generate_new_examples&ConjectureRunner.generate_new_examplesn  s   >>!5!55$$ 

,-((****.2+--~jPT/U.WX	fnn,i)9:::: --5!!%%OOI$5$56	8K8K8M v~~-,9&677  1${2  ..%* #3"4  ./*4   : :b @"E$--449;Lq;PRTU!.3+'')) 00//3""4(",D//1F##'88OOq+<'<<116:"&";";nZtDFF# #))FLL86!;6 "/3CDDDD562$'(?(?$@3v;$N! [+<q+@@
 "55f5U
II44Z@" "
++F+KDt$ v~~-*%T[[8 W -. ((. ##s+<'JJ)$(!&.#%%'o ''))V 1 
 "*"5"57LMMMM&&-- 0022#++s   4P 
P$#P$c                 
  ^ UR                   [        R                  :  GaL  U R                  Gc=  U R                  nSnU R                  5       (       Ga  U R                  US-   ::  Ga  US::  Ga  UR                  R                  nU(       d  g U R                  R                  U5      nU R                  R                  [        U5      S5      u  u  pgu  pXh:  a  X4Xg4su  pgu  pXhs=::  a  U	s=::  a  U::  a#  O  O UR                  S U UR                  US  -   n
OcU R                  R                  Xg4X4/5      u  pUR                  X nUR                  S U U-   UR                  Xx -   U-   UR                  U	S  -   n
 U R                  U
SS9mT[        L a  US-  nO[!        T["        5      (       d   eTR                   UR                   :  ac  [%        UR                  5      [%        TR                  5      :w  a7  ['        U4S jUR(                  R+                  5        5       5      (       a  TnSnOUS-  nU R                  5       (       a  U R                  US-   ::  a
  US::  a  GM  g g g g g g g g ! [         a
    US-  n GMD  f = f)Nr   r   r   T)r[  r|   c              3   x   >#    U  H/  u  pUTR                   ;   =(       a    TR                   U   U:  v   M1     g 7frL   )r  )ru   rv   r   new_datas      rP   rw   ;ConjectureRunner.generate_mutations_from.<locals>.<genexpr>  sG        )I !=!== E ( < <Q ?1 DE(Hs   7:)r   r.   r  r  r	  r  spansmutator_groupsr   r   r  r   r   ro  r   r-   r   r+   r)   allr  r   )rk   r   initial_callsfailed_mutationsgroupsgroupstart1end1start2end2attemptre   endreplacementr&  s                 @rP   r  (ConjectureRunner.generate_mutations_from-  s    KK6>>) ''/ OOM  ))++ OO}q'88$)22**62151C1CF5MST1U.?6<^f^2NVNV 444F #ll7F3dll676KKG!%!3!3f^f^4T!UJE"&,,u"9K Wf-%&,,t34 && ,,tu-	. 
#88 *.  9  H w&$)$%h0@AAAA 4;;6'5XEUEU9VV   )-(@(@(F(F(H     (+,((A-(I ))++ OO}q'88$) 9	 ,
 * 9	 , 0	 *t ' $)$s   =I. .JJc                    U R                   (       d  gSSKJn  Sn U R                  nSn[	        U R
                  R                  5       5       H0  u  pVU" XXRS9nUR                  5         UR                  S:  d  M.  SnM2     U R                  (       a  gUS-  nU(       a  M  U R                  (       a  U R                  5         X0R                  :X  a  gM  )	zHIf any target observations have been made, attempt to optimise them
all.Nr   )	OptimiserrI   TF)max_improvementsr   )rH  (hypothesis.internal.conjecture.optimiserr8  r	  r]   r  r   r  improvementsr  r  pareto_optimise)rk   r8  r9  
prev_callsany_improvementsrF  r   	optimisers           rP   r  !ConjectureRunner.optimise_targets  s     ##F J$ $T%K%K%Q%Q%S T%	 ))A-'+$ !U ((!))$$&__,3 rR   c                 R    U R                   b  [        U 5      R                  5         g g rL   )r  r7   r  rj   s    rP   r<   ConjectureRunner.pareto_optimise  s$    (D!%%' )rR   c                    SU l         U R                  S5         U R                  5         S S S 5        U R                  (       a  U R	                  [
        R                  5        SU l         U R                  S5         U R                  5         [        R                  U R                  R                  ;  a  SU l        U R                  5         S S S 5        SU l         U R                  S5         U R                  5         S S S 5        U R	                  [
        R                  5        g ! , (       d  f       N= f! , (       d  f       Np= f! , (       d  f       NP= f)NTr;  Fr<  rF  r=  )r'  rC  r  r!  r  r   r   r"  r   r<  r   rG  r  r  shrink_interesting_examplesrj   s    rP   r  ConjectureRunner._run  s    .2+''0((* 1
 22NN:../.3+''
3&&( ~~T]]%9%99&.#%%' 4 /3+''1,,. 2z**++ 10 43 21s$   D#:AD4*E#
D14
E
Era  r  rb  rc  c                    U R                   (       a  [        OU R                  nU=(       d    U R                  R	                  5       nU R
                  (       d
  [        5       n[        UUUUU R                  S9$ )N)r  rb  r   rc  r   )	r'  r9   r   r  new_observerr0  r,   r*   r   )rk   r  rb  rc  r   s        rP   rh  $ConjectureRunner.new_conjecture_data  sd     #'"E"E4== 	 7tyy557,,#~H#;;
 	
rR   c                   ^ ^ [         R                  T R                  R                  ;  d  T R                  (       d  gT R                  S5        [        R                  " 5       [        -   T l	        [        T R                  R                  5       S S9 H  nUR                  [        R                  :X  d   eT R                  UR                   5      nT R#                  U5        UR                  [        R                  :w  d  Mo  T R%                  [&        R(                  5        M     T R+                  5         [-        T R.                  5      [-        T R                  5      :  a  [1        U 4S jT R                  R3                  5        5       S S9u  mnT R                  ST< SUR                    35        T R                  R4                  (       d  T R                  US	 5        gS
[6        [8        -  S[:        4U4S jjnT R                  X45        T R.                  R=                  T5        [-        T R.                  5      [-        T R                  5      :  a  M  gg)zIf we've found interesting examples, try to replace each of them
with a minimal interesting example with the same interesting_origin.

We may find one or more examples with a new interesting_origin
during the shrink process. If so we shrink these too.
NzShrinking interesting examplesc                 ,    [        U R                  5      $ rL   )r=   r   ds    rP   r_   >ConjectureRunner.shrink_interesting_examples.<locals>.<lambda>5  s    hqww>OrR   r   c              3   R   >#    U  H  u  pUTR                   ;  d  M  X4v   M     g 7frL   )r  )ru   rv   r   rk   s      rP   rw   ?ConjectureRunner.shrink_interesting_examples.<locals>.<genexpr>A  s,       A 4 44 QF As   '
'c                 `    [        U S   R                  5      [        [        U S   5      5      4$ )Nr|   r   )r=   r   rQ   r  r}   s    rP   r_   rM  F  s#    A 5xRU7LMrR   z
Shrinking rr   c                 <    U R                   [        R                  :H  $ rL   )r   r.   r  rK  s    rP   r_   rM  M  s    qxx6;M;M/MrR   rL  rc   c                    > U R                   [        R                  :  a  g[        [        U 5      n U R
                  T:H  $ )NF)r   r.   r  r   r+   r  )rL  rF  s    rP   	predicate?ConjectureRunner.shrink_interesting_examples.<locals>.predicateP  s6    88f000 )1-++v55rR   )r   r=  r   rG  r  r  r@  rA  rF   r  r   ri   r   r.   r  rh  r   r   r  r   r   clear_secondary_keyrM   r  r  r   r  r+   r/   r   r  )rk   	prev_datar   examplerS  rF  s   `    @rP   rD  ,ConjectureRunner.shrink_interesting_examples'  s    <<t}}3334;T;T

34)-):):)<?T)T&%%,,.4O
I ##v'9'9999++I,=,=>Dt${{f000z//0
 	  "$&&'#d.G.G*HH! $ 9 9 ? ? A
 NOFG JJF:R/@AB==55 G%MN6-8 6T 6 KK+  $$V,3 $&&'#d.G.G*HHrR   c                    U R                  5       (       Ga+  [        U R                  R                  R	                  U R
                  5      [        S9nU H  n[        U5      nUc2  U R                  R                  R                  U R
                  U5        MC  U R                  R                  5        Vs1 s H  n[        UR                  5      iM     nn[        U5      [        [        [        U5      5      :  a    g U R                  U5        U R                  R                  R                  U R
                  U5        M     g g s  snf )Nr   )r  r   r   r  r  r  rQ   r   r  r  ri   r   r   r   mapro  )rk   r  r   r   r   primarys         rP   rU  $ConjectureRunner.clear_secondary_keyZ  s   %%'' &&,,T-?-?@hF ,Q/?MM**11$2D2DaH "66==?? %QYY/?   A;S7%;!<<))'2 &&--d.@.@!D!  ( s   3ErW  rS  allow_transitionc                 ^    U R                  XU5      nUR                  5         UR                  $ rL   )new_shrinkerr=  shrink_target)rk   rW  rS  r]  rO   s        rP   r=  ConjectureRunner.shrinkx  s*     g2BC	
rR   c           	          [        U UUU[        R                  U R                  R                  ;   U R
                  S:H  S9$ )NrF  )r]  explainin_target_phase)r;   r   rc  r   rG  r  )rk   rW  rS  r]  s       rP   r_  ConjectureRunner.new_shrinker  sA     -MMT]]%9%99 //8;
 	
rR   c                 J   ^ ^^ [        UUU 4S jT R                   5       5      $ )zReturn a collection of choice sequence nodes which cause the test to pass.
Optionally restrict this by a certain prefix, which is useful for explain mode.
c              3   
  >#    U  Hx  nTR                   U   =mR                  [        R                  L d  M1  [	        [        [        T5      R                  T5      (       d  M\  [        [        T5      R                  v   Mz     g 7frL   )r   r   r.   r  r4   r   r+   r   )ru   r   r  rX  rk   s     rP   rw   <ConjectureRunner.passing_choice_sequences.<locals>.<genexpr>  si      
(++C0088FLLH 1 4 0&9??H 1D!6*00(s   0B'B"!B)	frozensetr   )rk   r  rX  s   ``@rP   passing_choice_sequences)ConjectureRunner.passing_choice_sequences  s%      
((
 
 	
rR   )$__data_cache__pending_call_explanationr%  r$  r#  r  r'  r  r&  r  r  r	  r   r  r  r  r  r  r   r  rZ   r  r
  r[   r  r   r   r!  r   r  r  r  r  r  r  rY   )rc   NrL   )NN)r^   )Kr   r   r   r   r   r*   r   r   r   r   r  r   r(  r   r   r,  r   r0  r   r5  r8  r   rC  rH  r  r  r   r'   r  r%   rT  rY  r(   r+   r/   ro  r   r  r  r  r  r  r  r  r  r  r  r  r   r  r  r   r  r  r  r   r  r  r"  r  r  r<  r  r,   rh  rD  rU  r<   r=  r;   r_  r&   ri  rj  r   r^   rR   rP   r   r     s   
 %) $%)#15I: 0$ 67I: T/	I:
 I: dlI: I: S$Y$.I: 
I:V ;;	#	$; ; 
$ 
 

6 6 6/ :;	#	$   4 4 4HT Hn  .$(7"3 $j#o8N $(> (d ( "'()K 'N23K  	K 
 gfo%K  
H	$K Zl+. l+T l+\W$4 W W<uWc\': <~N ~t ~B CGH(H384<H	HW'): Wt W
7ut| 7 7 *ut| * * 'EDL ' '!S !T ! :4 : :
~0@@ 
T 
"&< ( &/D0 & &
Qt Q`D
 t &
d &
P}(~\.N=M,M \.RV \.|&P(,< )-"&
>12
 %	

 4Z
 

,1-fEB .2 
"22
 $d*

 n'77H$NORVV
 
*	*
 .2 
"22
 $d*

 n'77H$NORVV
 

$ .0
z*
	5S)	*
 
rR   r   c                       \ rS rSrSrg)r   i  r^   Nr   r^   rR   rP   r   r     r   rR   r   )r   rf   r  r@  collectionsr   collections.abcr   r   r   
contextlibr   r   r	   dataclassesr
   r   datetimer   enumr   r   r   typingr   r   r   r/  r   r   r   r   r   hypothesis._settingsr   hypothesis.databaser   r   r   hypothesis.errorsr   r   r   r   r   hypothesis.internal.cacher   hypothesis.internal.compatr    r!   r"   r#   %hypothesis.internal.conjecture.choicer$   r%   r&   r'   r(   r)   #hypothesis.internal.conjecture.datar*   r+   r,   r-   r.   r/   'hypothesis.internal.conjecture.datatreer0   r1   r2   )hypothesis.internal.conjecture.junkdrawerr3   r4   %hypothesis.internal.conjecture.paretor5   r6   r7   (hypothesis.internal.conjecture.providersr8   r9   r:   'hypothesis.internal.conjecture.shrinkerr;   r<   r=   hypothesis.internal.escalationr>   hypothesis.internal.healthcheckr?   !hypothesis.internal.observabilityr@   rA   hypothesis.reportingrB   rC   rD   rE   r   r   rF   rG   rH   rJ   r  rQ   rV   r   r  r   r  r  r   	Exceptionr   r   r   r   r   r]   r   r  r   r   r   r   r   r   r   r^   rR   rP   <module>r     sZ       # 9 9 J J (    * * J J / U U  5 M M   
 Y X 
 Y X < = V D D S  ! s   S 
C  
 ( e$& & %&Re  %S/  -@$$,O ) )- -	I 	
3 
#4t<M7N#N 
"	  !9o !	 %o6"?3#O4&s+tCJ/0c"
	(7^#;< 	t 	l '. '$ '4 '6H
 H
V,	i 	rR   