+
    Bi                     r   ^ RI t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
HtHt ^ RIHt ^ RIHt ^ RIHt  ! R R]4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t^ tR tR t ! R R]P2                  4      t ! R R]4      t ! R R4      tR.R lt]	R 4       t]RR3R ltRt ] R,           t!R t"R t#R t$R  t% ! R! R"]PL                  4      t' ! R# R$]'4      t( ! R% R&]'4      t) ! R' R(]'4      t* ! R) R*]'4      t+ ! R+ R,]PL                  4      t,]-R-8X  d   ]P\                  ! 4        R# R# )/    N)contextmanager)islicerepeat)import_helper)	os_helper)
patch_listc                       ] tR t^AtRtR# )BdbException N__name__
__module____qualname____firstlineno____static_attributes__r       $/usr/lib/python3.14/test/test_bdb.pyr
   r
   A   s    tr   r
   c                       ] tR t^BtRtR# )BdbErrorr   Nr   r   r   r   r   r   B   s    dr   r   c                       ] tR t^CtRtR# )BdbSyntaxErrorr   Nr   r   r   r   r   r   C   s    Dr   r   c                       ] tR t^DtRtR# )BdbNotExpectedErrorr   Nr   r   r   r   r   r   D   s    r   r   c                  B    \         P                  P                  4        R # N)_bdb
BreakpointclearBreakpointsr   r   r   reset_Breakpointr   L   s    OO$$&r   c                  <   \         P                  P                   U u. uF  q '       g   K  V NK  	  pp V'       g   R # RpV F  p V'       g   RpRpV P                  '       d   RMRpV P                  '       d   RMRpXRV P
                  WEV P                  V P                  \        P                  P                  V P                  4      V P                  3,          ,          pV P                  '       d   VR	V P                  : 2,          pVR
,          pK  	  X# u up i ) Fz!BpNum Temp Enb Hits Ignore Where
Tzyes zno  yeszno z%-5d %s %s %-4d %-6d at %s:%dz
	stop only if 
)r   r   
bpbynumber	temporaryenablednumberhitsignoreospathbasenamefilelinecond)bpbp_listheader_addedinfodispenabs         r   info_breakpointsr6   O   s    !__77>7r2rr7G>L7DLv6


u0YYBGGRYYWW%%bgg.99 	: 777RWW66D  K% ?s
   	DDc                   r   a a ] tR t^dt oV 3R ltRV 3R lltV 3R ltR tR tR t	R t
R tR	 tR
tVtV ;t# )Bdbc                2   < R V n         \        SV `	  WV4      # r   )	currentbpsupertrace_dispatch)selfframeeventarg	__class__s   &&&&r   r<   Bdb.trace_dispatchg   s    w%eC88r   c                  < \        V\        4      '       dw   V\        8X  d   \        4       pM%\        P
                  ! VR R 4      pVP                  p\        WV4      pVP                  p	V	P                  pV	P                  pV	P                  p\        SV `5  WVWER7      p
\        V
\        4      '       d   \        V
4      hV
# )N)r%   r/   funcname)
isinstancestr__file__globals	importlibimport_module__dict__eval__code__co_filenameco_firstlinenoco_namer;   	set_breakr   )r=   filenamelinenor%   r/   rD   globals_modulefunccoderesrA   s   &&&&&&     r   rR   Bdb.set_breakk   s    h$$8#"9"00#2?!??+D==D''H((F||HgI&*   ?c33-
r   c                   < \         SV `  W4      w  V n        V n        V P                  V P                  ,          ^ ,          V n        V P                  V P                  3# )r   )r;   	get_stackstackindexr>   )r=   ftrA   s   &&&r   r\   Bdb.get_stack   sG    !&!21!8
DJZZ

+A.
zz4::%%r   c                Z    V P                  V4      pV;P                  ^,          un        R#    N)get_bpbynumberr)   r=   bpnumr0   s   && r   
set_ignoreBdb.set_ignore   s      '
		Q	r   c                6    V P                  V4      pR Vn        R# )TNre   r&   rf   s   && r   
set_enableBdb.set_enable   s      '
r   c                6    V P                  V4      pR Vn        R# )FNrk   rf   s   && r   set_disableBdb.set_disable   s      '
r   c                N    V P                  W4      pV'       d   \        V4      hR # r   )clear_breakr   )r=   fnamerT   errs   &&& r   	set_clearBdb.set_clear   s$    u-3- r   c                    V P                   '       g   \        R 4      hV ;P                   ^,          un         V P                  V P                   ,          ^ ,          V n        R# )zOldest frameN)r^   r   r]   r>   r=   s   &r   set_up
Bdb.set_up   s<    zzz>**

a
ZZ

+A.
r   c                    V P                   ^,           \        V P                  4      8X  d   \        R4      hV ;P                   ^,          un         V P                  V P                   ,          ^ ,          V n        R# )rd   zNewest frameN)r^   lenr]   r   r>   rx   s   &r   set_downBdb.set_down   sK    ::>S_,>**

a
ZZ

+A.
r   )r:   r>   r^   r]   )FNN)r   r   r   r   r<   rR   r\   rh   rl   ro   ru   ry   r}   r   __classdictcell____classcell__rA   __classdict__s   @@r   r8   r8   d   s7     9(&

 
// /r   r8   c                      a a ] tR t^t oRV 3R lltR tV 3R ltR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tRR ltR tR tRtVtV ;t# )Tracerc                   < \         SV `  VR 7       Wn        W0n        Ve
   RV,          MRV n        V P                  4        R# )skipNzDry-run results for %s:)r;   __init__
expect_setdry_runheader	init_test)r=   r   r   r   	test_caserA   s   &&&&&r   r   Tracer.__init__   sA    d#$ , 19<26 	r   c                    R V n         ^ V n        R V n        \        \	        V P
                  ^ R ^4      4      V n        \        \	        V P
                  ^R ^4      4      V n        R # r   )
cur_exceptexpect_set_nobreakpoint_hitslistr   r   expected_listset_listrx   s   &r   r   Tracer.init_test   sP    #!&!T1"EFVDOOQa@Ar   c                   < V P                   e   V P                   hVR8X  d    \        SV `	  WV4      pV# \        SV `	  WV4      #   \         d   pYPn         T P                  u R p?# R p?ii ; i)N	exception)r   r;   r<   r
   )r=   r>   r?   r@   rY   erA   s   &&&&  r   r<   Tracer.trace_dispatch   ss    
 ??&//!K+g,U3?

 7)%<<	   +"#***+s   A A-A("A-(A-c                |    V P                  V4      '       g   R # V P                  RW4       V P                  4        R # )Ncall)	stop_hereprocess_eventnext_set_method)r=   r>   argument_lists   &&&r   	user_callTracer.user_call   s2     ~~e$$658r   c                F   V P                  R V4       V P                  '       dV   V P                  '       dD   \        4       P	                  R4      pVP                  R4       F  p\        RV,           4       K  	  V P                  4        RV n        V P                  4        R# )r.   r#   z  N)	r   r   r   r6   stripsplitprintdelete_temporariesr   )r=   r>   r3   r.   s   &&  r   	user_lineTracer.user_line   sx    65)<<<D000#%++D1D

4(dTk" )!#r   c                J    V P                  R W4       V P                  4        R# )returnNr   r   )r=   r>   return_values   &&&r   user_returnTracer.user_return   s    8U9r   c                V    W n         V P                  R V4       V P                  4        R# )r   N)exc_infor   r   )r=   r>   r   s   &&&r   user_exceptionTracer.user_exception   s#     ;.r   c                J    V P                  R V4       V P                  4        R# )opcodeNr   )r=   r>   s   &&r   user_opcodeTracer.user_opcode   s    8U+r   c                0    V P                   .pW"3V n        R # r   )r:   r   )r=   r@   r1   s   && r   do_clearTracer.do_clear   s    >>" '1r   c                    V P                   '       d.   V P                   ^,           F  pV P                  V4       K  	  R# R# rc   )r   clear_bpbynumber)r=   ns   & r   r   Tracer.delete_temporaries   s9    ))!,,%%a( -  r   c                   V ;P                   ^,          un          V P                  P                  ^ 4      V n        T P                  P                  ^ 4      T n        R#   \         d    \        RT P                   ,          4      hi ; i)rd   z-expect_set list exhausted, cannot pop item %dN)r   r   popexpect
IndexErrorr   r   	set_tuplerx   s   &r   pop_nextTracer.pop_next   sw    a	$,,003DK
 **1-	  	$%?""#$ $	$s    A (Bc           	     |   R pVR8X  d   V P                   ^,          pV P                  W$4       V P                  e)   V P                  '       g   V P                  .pV. 3V n        Wn        V P                  4        V P                  '       d   V P                  V P                  4       R # V P                  '       d5   V P                  V P                  ^ ,          VR4       V P                  4        VR	9   d   V P                  ^4       R # \        V P                  4      ^8  Ed   VR8X  Ed   V P                  ^,          w  rg\        VP                  4       4      pV P                  '       g#   V P!                  RV P"                  ,          4       V P                  WP                  ^ ,          R4       T P                  V U	u. uF  qV	,          NK  	  up	V P                  ^ ,           U	u. uF  p	V P%                  V	4      P&                  NK   	  up	R4       V P                  \        V4      V P                  ^,          R4       R # VR8X  dg   \)        V P                   ^,          V P                  ^,          4      '       g1   V P!                  RV P"                  V P                   3,          4       R # R # R # R # u up	i u up	i )
Nr   zWrong event typer.   z(No breakpoints hit at expect_set item %dzBreakpoint numbers do not matchzWrong breakpoint hit countzWrong temporary breakpointsz/Wrong exception at expect_set item %d, got '%s')r   r   )r   r\   r:   r   r?   r   r   print_stater   r   check_equalcheck_lno_namecheck_expect_max_sizer|   sortedkeysraise_not_expectedr   re   r(   rF   )
r=   r?   r>   argstbr1   bpstemporariesbpnumsr   s
   &&&*      r   r   Tracer.process_event   sB    Kq!Bu! >>%d.B.B.B~~&G$+R=D  
<<<T[[) ;;;T[[^U4FG!&&&&q)!#';;q> 
++++++B**+,   )=)=a)@57  &!9&Qa&&&!9!11!464 ((+004602   !4d6J6J16M13 +%!$--"2DKKNCC++I++T]];<= D &# " ":6s    J4($J9
c                ^    W8X  d   R # V P                  RW0P                  V3,          4       R # )Nz"%s at expect_set item %d, got '%s')r   r   )r=   expectedresultmsgs   &&&&r   r   Tracer.check_equal1  s1     D!$&8&8& A!B 	Cr   c                <   \        V P                  4      pV^8  d5   V P                  4       pV P                  V P                  ^,          VR4       V^8  dE   V P                  V P                  ^,          V P                  P
                  P                  R4       R# R# )rd   zWrong line numberzWrong function nameN)r|   r   lno_abs2relr   r>   f_coderQ   )r=   srT   s   &  r   r   Tracer.check_lno_name7  sz    q5%%'FT[[^V5HIq5T[[^TZZ->->-F-F0EG r   c                    \        V P                  4      V8  d(   \        R V P                  : RV P                  : 24      hR# )zInvalid size of the z expect tuple: N)r|   r   r   r?   )r=   sizes   &&r   r   Tracer.check_expect_max_sizeA  s7    t{{d" "&**dkk"; < < #r   c                   V P                  V P                  P                  P                  4      pV P                  P                  pWP                  \
        4      8X  d.   W P                  P                  P                  ,
          ^,           # T# rd   )canonicr>   r   rO   f_linenorH   rP   r=   rs   rT   s   &  r   r   Tracer.lno_abs2relF  sh    TZZ..::;$$X.. **++:::Q> 	<4:	<r   c                    V'       dX   V P                  V4      V P                  \        4      8X  d/   V P                  P                  P                  V,           ^,
          # T# r   )r   rH   r>   r   rP   r   s   &&&r   lno_rel2absTracer.lno_rel2absL  sJ    4<<.$,,x2HH 

!!0069A= 		r   c                   V P                  4       pV P                  P                  P                  pR V P                  W3,          pV P
                  '       d   RpV P
                  ^ ,           F;  pVR8w  d
   VR,          pWE: RV P                  V4      P                  : 2,          pK=  	  VR,          pRV,           R,           \        V P
                  ^,          4      ,           R,           pVRV,           ,          pM<V P                  R8X  d,   VRV P                  ^ ,          P                  ,           ,          pVR,          pVP                  ^ 4      \        V P                  4      ,           R	,           # )
z('%s', %d, '%s'{z, z: }()r   z), ,)r   r>   r   rQ   r?   r   re   r(   rG   r   r   ljustr   )r=   rT   rQ   stater   r   s   &     r   	get_stateTracer.get_stateQ  s&   !!#**##++!TZZ$AAC))!,,#:4KC1d&9&9!&<&A&ABB - 3JC)d"S)=)=a)@%AACGCTCZEZZ;&TDMM!,5555E{{2T^^!44s::r   c                    Ve'   V P                   ^8X  d   \        4        \        V4       \        RV P                   V P                  4       3,          4       R # )Nz%d: %s)r   r   r   )r=   r   s   &&r   r   Tracer.print_statec  s@    $"4"4"9G&Mh$,,dnn.>??@r   c                    VR ,          pVR\        V P                  4      ,          ,          pVRV P                  4       ,           ,          p\        V4      h)r#   z  Expected: %s
z  Got:      )rG   r   r   r   r=   r   s   &&r   r   Tracer.raise_not_expectedi  sE    t!C$444~ 000!#&&r   c                   V P                   ^ ,          p\        V P                   4      ^8X  d   V P                   ^,          MRp\        V RV,           4      pVR9   d
   V! 4        R# VR9   d   V! V P                  4       R# VR8X  dW   RpV'       d8   V P	                  V P                  P
                  P                  V^ ,          4      pV! V P                  V4       R# V'       d   VR9   g   VR9   d   VR	9   d1   VvrTpV P	                  WT4      pWT.pVP                  V4       V! V!   MVR
9   d   V! V!   MVR9   d   V! 4        RV n        V P                  4        V P                  '       d   V P                  4        M3V P                  '       d   V P                  4        V P                  ^4       V P                  4        R# \!        RV P                   ,          4      h)r   Nset_untilz"%s" is an invalid set_tuple)step	stepinstrcontinuequit)nextr   )breakclearr)   enabledisable)updown)r  r  )r)   r  r  )r   r|   getattrr>   r   r   rO   extendr?   r   r   r   r   r   r   r   r   )r=   set_typer   
set_methodrT   rs   remains   &      r   r   Tracer.next_set_methodo  s   >>!$$'$71$<t~~a $T6H#45
 @@L++tzz" F))$***;*;*G*G*.q'3tzz6* X "/ /3;~3M--)-&))%8F#D!<<D!^+ DJMMO|||  ";;;'')**1-  " !?!%"0 1 1r   )r   r   r   r?   r   r   r   r   r   r   r   r   )NFNr   )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   r   s   @@r   r   r      sx     B=$
2
)
.0=dCG<
<
;$A'01 01r   r   c                   :   a  ] tR tRt o RR ltR tRR ltRtV tR# )		TracerRuni  Nc                    Wn         VP                  V n        \        VP                  VV P                  VP	                  4       R 7      V n        RV n        R# ))r   r   r   N)r   r   r   r   idtracer_original_tracer)r=   r   r   s   &&&r   r   TracerRun.__init__  sB    " ((Y11%)\\Y\\^M $r   c                b    \        4        \        P                  ! 4       V n        V P                  # r   )r   sysgettracer  r  rx   s   &r   	__enter__TracerRun.__enter__  s      #{{r   c                   \        4        \        P                  ! V P                  4       R pV P                  P
                  '       dT   VR,          pVRV P                  P                  ,          ,          pV\        V P                  P
                  4      ,          pVe   \        \        V4      '       d   \        V\        4      '       dy   VP                  '       dg   VP                  ^ ,          pV'       d   VRV,           ,          pV P                  '       d   \        V4       R# V P                  P!                  V4        V'       d=   V P                  '       d   \        V4       R# V P                  P!                  V4       R# R# )r!   z+All paired tuples have not been processed, zthe last one was number %d
Nr#   T)r   r  settracer  r  r   r   repr
issubclassr   rF   BaseExceptionr   r   r   r   fail)r=   type_value	traceback	not_emptyerr_msgs   &&&&  r   __exit__TracerRun.__exit__  s   T**+	;;FFI8++334 5Idkk2233I ,?!G!G%//EJJJ**Q-ti//G<<<'NNN''0 |||i ##I.	 r   )r  r   r   r  r   )NNN)	r   r   r   r   r   r  r$  r   r   r   s   @r   r  r    s     %/ /r   r  c           	         R  pRR.pVP                  V4       \        4       pRVn        R Vn        \	        V! \        R4      \        V4      4      4      Vn        \        V 4      ;_uu_ 4        \        WRR7      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)c              3   r   "     \        V 4      p\        V4      pVx  Vx  K!    \         d     R# i ; i5irc   )r   StopIteration)abxys   &&  r   genrun_test.<locals>.gen  s:     	GG 		s   7!% 4747Tc                      R # r   r   r   r   r   <lambda>run_test.<locals>.<lambda>  s    tr   r   Nr   r   r   )r  BaseTestCaser   r  r   r   iterr   create_modulesr  runcalltfunc_import)modulesr   r   r.  sltestr  s   &&&    r   run_testr=    s    f j	!BIIh>DDLDG3vbz4845DO		 	 t''6NN<( ( 
!	 '' 
!	 	 s$   .B>B+	B>+B;6B>>C	c              #   $  "   \         P                  ! 4       ;_uu_ 4        \        P                  P	                  \
        P                  ! 4       4        V  Fl  pVR ,           p\        VRRR7      ;_uu_ 4       pVP                  \        P                  ! W,          4      4       RRR4       \        P                  ! V4       Kn  	  \        P                  ! 4        Rx  V  F  p\        P                   ! V4       K  	  \        P                  P#                  4         RRR4       R#   + '       g   i     L; i  T  F  p\        P                   ! T4       K  	  \        P                  P#                  4        i ; i  + '       g   i     R# ; i5i).pywzutf-8)encodingN)r   temp_cwdr  r+   appendr*   getcwdopenwritetextwrapdedent	linecache
checkcacherJ   invalidate_cachesr   forgetr   )r:  mrs   r_   s   &   r   r7  r7    s     							$	E	%w771GGHOOGJ78 8$$U+	 
 '')$$Q' HHLLN 
	
 87 $$Q' HHLLN 
		sL   F3E<$D:8,D'$;D:=E<
F'D72D::?E99E<<F		FFc                     R VRW#V 33# )r  Nr   )rD   rs   r%   r/   s   &&&&r   break_in_funcrO  +  s    UD)8<<<r   test_module_for_bdbr?  c                  .    ^ RI p V P                  4        R# )r   N)rP  main)rP  s    r   r9  r9  0  s    r   c                  >    ^p \        4        \        4        ^p ^p ^p R#    N)tfunc_firsttfunc_secondlnos    r   
tfunc_mainrZ  4  s     
CMN
C
C
Cr   c                      ^p ^p ^p R# rT  r   rX  s    r   rV  rV  <  s    
C
C
Cr   c                  
    ^p R# rT  r   rX  s    r   rW  rW  A  s    
Cr   c                   .   a  ] tR tRt o ]tRR ltRtV tR# )r5  iD  Nc                &    V P                  V4      R hr   )failureExceptionr   s   &&r   r  BaseTestCase.failI  s     ##C(d2r   r   r   )r   r   r   r   r   r  r   r   r&  s   @r   r5  r5  D  s      G3 3r   r5  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR t]! ]P$                  4      R 4       tR tR tR tRtV tR# )StateTestCaseiN  c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)r.   rU  rZ  r4  r.      rZ  r4  r   rd   rV  r4  r.   rU  rV  r   r   r  r8  rZ  r=   r  s   & r   	test_stepStateTestCase.test_stepQ  0    
 t__NN:& ___	   =A	c                V   R F{  pV P                  VR7      ;_uu_ 4        RRR	RR
R\        ^33RRR^R^^/. 33V3RR.V n        \        V 4      ;_uu_ 4       pVP	                  \
        4       RRR4       RRR4       K}  	  R#   + '       g   i     L; i  + '       g   i     K  ; i)r   r	  r.   rV  r  N)r   r   rd  r4  re  rg  )Nonerd   rV  r   r.      rV  ri  )subTestrH   r   r  r8  rZ  )r=   r	  r  s   &  r    test_step_next_on_last_statement.StateTestCase.test_step_next_on_last_statement[  s    (Hx00-Z-Z.gRS}=U.^Q1r{;h\.Z# t__NN:. % 10 ) %_ 100s#   8BB.BBBB(c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)rd  )r   )r   rU  rZ  r3  re  ri  rj  rk  s   & r   test_stepinstrStateTestCase.test_stepinstri  s0    

 t__NN:& ___ro  c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)
rd  r4  re  r3  r.   ru  rZ  r4  )r   rd   rW  r4  )r.   rU  rW  ri  rj  rk  s   & r   	test_nextStateTestCase.test_nextr  0    
 t__NN:& ___ro  c           	        R p\         V/p\        V4      ;_uu_ 4        . ROV n        \        V 4      ;_uu_ 4       pVP	                  \
        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)9
            def main():
                lno = 3
        N)r.   rU  r9  r3  r.   rf  r9  ri  )TEST_MODULEr7  r   r  r8  r9  r=   rX   r:  r  s   &   r   test_next_over_import#StateTestCase.test_next_over_import}  sc      'G$$DO 4F|, ! %$
 ! %$$s"   A6A#	A6#A3.A66B	c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)rd  r4  re  r4  rg  r3  rh  ri  rj  rk  s   & r   test_next_on_plain_statement*StateTestCase.test_next_on_plain_statement  s0    
 t__NN:& ___ro  c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)
rd  r4  re  r4  rg  r  rr  rf  rZ  r3  r}  ri  rj  rk  s   & r   test_next_in_caller_frame'StateTestCase.test_next_in_caller_frame  s0    
 t__NN:& ___ro  c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)rd  r4  re  r4  rg  r4  rh  r   r   ru  rV  r4  r}  ri  rj  rk  s   & r   test_returnStateTestCase.test_return  s0    
 t__NN:& ___ro  c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)
rd  r4  re  r4  rg  r  r  r  )r      rZ  ri  rj  rk  s   & r   test_return_in_caller_frame)StateTestCase.test_return_in_caller_frame  r  ro  c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)
rd  r4  re  r4  rg  r4  rh  )r   )ru  rt  ri  rj  rk  s   & r   
test_untilStateTestCase.test_until  r  ro  c           	         R\        R4      RRR ^R^^/. 33RRR.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)	r.   rV  Nrd  )rr  rU  rZ  rs  )r   )i'  r  ri  )rO  r   r  r8  rZ  rk  s   & r   test_until_with_too_large_count-StateTestCase.test_until_with_too_large_count  s[    %]=5Q%^Q1r{35H(Z	
 t__NN:& ___s   AA%	c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)
rd  r4  re  r4  rg  r  r  )r   )   )r.   r  rZ  ri  rj  rk  s   & r   test_until_in_caller_frame(StateTestCase.test_until_in_caller_frame  r  ro  c           	     z   R  \         P                   4       \         P                  R&   Rp\        V/p\        V4      ;_uu_ 4        . ROV n        RRR\        3p\        WR7      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)	c              3   l   "   T F*  pVP                   P                  R 4      '       g   K&  Vx  K,  	  R# 5i)_frozen_importlibN)r   
startswith).0items   & r   	<genexpr>*StateTestCase.test_skip.<locals>.<genexpr>  s,      
%))*=> D%s   #4
4:NNNr  z
importlib*	zipimportzencodings.*r   N)r  r4  r  ri  )r  	meta_pathr  r7  r   r  r8  r9  )r=   rX   r:  r   r  s   &    r   	test_skipStateTestCase.test_skip  s    

a  'G$$DO !+}kJD4++v|, , %$ ,+ %$$s$   (B).B	B)B&!B))B:	c                b    \        R .R7      pV P                  VP                  R4      R4       R# )z	anything*r   NF)r8   assertIsis_skipped_module)r=   bdbs   & r   test_skip_with_no_name_module+StateTestCase.test_skip_with_no_name_module  s)     }%c++D159r   c                    RR.V n         \        V 4      ;_uu_ 4       pV P                  \        VP                  \
        4       RRR4       R#   + '       g   i     R# ; i)r.   Nrd  )r  )r   r  assertRaisesr   r8  rZ  rk  s   & r   	test_downStateTestCase.test_down  sA     &z
 t__h
C ___   &AA	c                    . ROV n         \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   N)rd  r4  re  r4  rg  r  r  ri  rj  rk  s   & r   test_upStateTestCase.test_up  rn  ro  r   N)r   r   r   r   rl  rw  rz  r~  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r   r   r&  s   @r   rb  rb  N  ss     '/'	'-
''
'	'	''	' - -2:D' 'r   rb  c                   b   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tRtV tR# )BreakpointTestCasei  c                    RR.V n         \        V 4      ;_uu_ 4       pV P                  \        VP                  \
        4       RRR4       R#   + '       g   i     R# ; i)r.   Nr  )r  )z/non/existent/module.pyrd   )r   r  r  r   r8  r9  rk  s   & r   test_bp_on_non_existent_module1BreakpointTestCase.test_bp_on_non_existent_module  s@    ')R
 t__hE ___r  c           	     D   R p\         V/p\        V4      ;_uu_ 4        RR\        ^33.V n        \	        V 4      ;_uu_ 4       pV P                  \        VP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  r  Nr  )	r  r7  TEST_MODULE_FNAMEr   r  r  r   r8  r9  r  s   &   r   test_bp_after_last_statement/BreakpointTestCase.test_bp_after_last_statement  s}      'G$$+g8I17M-NDO 4F!!(FNNLI !	 %$ !	 %$$s#   %B&A;	)B;BBB	c                   R p\         V/p\        V4      ;_uu_ 4        R\        R\        R4      R\        R\        R4      RRR^R^^/^.33RR^R^^/^.33R.
V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)	
            def func():
                lno = 3

            def main():
                for i in range(2):
                    func()
        r.   rW   TNr  rr  rU  r9  rs  ri  r  r7  rO  r  r   r  r8  r9  r  s   &   r   test_temporary_bp$BreakpointTestCase.test_temporary_bp%  s      'G$$+!&*;TB+!&*;TB+>FaUQCL1>FaUQCL1:DO 4F|, ! %$ ! %$$s$   AB.3B		B.B+&B..B?	c                   R p\         V/p\        V4      ;_uu_ 4        R\        R\        4      R\        R\        R4      RRRRR^R^^/. 33R	R
RR
RR^R^^/^.33RR
RR^R^^/. 33R.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)
            def func():
                lno = 3

            def main():
                for i in range(3):
                    func()
        r.   rW   TNr  r  )r  rU  rs  )r  r  rr  rf  rW   r  r   r  r   ri  r  r  s   &   r   test_disabled_temporary_bp-BreakpointTestCase.test_disabled_temporary_bp<  s      'G$$+!&*;<+!&*;TB+3E+>FaUBK03D#3E#>FaUQCL13D#>FaUBK0:DO 4F|, ! %$ ! %$$s$   A%B>B+	B>+B;6B>>C	c                L   R p\         V/p\        V4      ;_uu_ 4        R\        R\        RR4      RRR^R^^/. 33R	.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)
z
            def func(a):
                lno = 3

            def main():
                for i in range(3):
                    func(i)
        r.   rW   Fza == 2Nr  r  rs  ri  r  r  s   &   r   test_bp_condition$BreakpointTestCase.test_bp_conditionX  s      'G$$+!&*;UHM+>FaUBK0:	DO 4F|, ! %$ ! %$$#   9BA?	-B?B
BB#	c                L   R p\         V/p\        V4      ;_uu_ 4        R\        R\        RR4      RRR^R^^/. 33R	.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)
zk
            def func(a):
                lno = 3

            def main():
                func(0)
        r.   rW   Fz1 / 0Nr  r  rs  ri  r  r  s   &   r   )test_bp_exception_on_condition_evaluation<BreakpointTestCase.test_bp_exception_on_condition_evaluationl  s      'G$$+!&*;UGL+>FaUBK0:	DO 4F|, ! %$ ! %$$r  c                L   R p\         V/p\        V4      ;_uu_ 4        R\        R\        4      RRRRR^R^^/. 33R.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)	r  r.   rW   Nr  r  r)   r   rs  ri  r  r  s   &   r   test_bp_ignore_count'BreakpointTestCase.test_bp_ignore_count  s      'G$$+!&*;<+2C+.FaUBK0*DO 4F|, ! %$ ! %$$r  c                   R p\         V/p\        V4      ;_uu_ 4        R\        R\        4      R\        R\        4      RRRRRRR^R^^/. 33R	R
RR^R^^/. 33RR^R^^/. 33R.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  r.   rW   Nr  r  r  r  rs  r  r  ri  r  r  s   &   r    test_ignore_count_on_disabled_bp3BreakpointTestCase.test_ignore_count_on_disabled_bp  s      'G$$+!&*;<+!&*;<+2C+2D+.FaUBK02C#.FaUBK0.FaUBK0*DO 4F|, ! %$ ! %$$s$   A!B:?B'	B:'B72B::C	c                   R p\         V/p\        V4      ;_uu_ 4        RR\        ^33RR\        ^33RR\        ^33RRR^R^^/. 33RR^R^^/. 33R\        ^33R	RR^R^^/. 33R
.V n        \	        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)z
            def func():
                lno = 3
                lno = 4

            def main():
                for i in range(3):
                    func()
        r.   r  rW   r  Nr  r  rs  )rr  ru  rW   ri  )r  r7  r  r   r  r8  r9  r  s   &   r   test_clear_two_bp_on_same_line1BreakpointTestCase.test_clear_two_bp_on_same_line  s      'G$$+7=NPQ<R2S+7=NPQ<R2S+7=NPQ<R2S+.FaUBK0.FaUBK07=NPQ<R2S#.FaUBK0*	DO 4F|, ! %$ ! %$$s$   A#B<B)	B<)B94B<<C	c                    RR\         ^33.V n        \        V 4      ;_uu_ 4       pV P                  \        VP
                  \        4       RRR4       R#   + '       g   i     R# ; i)r.   r  Nr  )rH   r   r  r  r   r8  r9  rk  s   & r   test_clear_at_no_bp&BreakpointTestCase.test_clear_at_no_bp  sH    ''Ha=)A
 t__hE ___s   &AA&	c                   \        4        \        4       pVP                  \        4      pVP	                  \        ^4       V P                  VP                  4       V^./4       \        4       pVP	                  \        ^4       VP	                  \        ^4       VP	                  \        ^4       V P                  VP                  4       V^./4       V P                  VP                  4       V. RO/4       VP                  \        ^4       V P                  VP                  4       V^./4       V P                  VP                  4       V. RO/4       \        4       pV P                  VP                  4       V^./4       V P                  VP                  4       V. RO/4       V P                  VP                  4       V. RO/4       VP                  \        ^4       V P                  VP                  4       V^./4       V P                  VP                  4       V^^./4       V P                  VP                  4       V. RO/4       \        4       pVP	                  \        ^4       V P                  VP                  4       V^./4       V P                  VP                  4       V^^./4       V P                  VP                  4       V. RO/4       V P                  VP                  4       V. RO/4       \        4        \        4       pVP	                  \        ^4       V P                  VP                  4       V^./4       V P                  VP                  4       V^^./4       V P                  VP                  4       V. RO/4       V P                  VP                  4       V. RO/4       V P                  VP                  4       V^./4       R# )rd   N)rd   rU  rf  ru  )rU  rf  ru  )rf  ru     )r   r8   r   rH   rR   assertEqualget_all_breaksrr   )r=   db1rs   db2db3db4db5s   &      r   (test_load_bps_from_previous_Bdb_instance;BreakpointTestCase.test_load_bps_from_previous_Bdb_instance  s   eH%h"++-s|<eh"h"h"++-s|<++-|/DE!$++-s|<++-y/ABe++-s|<++-y/AB++-y/AB!$++-s|<++-1v?++-y/ABeh"++-s|<++-1v?++-y/AB++-y/ABeh"++-s|<++-1v?++-y/AB++-y/AB++-s|<r   r  N)r   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r   r   r&  s   @r   r  r    sD     FJ-.-8-(-&-*-6-2F(= (=r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )RunTestCasei  c           	         R p. ROV n         \        V 4      ;_uu_ 4       pVP                  \        \        P
                  ! V4      RR4      4       RRR4       R#   + '       g   i     R# ; i)
            lno = 2
        <string>execN)r.   rU  <module>r4  r   rU  r  ri  r   r  runcompilerG  rH  r=   rX   r  s   &  r   test_run_stepRunTestCase.test_run_step  sI    
 t__JJwxt4j&IJ ___   1AA+	c           	        R p\         V/p\        V4      ;_uu_ 4        . ROV n        ^ RIpRV/p\	        V 4      ;_uu_ 4       pVP                  RWD4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  NrP  ztest_module_for_bdb.main())
)r.   rd   r  r4  )r   rU  rR  r4  )r.   rf  rR  r4  )r   rf  rR  r4  )r   rd   r  ri  )r  r7  r   rP  r  runeval)r=   rX   r:  rP  nsr  s   &     r   test_runeval_stepRunTestCase.test_runeval_step	  st      'G$$DO '')<=B4F;RD ! %$ ! %$$s#   %A;A(	A;(A83A;;B	r  N)r   r   r   r   r  r  r   r   r&  s   @r   r  r    s     
KE Er   r  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
IssuesTestCasei  c                P   R pRp\         VRV/p\        V4      ;_uu_ 4        R\        RR4      RR	R^R^^/. 33R
RR
RR.
V n        \	        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)z
            from test_module_for_bdb_2 import func
            def main():
                func()
                lno = 5
        z9
            def func():
                lno = 3
        test_module_for_bdb_2r.   rW   ztest_module_for_bdb_2.pyNr  r  rs  r4  )r   rf  rW   )r.   r  rR  ri  )r  r7  rO  r   r  r8  r9  )r=   code_1code_2r:  r  s   &    r   +test_step_at_return_with_no_trace_in_caller:IssuesTestCase.test_step_at_return_with_no_trace_in_caller   s    
 #V
 G$$+!&*DE+.FaUBK0*%*#*DO 4F|, ! %$ ! %$$s#   7BB	/BBBB%	c                b   R p\         V/pR F  pV P                  VR7      ;_uu_ 4        \        V4      ;_uu_ 4        R	\        R\        4      R
RR^R^^/. 33V3.V n        VR8X  d)   V P
                  P                  R^
R\        3RRR.4       MV P
                  P                  RR.4       \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       RRR4       K  	  R#   + '       g   i     L&; i  + '       g   i     L1; i  + '       g   i     EK!  ; i)z
            def test_gen():
                yield 0
                lno = 4
                return 123

            def main():
                it = test_gen()
                next(it)
                next(it)
                lno = 11
        r   rq  r.   test_genr   rR  N)r   r   r   r  r  rs  r4  )r   
   rR  ri  r.   ru  r  )r  rv  r7  rO  r  r   r  r)  r  r8  r9  )r=   rX   r:  r	  r  s   &    r   #test_next_until_return_in_generator2IssuesTestCase.test_next_until_return_in_generator>  s   
  '3Hx00#G,,3)*6GH3nJ!A<xl	'DO  8+..)2v}Ey3z ..4jB #4F|4 )% - 10 4( )% -, 100s;   DBD	C6D	 D6DD		DDD.c                l   R p\         V/p\        V4      ;_uu_ 4        R\        R\        4      RRR^R^^/. 33R	R
R	RR	RR	R^	R\        3RRR.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)z
            def test_gen():
                yield 0
                lno = 4
                yield 1
                return 123

            def main():
                for i in test_gen():
                    lno = 10
                lno = 11
        r.   r  r   rR  Nr  r  rs  r3  r  )r.   r  r  )r.   r  r  r4  )r.      rR  ri  	r  r7  rO  r  r)  r   r  r8  r9  r  s   &   r   'test_next_command_in_generator_for_loop6IssuesTestCase.test_next_command_in_generator_for_loopg  s      'G$$+!*.?@+J!A4'''a7$DO 4F|, ! %$ ! %$$s$   A	B"'B	=B"BB""B3	c                d   R p\         V/p\        V4      ;_uu_ 4        R\        R\        4      RRR^R^^/. 33R	R
R	R^R\        3RRR.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)4  
            def test_subgen():
                yield 0
                return 123

            def test_gen():
                x = yield from test_subgen()
                return 456

            def main():
                for i in test_gen():
                    lno = 12
                lno = 13
        r.   r  r   rR  Nr  r  rs  r3  )r.      r  r4  r.      rR  ri  r  r  s   &   r   /test_next_command_in_generator_with_subiterator>IssuesTestCase.test_next_command_in_generator_with_subiterator  s      'G$$+!*.?@+.J!A4*'*b&-8*$*	DO 4F|, ! %$ ! %$$s$   AB#B	9BBBB/	c                t   R p\         V/p\        V4      ;_uu_ 4        R\        R\        4      RR	R^R^^/. 33R
R^R\        3R
R^R\        3RRR.V n        \        V 4      ;_uu_ 4       pVP                  \        4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r  r.   test_subgenr   r  rR  Nr  r  rs  r  r4  r   ri  r  r  s   &   r   1test_return_command_in_generator_with_subiterator@IssuesTestCase.test_return_command_in_generator_with_subiterator  s      'G$$+!-1BC+nMQqE2;7la];lb&-8j$j	DO 4F|, ! %$ ! %$$s$   AB&+B	B&B#B&&B7	c           	         R p. ROV n         \        V 4      ;_uu_ 4       pVP                  \        \        P
                  ! V4      RR4      4       RRR4       R#   + '       g   i     R# ; i)r  r  r  N)r  r4  r  r3  r  r  s   &  r   test_next_to_botframe$IssuesTestCase.test_next_to_botframe  sI    
 t__JJwxt4j&IJ ___r  r  N)r   r   r   r   r  r  r  r"  r&  r)  r   r   r&  s   @r   r  r    s+     -<'5R->->->K Kr   r  c                   &   a  ] tR tRt o R tRtV tR# )TestRegressionsi  c                    V P                  R \        4       P                  \        P                  ! 4       R34      4       R# )zWarning: lineno is NoneN)assertInr8   format_stack_entryr  	_getframerx   s   &r   !test_format_stack_entry_no_lineno1TestRegressions.test_format_stack_entry_no_lineno  s-    /e../FG	Ir   r   N)r   r   r   r   r1  r   r   r&  s   @r   r,  r,    s     I Ir   r,  __main__r   )/r  r   r  r*   unittestrG  rJ   rI  
contextlibr   	itertoolsr   r   test.supportr   r   r   	Exceptionr
   r   r   r   r   r   r6   r8   r   r  r=  r7  rH   rO  r  r  r9  rZ  rV  rW  TestCaser5  rb  r  r  r  r,  r   rR  r   r   r   <module>r:     sU  f  
 	     % $ & " # $9 # E| E H\ H A, A '*>/$(( >/@{1S {1z-/ -/^H)T    #+e$ = $%' 
38$$ 3~'L ~'@i= i=X!E, !EFrK\ rKjIh'' I zMMO r   