+
    BiH                         ^ RI t ^ RIt^ RIHtHtHt ^ RIHt  ! R R] P                  4      t	 ! R R] P                  4      t
]R8X  d   ] P                  ! 4        R# R# )	    N)captured_stderr
disable_gc
gc_collect)supportc                      a  ] tR t^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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 tR t R t!R t"R  t#R! t$R" t%R# t&R$t'V t(R%# )&TestPEP380Operationc                   aa . oVV3R  lpV3R loV! 4        F  pSP                  RV: 24       K  	  V P                  S. RO4       R# )c               3   v   <"   SP                  R 4       S ! 4        Rj  xL
  SP                  R4       R#  L5iStarting g1NFinishing g1appendg2traces   +/usr/lib/python3.14/test/test_yield_from.pyg1OTestPEP380Operation.test_delegation_of_initial_next_to_subgenerator.<locals>.g1   s,     LL'tOOLL(    979c               3   \   <"   S P                  R 4       ^*x  S P                  R4       R# 5i)Starting g2Finishing g2Nr   r   s   r   r   OTestPEP380Operation.test_delegation_of_initial_next_to_subgenerator.<locals>.g2   s#     LL'HLL(s   ),Yielded N)r   r   z
Yielded 42r   r   r   assertEqualselfr   xr   r   s   &  @@r   /test_delegation_of_initial_next_to_subgeneratorCTestPEP380Operation.test_delegation_of_initial_next_to_subgenerator   sF     	)	) ALL,-   
 	    c                0  aa . oVV3R  lpV3R lo V! 4        F  pSP                  RV: 24       K  	  V P                  R4       V P                  S. RO4       R#   \         d.   pT P                  TP                  ^ ,          R4        Rp?LIRp?ii ; i)c               3      <"    SP                  R 4       S ! 4        Rj  xL
  SP                  R4       R#  L  SP                  R4       i ; i5ir   r   r   s   r   r   KTestPEP380Operation.test_raising_exception_in_initial_next_call.<locals>.g11   s>     -]+4^,  ^,s%   A: 8: A: AAc                  j   <  S P                  R 4       \        R4      h  S P                  R4       i ; i)r   spanish inquisition occurredr   r   
ValueErrorr   s   r   r   KTestPEP380Operation.test_raising_exception_in_initial_next_call.<locals>.g27   s.    -]+ !?@@^,s    2r   'subgenerator failed to raise ValueErrorr)   N)r   r   r   r   r   failr+   r   argsr    r   r!   er   r   s   &   @@r   +test_raising_exception_in_initial_next_call?TestPEP380Operation.test_raising_exception_in_initial_next_call,   s     	-	-	ATQ01 
 II?@  
 		  	HQVVAY(FGG	H   #A B(#BBc                   aa . oVV3R  lpV3R loV! 4        F  pSP                  RV: 24       K  	  V P                  S. RO4       R# )c               3      <"   SP                  R 4       Rx  S ! 4        Rj  xL
  Rx  SP                  R4       R#  L5ir   g1 hamNg1 eggsr   r   r   s   r   r   LTestPEP380Operation.test_delegation_of_next_call_to_subgenerator.<locals>.g1P   s6     LL'NtOOOLL( s    A?Ac               3   d   <"   S P                  R 4       Rx  Rx  S P                  R4       R# 5ir   g2 spamg2 more spamr   Nr   r   s   r   r   LTestPEP380Operation.test_delegation_of_next_call_to_subgenerator.<locals>.g2V   s)     LL'O  LL(   -0r   N)r   Yielded g1 hamr   Yielded g2 spamYielded g2 more spamr   Yielded g1 eggsr   r   r   s   &  @@r   ,test_delegation_of_next_call_to_subgenerator@TestPEP380Operation.test_delegation_of_next_call_to_subgeneratorK   sF     	)	)
 ALL,-  	 
 		r$   c                0  aa . oVV3R  lpV3R lo V! 4        F  pSP                  RV: 24       K  	  V P                  R4       V P                  S. RO4       R#   \         d.   pT P                  TP                  ^ ,          R4        Rp?LIRp?ii ; i)c               3      <"    SP                  R 4       Rx  S ! 4        Rj  xL
  Rx  SP                  R4       R#  L  SP                  R4       i ; i5ir8   r   r   s   r   r   MTestPEP380Operation.test_raising_exception_in_delegated_next_call.<locals>.g1m   J     -]+4^,   ^,+   AA A A A A AAc               3   z   <"    S P                  R 4       Rx  \        R4      h  S P                  R4       i ; i5i)r   r>   hovercraft is full of eelsr   r*   r   s   r   r   MTestPEP380Operation.test_raising_exception_in_delegated_next_call.<locals>.g2u   s7     -]+ !=>> ^,s   ; % 8;r   r-   rN   Nr   rB   r   rC   r   r   r.   r1   s   &   @@r   -test_raising_exception_in_delegated_next_callATestPEP380Operation.test_raising_exception_in_delegated_next_callh   s     	-	-	ATQ01 
 II?@  
 		  	FQVVAY(DEE	Fr5   c                   aa . oVV3R  lpV3R loV! 4       p\        V4      p^p  VP                  V4      pSP                  RV: 24       V^,          pK2    \         d     Mi ; iT P	                  S. RO4       R# )c               3      <"   SP                  R 4       Rx p SP                  RV : 24       S! 4        Rj  xL
  Rx p SP                  RV : 24       SP                  R4       R#  L05ir   r9   zg1 received Nr:   r   r   r!   r   r   s    r   r   7TestPEP380Operation.test_delegation_of_send.<locals>.g1   X     LL'ALLQ01tOOALLQ01LL(    5A+A)1A+c               3      <"   SP                  R 4       Rx p SP                  RV : 24       Rx p SP                  RV : 24       SP                  R4       R# 5i)r   r>   g2 received r?   r   Nr   r!   r   s    r   r   7TestPEP380Operation.test_delegation_of_send.<locals>.g2   sK     LL'ALLQ01$$ALLQ01LL(s   AAr   N)r   g1 received 1r   rC   g2 received 2rD   zg2 received 3r   rE   zg1 received 4r   )nextsendr   StopIterationr   )r    r   gyr!   r   r   s   &    @@r   test_delegation_of_send+TestPEP380Operation.test_delegation_of_send   s     	)	) DG	FF1IQ01Q 		  
 	s   2A A'&A'c                   aaa . oVV3R  loV3R loVV3R lpV P                  \        V4       V P                  S. RO4       R# )c               3      <"   SP                  R 4       Rx p SP                  RV : 24       S! 4        Rj  xL
  Rx p SP                  RV : 24       SP                  R4       R#  L05irU   r   rV   s    r   r   MTestPEP380Operation.test_handling_exception_while_delegating_send.<locals>.g1   rX   rY   c               3   v   <"   SP                  R 4       Rx p SP                  RV : 24       \        R4      h5i)r   r>   r[   rN   r*   r\   s    r   r   MTestPEP380Operation.test_handling_exception_while_delegating_send.<locals>.g2   s4     LL'ALLQ019::s   69c                     < S! 4       p \        V 4      p^p  V P                  V4      pSP                  RV: 24       V^,          pK2    \         d    SP                  R4        R# i ; i)   r   rb   N)r`   ra   r   rb   )rc   rd   r!   r   r   s      r   runNTestPEP380Operation.test_handling_exception_while_delegating_send.<locals>.run   s`    AQAA.q	ALL!45FA  ._-.s   2A	 	A)(A)N)r   r^   r   rC   r_   )assertRaisesr+   r   r    rn   r   r   r   s   & @@@r   -test_handling_exception_while_delegating_sendATestPEP380Operation.test_handling_exception_while_delegating_send   s@     	)	)
	. 	*S)  
 	r$   c                   aa . oVV3R  lpV3R loV! 4       p\        ^4       F#  p\        V4      pSP                  RV: 24       K%  	  VP                  4        V P	                  S. RO4       R# )c               3      <"    SP                  R 4       Rx  S ! 4        Rj  xL
  Rx  SP                  R4       R#  L  SP                  R4       i ; i5ir8   r   r   s   r   r   5TestPEP380Operation.test_delegating_close.<locals>.g1   rK   rL   c               3      <"    S P                  R 4       Rx  Rx  S P                  R4       R#   S P                  R4       i ; i5ir=   r   r   s   r   r   5TestPEP380Operation.test_delegating_close.<locals>.g2   :     -]+$$^,^,   A1 AAAr   NrP   )ranger`   r   closer   )r    r   rc   ir!   r   r   s   &    @@r   test_delegating_close)TestPEP380Operation.test_delegating_close   sc     	-	- DqAQALL,-  	
	  
 	r$   c                  aa . oVV3R  lpV3R lo V! 4       p\        ^4       F#  p\        V4      pSP                  RV: 24       K%  	  VP                  4        V P	                  R4       V P                  S. RO4       R#   \
         dN   pT P                  TP                  ^ ,          R4       T P                  TP                  \        4        Rp?LiRp?ii ; i)c               3      <"    SP                  R 4       Rx  S ! 4        Rj  xL
  Rx  SP                  R4       R#  L  SP                  R4       i ; i5ir8   r   r   s   r   r   MTestPEP380Operation.test_handing_exception_while_delegating_close.<locals>.g1	  rK   rL   c               3      <"    S P                  R 4       Rx  Rx  S P                  R4       \        R4      h  S P                  R4       \        R4      h; i5i)r   r>   r?   r   "nybbles have exploded with delightr*   r   s   r   r   MTestPEP380Operation.test_handing_exception_while_delegating_close.<locals>.g2  sV     G]+$$^, !EFF ^, !EFFs   A: AAAr   r-   r   NrP   )r{   r`   r   r|   r/   r+   r   r0   assertIsInstance__context__GeneratorExitr    r   rc   r}   r!   r2   r   r   s   &     @@r   -test_handing_exception_while_delegating_closeATestPEP380Operation.test_handing_exception_while_delegating_close  s     	-	G
	AA1XGQ01  GGI
 II?@  
 	  	@QVVAY(LM!!!--??	@s   A	B CACCc                  aa . oVV3R  lpV3R lo V! 4       p\        ^4       F#  p\        V4      pSP                  RV: 24       K%  	  \        R4      pVP	                  V4       V P                  R4       V P                  S. RO4       R#   \         d.   pT P                  TP                  ^ ,          R4        Rp?LIRp?ii ; i)c               3      <"    SP                  R 4       Rx  S ! 4        Rj  xL
  Rx  SP                  R4       R#  L  SP                  R4       i ; i5ir8   r   r   s   r   r   5TestPEP380Operation.test_delegating_throw.<locals>.g12  rK   rL   c               3      <"    S P                  R 4       Rx  Rx  S P                  R4       R#   S P                  R4       i ; i5ir=   r   r   s   r   r   5TestPEP380Operation.test_delegating_throw.<locals>.g2:  ry   rz   r   tomato ejectedr-   NrP   r{   r`   r   r+   throwr/   r   r0   r   s   &     @@r   test_delegating_throw)TestPEP380Operation.test_delegating_throw-  s     	-	-
	AA1XGQ01  +,AGGAJ II?@  
 		  	:QVVAY(899	:s   AB C#CCc                   a . oV3R  lp\        4       pV! V4       \        R4      pV! V4       RVn        V! V4       V P                  S. RO4       R# )c                    < SP                  V P                  P                  : R V : 24       SP                  RV P                  : 24       R# )z: zvalue = N)r   	__class____name__value)r2   r   s   &r   pexPTestPEP380Operation.test_value_attribute_of_StopIteration_exception.<locals>.pexZ  s1    LLQ[[%9%91=>LL23r$   spameggsN)zStopIteration: zvalue = NoneStopIteration: spamzvalue = spamr   zvalue = eggs)rb   r   r   )r    r   r2   r   s   &  @r   /test_value_attribute_of_StopIteration_exceptionCTestPEP380Operation.test_value_attribute_of_StopIteration_exceptionU  sS     	4 OA&!AA  
 	r$   c                \   a V3R  lpR oV P                  \        V! 4       4      R.4       R# )c               3   2   <"   S ! 4        R j  xL
  R #  L5iN r   s   r   r   :TestPEP380Operation.test_exception_value_crash.<locals>.g1p  s     tOO   c               3      "   R x  ^*.# 5ir   r   r   r$   r   r   :TestPEP380Operation.test_exception_value_crash.<locals>.g2r  s     J4Ks   
r   N)r   list)r    r   r   s   & @r   test_exception_value_crash.TestPEP380Operation.test_exception_value_crashm  s'    		 	bddV,r$   c                   aa . oVV3R  lpRV3R lloV! 4        F  pSP                  RV: 24       K  	  V P                  S. RO4       R# )c               3   (  <"   SP                  R 4       Rx  S! 4        Rj  xL
 p SP                  RV : 24       ^R\        ^4      3 F(  pS! V4       Rj  xL
 p SP                  RV : 24       K*  	  Rx  SP                  R4       R#  Lj L65i)r   r9   Nzg2 returned r:   r      )r   rb   )retvr   r   s     r   r   ;TestPEP380Operation.test_generator_return_value.<locals>.g1}  s}     LL'NT/CLLS23mA..!#A&67 / OLL( " 's!    BB5BB5BBNc              3   x   <"   SP                  R 4       Rx  Rx  SP                  R4       V '       d   V # R# 5ir=   r   )r   r   s   &r   r   ;TestPEP380Operation.test_generator_return_value.<locals>.g2  s6     LL'O  LL( s   7:r   r   )r   rB   r   rC   rD   r   zg2 returned Noner   rC   rD   r   zg2 returned 1r   rC   rD   r   zg2 returned (2,)r   rC   rD   r   zg2 returned StopIteration(3)rE   r   r   r   s   &  @@r   test_generator_return_value/TestPEP380Operation.test_generator_return_valuex  sF     		)	 ALL,-   
 	r$   c                ~    . pR  pV! 4        F  pVP                  RV: 24       K  	  V P                  V. RO4       R# )c               3   8   "   \        ^4       Rj  xL
  R#  L5i   Nr{   r   r$   r   rc   GTestPEP380Operation.test_delegation_of_next_to_non_generator.<locals>.g       Qx   r   N)	Yielded 0	Yielded 1	Yielded 2r   )r    r   rc   r!   s   &   r   (test_delegation_of_next_to_non_generator<TestPEP380Operation.test_delegation_of_next_to_non_generator  s>     	 ALL,-   
 	r$   c                    . pR  pV! 4       p\        ^4       F)  pVP                  R4      pVP                  RV: 24       K+  	  V P                  V. RO4       R# )c               3   8   "   \        ^4       Rj  xL
  R#  L5ir   r   r   r$   r   rc   BTestPEP380Operation.test_conversion_of_sendNone_to_next.<locals>.g  r   r   N	Yielded: )z
Yielded: 0z
Yielded: 1z
Yielded: 2)r{   ra   r   r   )r    r   rc   gir!   rd   s   &     r   #test_conversion_of_sendNone_to_next7TestPEP380Operation.test_conversion_of_sendNone_to_next  sV     	 SqAALL!-.  	  
 	r$   c                   a . oV3R  lpV! 4       p\        V4       \        4       ;_uu_ 4       pVP                  4        RRR4       V P                  XP	                  4       R4       V P                  SRR.4       R#   + '       g   i     LF; i)c               3      <"    S P                  R 4       \        ^4       Rj  xL
  S P                  R4       S P                  R4       R#  L(  S P                  R4       i ; i5i
starting gNzg should not be herefinishing gr   r{   r   s   r   rc   HTestPEP380Operation.test_delegation_of_close_to_non_generator.<locals>.g  Q     ,\* 8##34]+ $ ]++   A%A AA A%A A""A%N r   r   )r`   r   r|   r   getvalue)r    rc   r   outputr   s   &   @r   )test_delegation_of_close_to_non_generator=TestPEP380Operation.test_delegation_of_close_to_non_generator  ss     	, SR&HHJ *B/ 
 	 s   A==B	c                  a . oV3R  lp V! 4       p\        ^4       F#  p\        V4      pSP                  RV: 24       K%  	  \        R4      pVP	                  V4       V P                  R4       V P                  S. RO4       R#   \         d.   pT P                  TP                  ^ ,          R4        Rp?LIRp?ii ; i)c               3      <"    S P                  R 4       \        ^
4       Rj  xL
  S P                  R4       R#  L  S P                  R4       i ; i5i)
Starting gNFinishing gr   r   s   r   rc   ETestPEP380Operation.test_delegating_throw_to_non_generator.<locals>.g  sB     ,\* 9$$]+ %]+s%   A> <> A> AAr   r   r-   N)r   r   r   r   z	Yielded 3z	Yielded 4r   r   )r    rc   r   r}   r!   r2   r   s   &     @r   &test_delegating_throw_to_non_generator:TestPEP380Operation.test_delegating_throw_to_non_generator  s     	,
	AB1XHQ01  +,AHHQK II?@  
 		  	9QVVAY'788	9s   AB B?#B::B?c                n  a . oV3R  lp V! 4       p\        V4       \        ^4       F)  pVP                  ^*4      pSP                  RV: 24       K+  	  V P	                  R4       V P                  SRR.4       R#   \
         d.   pT P                  RTP                  ^ ,          4        Rp?LIRp?ii ; i)c               3      <"    S P                  R 4       \        ^4       Rj  xL
  S P                  R4       S P                  R4       R#  L(  S P                  R4       i ; i5ir   r   r   s   r   rc   GTestPEP380Operation.test_attempting_to_send_to_non_generator.<locals>.g  r   r   zShould not have yielded: z#was able to send into non-generatorra   Nr   r   )	r`   r{   ra   r   r/   AttributeErrorassertInr0   r   )r    rc   r   r!   rd   r2   r   s   &     @r   (test_attempting_to_send_to_non_generator<TestPEP380Operation.test_attempting_to_send_to_non_generator  s     	,		=BH1XGGBKaAB  II;< 
 		  	-MM&!&&),,	-s   A
A< <B4#B//B4c                  a  ! R  R4      oV3R lpV P                  \        4      ;_uu_ 4        V! 4       pV P                  \        V4      ^4       VP	                  ^4       RRR4       V P                  \        4      ;_uu_ 4        V! 4       pV P                  \        V4      ^4       VP                  \        4       RRR4       \        P                  ! 4       ;_uu_ 4       pV! 4       pV P                  \        V4      ^4       VP                  4        V P                  \        VP                  P                  4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)c                   2   a  ] tR tRt o R tR tR tRtV tR# )@TestPEP380Operation.test_broken_getattr_handling.<locals>.Brokeni!  c                    V # r   r   r    s   &r   __iter__ITestPEP380Operation.test_broken_getattr_handling.<locals>.Broken.__iter__"      r$   c                    ^# )rm   r   r   s   &r   __next__ITestPEP380Operation.test_broken_getattr_handling.<locals>.Broken.__next__$  s    r$   c                    ^^ ,           R# rm   Nr   )r    attrs   &&r   __getattr__LTestPEP380Operation.test_broken_getattr_handling.<locals>.Broken.__getattr__&  s    !r$   r   N)	r   
__module____qualname____firstlineno__r   r   r   __static_attributes____classdictcell____classdict__s   @r   Brokenr   !  s      r$   r   c               3   2   <"   S ! 4        R j  xL
  R #  L5ir   r   )r   s   r   rc   ;TestPEP380Operation.test_broken_getattr_handling.<locals>.g)  s     xr   N)rp   ZeroDivisionErrorr   r`   ra   r   r   r   catch_unraisable_exceptionr|   
unraisableexc_type)r    rc   r   cmr   s   &   @r   test_broken_getattr_handling0TestPEP380Operation.test_broken_getattr_handling  s	   	 		  011BT"Xq)GGAJ 2
 011BT"Xq)HH^$ 2
 //11RBT"Xq)HHJ.0F0FG 21 21
 21
 211s$   4E8E%AE2E	E/	2F	c                   aaa . oVV3R  loR oV3R lpV P                  \        V4       V P                  SR.4       R# )c               3   v   <"   SP                  R 4       S ! 4        Rj  xL
  SP                  R4       R#  L5i)g1 about to yield from g2Ng1 should not be herer   r   s   r   r   CTestPEP380Operation.test_exception_in_initial_next_call.<locals>.g1B  s.     LL45tOOLL01 r   c               3   $   "   ^^ ,          x  R# 5ir   r   r   r$   r   r   CTestPEP380Operation.test_exception_in_initial_next_call.<locals>.g2F  s     A#Is   c                  ,   < S! 4       p \        V 4       R # r   )r`   )r   r   s    r   rn   DTestPEP380Operation.test_exception_in_initial_next_call.<locals>.runH  s    BHr$   r  N)rp   r  r   rq   s   & @@@r   #test_exception_in_initial_next_call7TestPEP380Operation.test_exception_in_initial_next_call=  sD     	2		 	+C0' 
 	r$   c                8  aaa . oVV3R  lpVV3R lo V! 4       oS F  pSP                  RV: 24       K  	  V P                  R4       V P                  S. RO4       R#   \         d.   pT P                  TP                  ^ ,          R4        Rp?LIRp?ii ; i)c               3      <"   SP                  R 4       Rx  SP                  R4       S ! 4        Rj  xL
  SP                  R4       R#  L5i)g1: startingy1g1: about to yield from g2Nr  r   r   s   r   r   >TestPEP380Operation.test_attempted_yield_from_loop.<locals>.g1U  s?     LL(JLL56tOOLL01 s   1AAAc               3      <"   SP                  R 4       Rx  SP                  R4       S  Rj  xL
  SP                  R4       R#  L5i)g2: startingy2g2: about to yield from g1Nzg2 should not be herer   )r   r   s   r   r   >TestPEP380Operation.test_attempted_yield_from_loop.<locals>.g2\  s=     LL(JLL56MMLL01 s   ,A	AA	r   z$subgenerator didn't raise ValueErrorzgenerator already executingN)r  zYielded: y1r  r  zYielded: y2r  r.   )r    r   rd   r2   r   r   r   s   &   @@@r   test_attempted_yield_from_loop2TestPEP380Operation.test_attempted_yield_from_loopP  s     	2	2	>Ba12 
 II<=  
 		  	FQVVAY'DEE	Fs   %A! !B,#BBc                R  aaa . oVV3R  lpVV3R lo ! R R\         4      oV! 4       p\        ^4       F#  p\        V4      pSP                  RV: 24       K%  	  S! R4      pVP	                  V4       V F  pSP                  RV: 24       K  	  V P                  S. RO4       R# )c               3      <"    SP                  R 4       Rx  S ! 4        Rj  xL
  Rx  SP                  R4       R#  L  SP                  R4       i ; i5ir8   r   r   s   r   r   ITestPEP380Operation.test_returning_value_from_delegated_throw.<locals>.g1x  rK   rL   c               3      <"    SP                  R 4       Rx  Rx  R#   S  d    SP                  R4       Rx  Rx   R# i ; i5i)r   r>   r?   Caught LunchError in g2zg2 lunch savedzg2 yet more spamNr   )
LunchErrorr   s   r   r   ITestPEP380Operation.test_returning_value_from_delegated_throw.<locals>.g2  sI     )]+$$ )67&&(()s%   A  A A AAAc                       ] tR tRtRtR# )QTestPEP380Operation.test_returning_value_from_delegated_throw.<locals>.LunchErrori  r   Nr   r   r   r   r   r   r$   r   r'  r*        r$   r'  r   r   N)r   rB   r   rC   r&  zYielded g2 yet more spamrE   r   )	Exceptionr{   r`   r   r   r   )	r    r   rc   r}   r!   r2   r'  r   r   s	   &     @@@r   )test_returning_value_from_delegated_throw=TestPEP380Operation.test_returning_value_from_delegated_throws  s     	-	)	 	DqAQALL,-  '(	
ALL,-  	 
 		r$   c                   aa . oVV3R  lpV3R loV! R4       V! ^4       V! R4       V! \        ^4      4       V P                  S. RO4       R# )c                    < S! V 4      p\        V4        SP                  R 4       \        V4       SP                  R4       R#   \         d!   pSP                  RT: 24        Rp?R# Rp?ii ; i)f resuming gf SHOULD NOT BE HERE	f caught N)r`   r   rb   rr   r2   rc   r   s   &  r   f>TestPEP380Operation.test_next_and_return_with_value.<locals>.f  sZ    1BH3^,R34  3a1223s   -A A0A++A0c              3   d   <"   SP                  R 4       Rx  SP                  RV : 24       V # 5i)
g startingNg returning r   )r6  r   s   &r   rc   >TestPEP380Operation.test_next_and_return_with_value.<locals>.g  s)     LL&LLQ01HrA   Nr   )r:  r2  g returning Nonef caught StopIteration()r:  r2  g returning 1f caught StopIteration(1)r:  r2  g returning (2,)f caught StopIteration((2,))r:  r2  g returning StopIteration(3)(f caught StopIteration(StopIteration(3))rb   r   r    r7  rc   r   s   & @@r   test_next_and_return_with_value3TestPEP380Operation.test_next_and_return_with_value  sM     	3	
 	
$	!	$	-
  
 	r$   c                   aa . oVV3R  lpV3R loV! R4       V! ^4       V! R4       V! \        ^4      4       V P                  S. RO4       R# )c                    < S! V 4      p\        V4        SP                  R 4       VP                  R4       SP                  R4       R#   \         d!   pSP                  RT: 24        Rp?R# Rp?ii ; i)f sending spam to gr   r3  r4  N)r`   r   ra   rb   r5  s   &  r   r7  >TestPEP380Operation.test_send_and_return_with_value.<locals>.f  s_    1BH32334  3a1223s   3A A6A11A6c              3      <"   SP                  R 4       Rx pSP                  RV: 24       SP                  RV : 24       V # 5i)r:  Nzg received r;  r   )r6  r!   r   s   & r   rc   >TestPEP380Operation.test_send_and_return_with_value.<locals>.g  s:     LL&ALLA/0LLQ01Hs   AANr   )r:  rK  g received 'spam'r=  r>  r:  rK  rO  r?  r@  r:  rK  rO  rA  rB  r:  rK  rO  rC  rD  rE  rF  s   & @@r   test_send_and_return_with_value3TestPEP380Operation.test_send_and_return_with_value  sM     	3	 	
$	!	$	-
 !
 	r$   c           
     :  aaa VV3R  loVV3R lp^R\        ^4      3 Fw  o. oV! 4       pSP                  \        V4      4       SP                  \        VP	                  \
        4      4      4       V P                  S^RRS: R2\        S4      .4       Ky  	  R# )c               3   `   <"    ^x  S#   \          d    S P                  R4        S# i ; i5i)rm   inner caught ValueError)r+   r   )r   r   s   r   innerTTestPEP380Operation.test_catching_exception_from_subgen_and_returning.<locals>.inner  s9     8 L  867L8s   . .+.+.c               3   f   <"   S! 4        R j  xL
 p SP                  RV : R24       V x  R #  L 5i)Ninner returned 	 to outerr   )r   rU  r   s    r   outerTTestPEP380Operation.test_catching_exception_from_subgen_and_returning.<locals>.outer  s)      7"ALL<=G #s   1/!1rT  rX  rY  Nr   )rb   r   r`   reprr   r+   r   )r    rZ  rc   rU  r   r   s   &  @@@r   1test_catching_exception_from_subgen_and_returningETestPEP380Operation.test_catching_exception_from_subgen_and_returning  s    
		
 mA..EEALLa!LLaggj123U)057U	%  /r$   c                   aa . oV3R  loVV3R lp V! 4       p\        V4       VP                  \        4       V P                  R4       V P	                  SRR.4       R#   \         d     L#i ; i)c               3      <"    S P                  R 4       Rx  S P                  R4       R#   \         d     R# i ; i5iEnter fNExit fr   r   r   s   r   r7  STestPEP380Operation.test_throwing_GeneratorExit_into_subgen_that_returns.<locals>.f  s7     Y'X&  s   ?&- ?<?<?c               3   v   <"   SP                  R 4       S ! 4        Rj  xL
  SP                  R4       R#  L5iEnter gNzExit gr   r7  r   s   r   rc   STestPEP380Operation.test_throwing_GeneratorExit_into_subgen_that_returns.<locals>.g!  ,     LL#sNNLL" r   *subgenerator failed to raise GeneratorExitrh  rb  N)r`   r   r   r/   r   )r    rc   r   r7  r   s   &  @@r   4test_throwing_GeneratorExit_into_subgen_that_returnsHTestPEP380Operation.test_throwing_GeneratorExit_into_subgen_that_returns  sr    
 		#	DBHHH]# IIBC 
 		  		s   'A! !A/.A/c                8  aa . oV3R  loVV3R lp V! 4       p\        V4       VP                  \        4       V P                  R4       V P                  SRR.4       R#   \         d.   pT P                  TP                  ^ ,          R4        Rp?LIRp?ii ; i)c               3      <"    S P                  R 4       Rx  S P                  R4       R#   \         d	    Rx   R# i ; i5ira  rd  r   s   r   r7  XTestPEP380Operation.test_throwing_GeneratorExit_into_subgenerator_that_yields.<locals>.f8  s7     Y'X&  s#   A&- AA AA  Ac               3   v   <"   SP                  R 4       S ! 4        Rj  xL
  SP                  R4       R#  L5irg  r   ri  s   r   rc   XTestPEP380Operation.test_throwing_GeneratorExit_into_subgenerator_that_yields.<locals>.g?  rk  r   rl  zgenerator ignored GeneratorExitNrh  rb  )r`   r   r   r/   RuntimeErrorr   r0   r    rc   r   r2   r7  r   s   &   @@r   9test_throwing_GeneratorExit_into_subgenerator_that_yieldsMTestPEP380Operation.test_throwing_GeneratorExit_into_subgenerator_that_yields2  s    
 		#	DBHHH]# IIBC 
 		  	KQVVAY(IJJ	Ks   'A! !B,#BBc                x  aa . oV3R  loVV3R lp V! 4       p\        V4       VP                  \        4       V P                  R4       V P                  SRR.4       R#   \         dN   pT P                  TP                  ^ ,          R4       T P                  TP                  \        4        Rp?LiRp?ii ; i)c               3      <"    S P                  R 4       Rx  S P                  R4       R#   \         d    \        R4      hi ; i5i)rb  Nrc  Vorpal bunny encountered)r   r   r+   r   s   r   r7  RTestPEP380Operation.test_throwing_GeneratorExit_into_subgen_that_raises.<locals>.fV  s@     =Y'X&  = !;<<=s   A&- AAAc               3   v   <"   SP                  R 4       S ! 4        Rj  xL
  SP                  R4       R#  L5irg  r   ri  s   r   rc   RTestPEP380Operation.test_throwing_GeneratorExit_into_subgen_that_raises.<locals>.g]  rk  r   r-   rz  Nrh  rb  )	r`   r   r   r/   r+   r   r0   r   r   ru  s   &   @@r   3test_throwing_GeneratorExit_into_subgen_that_raisesGTestPEP380Operation.test_throwing_GeneratorExit_into_subgen_that_raisesP  s    
 	=	#	ABHHH]#
 II?@ 
 	  	@QVVAY(BC!!!--??	@s   'A! !B9,AB44B9c                L    R  pV P                  \        \        V! 4       4       R# )c               3   &   "   R R j  xL
  R #  L5i)Nr   r   r   r$   r   rc   4TestPEP380Operation.test_yield_from_empty.<locals>.gp  s     MM   N)rp   rb   r`   )r    rc   s   & r   test_yield_from_empty)TestPEP380Operation.test_yield_from_emptyo  s    	-qs3r$   c                "  aa V3R  lpV3R loV! 4       oV P                  \        S4      . RO4       V! 4       o\        S4      .p  VP                  SP	                  ^*4      4       K#    \
         d     Mi ; iT P                  T. RO4       R# )c               3   B   <"   ^ x  S ! 4        Rj  xL
  ^x  R#  L
5ir   Nr   )twos   r   oneOTestPEP380Operation.test_delegating_generators_claim_to_be_running.<locals>.onev  s      GuG s   c               3   \   <"   ^x   S  Rj  xL
  ^x  R#  L
  \          d     Li ; i5ir   r+   )r   s   r   r  OTestPEP380Operation.test_delegating_generators_claim_to_be_running.<locals>.twoz  s4     G G  s(   ,  , ),),Nr   rm   r   r   )r   r   r`   r   ra   rb   )r    r  resr   r  s   &  @@r   .test_delegating_generators_claim_to_be_runningBTestPEP380Operation.test_delegating_generators_claim_to_be_runningt  s|    		 Ub<0 UBxj	

2772;' 		l+s   #A* *A87A8c                   aaa  ! R  R\         4      oVV3R lpVV3R loV! 4       o\        S4      .p  VP                  SP                  S4      4       K#    \         d     R#  T P                  T. RO4       h ; i)c                       ] tR tRtRtR# )\TestPEP380Operation.test_delegating_generators_claim_to_be_running_with_throw.<locals>.MyErri  r   Nr+  r   r$   r   MyErrr    r,  r$   r  c               3   |   <"    ^ x  S! 4        Rj  xL
   ^x  R#   S  d     Li ; i L  S  d     R# i ; i5ir  r   )r  r  s   r   r  ZTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_throw.<locals>.one  sQ      u	    s<   < 
<,<. <)<)<9<9<c               3      <"    ^x   S Rj  xL
   ^x  R#   S  d     Li ; i L  \          d     L#i ; i  S  d     R# i ; i5ir   r  )r  r   s   r   r  ZTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_throw.<locals>.two  sc           s]   A	 * (* ; A	%A	%A	* 8A	8A	AA	AA	Nr  )r-  r`   r   r   rb   r   )r    r  r  r  r   r  s   &  @@@r   9test_delegating_generators_claim_to_be_running_with_throwMTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_throw  sn    	I 				 UBxj	

288E?+ 		S,/s   #A A<&A<c                x   a aa  ! VV 3R  lR4      oV3R lpV! 4       o\        S4       SP                  4        R# )c                   <   <a  ] tR tRt o R tR tVV3R ltRtV tR# )[TestPEP380Operation.test_delegating_generators_claim_to_be_running_with_close.<locals>.MyIti  c                    V # r   r   r   s   &r   r   dTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_close.<locals>.MyIt.__iter__  r   r$   c                    ^*# *   r   r   s   &r   r   dTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_close.<locals>.MyIt.__next__      r$   c                t   < SP                  SP                  4       SP                  \        \        S4       R # r   )
assertTrue
gi_runningrp   r+   r`   )self_r   r    s   &r   r|   aTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_close.<locals>.MyIt.close  s%    .!!*dB7r$   r   N)	r   r   r   r   r   r   r|   r   r   )r   r   r    s   @r   MyItr    s     8 8r$   r  c               3   2   <"   S ! 4        R j  xL
  R #  L5ir   r   )r  s   r   r  ZTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_close.<locals>.one  s     vr   N)r`   r|   )r    r  r  r   s   f @@r   9test_delegating_generators_claim_to_be_running_with_closeMTestPEP380Operation.test_delegating_generators_claim_to_be_running_with_close  s)    	8 	8	UR

r$   c                   a R  oV3R lpR pR pV! V! 4       4       F  pV P                  RV9   4       K  	  V! V! V! 4       4      4       F$  pT P                  RV9   ;'       d    RV9   4       K&  	  R# )c                  b    \         P                  ! 4        U u. uF  q ^,          NK  	  up # u up i )r   )inspectstack)r7  s    r   
call_stackMTestPEP380Operation.test_delegator_is_visible_to_debugger.<locals>.call_stack  s$    ")--/2/QaDD/222s   ,c               3   F   <"   S ! 4       x  S ! 4       x  S ! 4       x  R # 5ir   r   )r  s   r   genFTestPEP380Operation.test_delegator_is_visible_to_debugger.<locals>.gen  s     ,,,s   !c              3   &   "   T  R j  xL
  R #  L5ir   r   rc   s   &r   r   GTestPEP380Operation.test_delegator_is_visible_to_debugger.<locals>.spam       LLr  c              3   &   "   T  R j  xL
  R #  L5ir   r   r  s   &r   r   GTestPEP380Operation.test_delegator_is_visible_to_debugger.<locals>.eggs  r  r  r   r   N)r  )r    r  r   r   r  r  s   &    @r   %test_delegator_is_visible_to_debugger9TestPEP380Operation.test_delegator_is_visible_to_debugger  sl    	3	
		 #%[EOOFeO, ! $su+&EOOFeO??%@ 'r$   c                t   aa  ! R  R4      oVV3R lpRo\        V! 4       4       V P                  S^*4       R# )c                   ,   a  ] tR tRt o R tR tRtV tR# )?TestPEP380Operation.test_custom_iterator_return.<locals>.MyIteri  c                    V # r   r   r   s   &r   r   HTestPEP380Operation.test_custom_iterator_return.<locals>.MyIter.__iter__  r   r$   c                    \        ^*4      hr  )rb   r   s   &r   r   HTestPEP380Operation.test_custom_iterator_return.<locals>.MyIter.__next__  s    #B''r$   r   N)r   r   r   r   r   r   r   r   r   s   @r   MyIterr    s     ( (r$   r  c               3   2   <"   S ! 4        R j  xL
 oR #  L5ir   r   )r  r   s   r   r  <TestPEP380Operation.test_custom_iterator_return.<locals>.gen  s     #X%C%r   N)r   r   )r    r  r  r   s   & @@r   test_custom_iterator_return/TestPEP380Operation.test_custom_iterator_return  s2    	( 	(
	& SUb!r$   c                  a R  oV3R lpR p\        4       ;_uu_ 4        V! 4       pV! 4       pVP                  R4       VP                  V4       VP                  V4       ??\        4        RRR4       R#   + '       g   i     R# ; i)c               3      "   R x  R # 5ir   r   r   r$   r   	innermostDTestPEP380Operation.test_close_with_cleared_frame.<locals>.innermost  s     s   	c               3   :   <"   R x p S! 4        R j  xL
  R #  L5ir   r   )	outer_genr  s    r   rU  @TestPEP380Operation.test_close_with_cleared_frame.<locals>.inner  s     I {""s   c               3   .   "   R x p T  R j  xL
  R #  L5ir   r   )	inner_gens    r   rZ  @TestPEP380Operation.test_close_with_cleared_frame.<locals>.outer  s     I   s   
N)r   ra   r   )r    rU  rZ  r  r  r  s   &    @r   test_close_with_cleared_frame1TestPEP380Operation.test_close_with_cleared_frame  sd    &		#	! \\IINN4 NN9%NN9%L \\\s   AA88B		c                   aa  ! V3R  lR4      oV3R lpV! 4       p\        V4       RoVP                  R4       V P                  SR4       R# )c                   :   <a  ] tR tRt o R tR tV3R ltRtV tR# )HTestPEP380Operation.test_send_tuple_with_custom_generator.<locals>.MyGeni  c                    V # r   r   r   s   &r   r   QTestPEP380Operation.test_send_tuple_with_custom_generator.<locals>.MyGen.__iter__  r   r$   c                    ^*# r  r   r   s   &r   r   QTestPEP380Operation.test_send_tuple_with_custom_generator.<locals>.MyGen.__next__  r  r$   c                   < VoR # r   r   )r    whatr   s   &&r   ra   MTestPEP380Operation.test_send_tuple_with_custom_generator.<locals>.MyGen.send  s    r$   r   N)	r   r   r   r   r   r   ra   r   r   )r   r   s   @r   MyGenr    s      r$   r  c               3   2   <"   S! 4        R j  xL
 p R #  L5ir   r   )r   r  s    r   rZ  HTestPEP380Operation.test_send_tuple_with_custom_generator.<locals>.outer  s      7"A"r   N)rm   r   r      )r`   ra   r   )r    rZ  rc   r  r   s   &  @@r   %test_send_tuple_with_custom_generator9TestPEP380Operation.test_send_tuple_with_custom_generator  sA    	 		#GQ	|L)r$   r   N))r   r   r   r   r"   r3   rF   rQ   re   rr   r~   r   r   r   r   r   r   r   r   r   r   r  r  r   r.  rG  rP  r]  rm  rv  r~  r  r  r  r  r  r  r  r  r   r   r   s   @r   r   r      s     
.>:#J*X'R D'R&P0-1f ",@6H@&!F)V(T-^:<<>4
,4$L A*"%N* *r$   r   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# )TestInterestingEdgeCasesi!  c                "   V P                  \        4      ;_uu_ 4       p\        V4       R R R 4       V P                  XP                  P
                  4       V P                  VP                  P                  4       R #   + '       g   i     L\; ir   )rp   rb   r`   assertIsNone	exceptionr   r   )r    iteratorcaughts   && r   assert_stop_iteration.TestInterestingEdgeCases.assert_stop_iteration#  s^    }--N .&**001&**667 .-s   A>>B	c                .    V P                  \        R 4      # )z ^generator raised StopIteration$assertRaisesRegexrt  r   s   &r   &assert_generator_raised_stop_iteration?TestInterestingEdgeCases.assert_generator_raised_stop_iteration)  s    %%l4WXXr$   c                .    V P                  \        R 4      # )z!^generator ignored GeneratorExit$r  r   s   &r   'assert_generator_ignored_generator_exit@TestInterestingEdgeCases.assert_generator_ignored_generator_exit,  s    %%l4XYYr$   c           	     l	  aaaa \        4       o\        4       o\        4       oVVV3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       VP	                  4        V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  4       ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       R#   + '       g   i     EL~; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELk; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELb; i  + '       g   i     L; i  + '       g   i     R# ; i)c               3       <"   Sx  Sx  S # 5ir   r   returnedyielded_firstyielded_seconds   r   rU  ATestInterestingEdgeCases.test_close_and_throw_work.<locals>.inner5  s       Os   c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   rU  s   r   rZ  ATestInterestingEdgeCases.test_close_and_throw_work.<locals>.outer:       $w&'&   r|   Nthrow GeneratorExitthrow StopIterationthrow BaseExceptionthrow Exception)objectsubTestassertIsr`   r|   r  r   rp   r   r  r  r   rb   r  BaseExceptionr-  	r    rZ  rc   thrownr  rU  r  r  r   s	   &    @@@@r   test_close_and_throw_work2TestInterestingEdgeCases.test_close_and_throw_work/  s7   8	
	( \\'""AMM$q'=1GGI&&q)	 # \\/00AMM$q'=1"_F""=11V 2MM&**F3f..::;&&q) 1 \\/00AMM$q'=1"_F<<>>& ?MM&**66?f..::FFG&&q) 1 \\/00AMM$q'=1"_F""=11V 2MM&**F3f..::;&&q) 1 \\+,,AMM$q'=1[F""9-- .MM&**F3f..::;&&q) -,K #"" 211	 100 ?>> 100 211	 100 .-	 -,,s   
AP/A
P+9P	AP+AQP?	A.Q,A
Q;6Q'	AQ;A
R"R	AR"P	P("	P++P<	?Q
	QQ$	'Q82	Q;;R	RR""R3	c           	     
  aaaaa	 \        4       o\        4       o	\        4       oVVVV	3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       oVP                  4        V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\	        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       R#   + '       g   i     EL'; i  + '       g   i     EL; i  + '       g   i     ELn; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL); i  + '       g   i     R# ; i)c               3   0   <"    Sx  Sx  SS h  S h; i5ir   r   raisedr  r  r   s   r   rU  QTestInterestingEdgeCases.test_close_and_throw_raise_generator_exit.<locals>.innerr  $     ##$$f   	 c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   r  s   r   rZ  QTestInterestingEdgeCases.test_close_and_throw_raise_generator_exit.<locals>.outerz  r  r  r|   Nr  r  r	  r
  )r  r  r  r`   r   r|   r  rp   r   r  r  r   rb   r  r-  )
r    rZ  rc   r  r  rU  r  r  r  r   s
   &    @@@@@r   )test_close_and_throw_raise_generator_exitBTestInterestingEdgeCases.test_close_and_throw_raise_generator_exitl  s   8	 		( \\'""AMM$q'=1"_F GGI&&q) # \\/00AMM$q'=1"_F"_F""=11V 2
 MM&**F3f..::;&&q) 1 \\/00AMM$q'=1"_F"_F""=11V 2MM&**F3MM&**66?f..::FFG&&q) 1 \\/00AMM$q'=1"_F"_F""=11V 2MM&**F3MM&**66?f..::FFG&&q) 1 \\+,,AMM$q'=1"_F[F""=11V 2MM&**F3MM&**66?f..::FFG&&q) -,_ #"" 211 100& 211 100" 211 100" 211 -,,s   AR8;AS S	!AS AT0S4	B
T-AT0T	B
T0>AUU	$B
U8S		S	S  S1	4T?	TT	T-'	T00U	U	UU)	c           	       aaaaa	 \        4       o\        4       o	\        4       oVVVV	3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       oV P                  4       ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  P                  \        4       V P                  VP                  P                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  4       ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  P                  \        4       V P                  VP                  P                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\	        4       pV P                  4       ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  P                  V4       V P                  VP                  P                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  4       ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  P                  V4       V P                  VP                  P                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  4       ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  P                  V4       V P                  VP                  P                  P                  P                  4       V P                  V4       RRR4       R#   + '       g   i     ELk; i  + '       g   i     EL; i  + '       g   i     ELe; i  + '       g   i     EL; i  + '       g   i     EL_; i  + '       g   i     EL; i  + '       g   i     EL]; i  + '       g   i     EL; i  + '       g   i     EL[; i  + '       g   i     R# ; i)c               3   0   <"    Sx  Sx  SS h  S h; i5ir   r   r  s   r   rU  QTestInterestingEdgeCases.test_close_and_throw_raise_stop_iteration.<locals>.inner  r  r  c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   r  s   r   rZ  QTestInterestingEdgeCases.test_close_and_throw_raise_stop_iteration.<locals>.outer  r  r  r|   Nr  r  r	  r
  )r  r  r  r`   rb   r  r|   r  r   r   r   r  r  r   r  r-  
r    rZ  rc   r  r  rU  r  r  r  r   s
   &    @@@@@r   )test_close_and_throw_raise_stop_iterationBTestInterestingEdgeCases.test_close_and_throw_raise_stop_iteration  s   8	 		( \\'""AMM$q'=1"_F<<>>&	 ?MM&**66?!!&"2"2">">"J"JMZf..::FFRRS&&q) # \\/00AMM$q'=1"_F"_F<<>>& ?MM&**66? !!&"2"2">">"J"JMZf..::FFRRS&&q) 1 \\/00AMM$q'=1"_F"_F<<>>& ?MM&**66?MM&**66BBFKf..::FFRRS&&q) 1 \\/00AMM$q'=1"_F"_F<<>>& ?MM&**66?MM&**66BBFKf..::FFRRS&&q) 1 \\+,,AMM$q'=1"_F[F<<>>& ?MM&**66?MM&**66BBFKf..::FFRRS&&q) -,a ?>> #""$ ?>> 100* ?>> 100& ?>> 100& ?>> -,,s   AXX	"B,X/AY >X,	B,Y AY(,Y	>B(Y(AZY<	(B(Z1AZ8 Z$	B(Z8X	XX)	,X=7	Y  Y	Y%	Y((Y9	<Z	ZZ!	$Z5/	Z88[		c           	       aaaaa	 \        4       o\        4       o	\        4       oVVVV	3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       oV P                  \        4      ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  S4       V P                  VP                  P                  \        4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  \        4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\	        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       R#   + '       g   i     EL; i  + '       g   i     ELo; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL&; i  + '       g   i     EL; i  + '       g   i     EL=; i  + '       g   i     R# ; i)c               3   0   <"    Sx  Sx  SS h  S h; i5ir   r   r  s   r   rU  QTestInterestingEdgeCases.test_close_and_throw_raise_base_exception.<locals>.inner  r  r  c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   r  s   r   rZ  QTestInterestingEdgeCases.test_close_and_throw_raise_base_exception.<locals>.outer  r  r  r|   Nr  r  r	  r
  )r  r  r  r`   r  rp   r|   r  r   r   r   r  r  r   rb   r-  r#  s
   &    @@@@@r   )test_close_and_throw_raise_base_exceptionBTestInterestingEdgeCases.test_close_and_throw_raise_base_exception  sP   8	 		( \\'""AMM$q'=1"_F""=11V	 2MM&**F3!!&"2"2">">Nf..::FFG&&q) # \\/00AMM$q'=1"_F"_F""=11V 2MM&**F3 !!&"2"2">">Nf..::FFG&&q) 1 \\/00AMM$q'=1"_F"_F""=11V 2MM&**F3MM&**66?f..::FFG&&q) 1 \\/00AMM$q'=1"_F"_F""=11V 2MM&**F3MM&**66?f..::FFG&&q) 1 \\+,,AMM$q'=1"_F[F""=11V 2MM&**F3MM&**66?f..::FFG&&q) -,[ 211	 #""  211 100& 211 100" 211 100" 211 -,,   A
VV	'BVAW*V/	<BW+AW+?W	B
W+<AXW?	"B
XAX;!X'	3B
X;V	VV,	/W :	WW	W("	W++W<	?X
	XX$	'X82	X;;Y	c           	       aaaaa	 \        4       o\        4       o	\        4       oVVVV	3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       oV P                  \        4      ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  S4       V P                  VP                  P                  \        4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  \        4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \	        4       o\	        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  S4       V P                  VP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       R#   + '       g   i     EL; i  + '       g   i     ELo; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL&; i  + '       g   i     EL; i  + '       g   i     EL=; i  + '       g   i     R# ; i)c               3   0   <"    Sx  Sx  SS h  S h; i5ir   r   r  s   r   rU  LTestInterestingEdgeCases.test_close_and_throw_raise_exception.<locals>.inner_  r  r  c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   r  s   r   rZ  LTestInterestingEdgeCases.test_close_and_throw_raise_exception.<locals>.outerg  r  r  r|   Nr  r  r	  r
  )r  r  r  r`   r-  rp   r|   r  r   r   r   r  r  r   rb   r  r#  s
   &    @@@@@r   $test_close_and_throw_raise_exception=TestInterestingEdgeCases.test_close_and_throw_raise_exceptionY  sP   8	 		( \\'""AMM$q'=1[F""9--	 .MM&**F3!!&"2"2">">Nf..::FFG&&q) # \\/00AMM$q'=1[F"_F""9-- .MM&**F3 !!&"2"2">">Nf..::FFG&&q) 1 \\/00AMM$q'=1[F"_F""9-- .MM&**F3MM&**66?f..::FFG&&q) 1 \\/00AMM$q'=1[F"_F""9-- .MM&**F3MM&**66?f..::FFG&&q) 1 \\+,,AMM$q'=1[F[F""9-- .MM&**F3MM&**66?f..::FFG&&q) -,[ .--	 #""  .-- 100& .-- 100" .-- 100" .-- -,,r-  c           	     
  aaaa \        4       o\        4       o\        4       oVVV3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       V P	                  4       ;_uu_ 4       pVP                  4        RRR4       V P                  XP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P	                  4       ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  VP                  V4      S4       V P                  4       ;_uu_ 4       p\        V4       RRR4       V P                  XP                  P                  V4       V P                  VP                  P                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  VP                  V4      S4       V P!                  \        4      ;_uu_ 4       p\        V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \#        4       pV P                  VP                  V4      S4       V P!                  \"        4      ;_uu_ 4       p\        V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL^; i  + '       g   i     EL4; i  + '       g   i     EL; i  + '       g   i     EL[; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     R# ; i)c               3   4   <"    Sx  Sx  S #   Sx  i ; i5ir   r   r  s   r   rU  BTestInterestingEdgeCases.test_close_and_throw_yield.<locals>.inner  s%     %##$$O %$s    c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   r  s   r   rZ  BTestInterestingEdgeCases.test_close_and_throw_yield.<locals>.outer  r  r  r|   Nr  r  r	  r
  )r  r  r  r`   r  r|   r  r  r   r  r   r   rb   r   r  r  rp   r-  )	r    rZ  rc   r  r  rU  r  r  r   s	   &    @@@@r   test_close_and_throw_yield3TestInterestingEdgeCases.test_close_and_throw_yield  s   8		( \\'""AMM$q'=1 ==??6	 @f..::;&&q) # \\/00AMM$q'=1"_F ==??6 @f..::;&&q) 1 \\/00AMM$q'=1"_FQWWV_n=<<>>&Q ?MM&**66?f..::FFG&&q) 1 \\/00AMM$q'=1"_FQWWV_n=""=11VQ 2MM&**F3f..::;&&q) 1 \\+,,AMM$q'=1[FQWWV_n=""9--Q .MM&**F3f..::;&&q) -,O @?? #""  @?? 100" ?>> 100" 211 100  .-- -,,s   
;RQ9	>R5AR5:R!	>R5+A&SS		A.S,A+TS1	#ATA+T-	T	AT-9R
	RR	!R2,	R55S		S	SS.	1T<	TT	T*$	T--T>	c           	     	  aaaa \        4       o\        4       o\        4       oVVV3R  loV3R lpV P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       VP	                  4        V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  V4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  4       V P                  V4       RRR4       V P                  R4      ;_uu_ 4        V! 4       pV P                  \        V4      S4       \        4       pV P                  \        4      ;_uu_ 4       pVP                  V4       RRR4       V P                  XP                  P                  S4       V P                  VP                  P                  4       V P                  V4       RRR4       R#   + '       g   i     EL; i  + '       g   i     EL$; i  + '       g   i     EL; i  + '       g   i     ELu; i  + '       g   i     EL%; i  + '       g   i     EL; i  + '       g   i     ELl; i  + '       g   i     EL; i  + '       g   i     R# ; i)c               3   2   <"    Sx  Sx  S #     S # ; i5ir   r   r  s   r   rU  CTestInterestingEdgeCases.test_close_and_throw_return.<locals>.inner  s,     ##$$ OOs    c               3   .   <"   S ! 4        R j  xL
 #  L5ir   r   r  s   r   rZ  CTestInterestingEdgeCases.test_close_and_throw_return.<locals>.outer  r  r  r|   Nr  r  r	  r
  )r  r  r  r`   r|   r  r   rp   r   r  r  r   rb   r   r  r-  r  s	   &    @@@@r   test_close_and_throw_return4TestInterestingEdgeCases.test_close_and_throw_return  sF   8		( \\'""AMM$q'=1 GGI&&q) # \\/00AMM$q'=1"_F ""=11V 2MM&**F3f..::;&&q) 1 \\/00AMM$q'=1"_F""=11V 2MM&**00(;f..::;&&q) 1 \\/00AMM$q'=1"_F""=11V 2MM&**00(;f..::;&&q) 1 \\+,,AMM$q'=1[F""=11V 2MM&**00(;f..::;&&q) -,Q #"" 211 100  211	 100 211	 100 211	 -,,s   
AP/A
P:9P&	AP:A
Q"Q	"A$Q"'A
R
1Q6	A$R
A
R2R	$A$R2P#	&P71	P::Q	Q	Q""Q3	6R	R

R	R/)	R22S	c                   a  ! R  R4      oV3R lpV P                  \        R4      ;_uu_ 4        \        \        V! 4       4      4       RRR4       R#   + '       g   i     R# ; i)c                   &   a  ] tR tRt o R tRtV tR# );TestInterestingEdgeCases.test_throws_in_iter.<locals>.Sillyi4  c                    \        R 4      h)&nobody expects the spanish inquisition)rt  r   s   &r   r   DTestInterestingEdgeCases.test_throws_in_iter.<locals>.Silly.__iter__5  s    "#KLLr$   r   N)r   r   r   r   r   r   r   r   s   @r   SillyrE  4  s     M Mr$   rI  c               3   2   <"   S ! 4        R j  xL
  R #  L5ir   r   )rI  s   r   my_generatorBTestInterestingEdgeCases.test_throws_in_iter.<locals>.my_generator8  s     wr   rG  N)r  rt  r`   iter)r    rK  rI  s   & @r   test_throws_in_iter,TestInterestingEdgeCases.test_throws_in_iter1  sI    	M 	M	 ##L2Z[[ln%& \[[[s   AA%	r   N)r   r   r   r   r  r  r  r  r  r$  r+  r3  r:  rA  rN  r   r   r   s   @r   r  r  !  sP     8YZ;*zJ*XQ*fL*\L*\E*NA*F' 'r$   r  __main__)unittestr  test.supportr   r   r   testr   TestCaser   r  r   mainr   r$   r   <module>rV     sX      @ @ O*(++ O*b ['x00 ['| zMMO r$   