+
    '(j\                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^RIHt ^RIHt ^RIHt  ! R R]4      t	]
R8X  d   ]P                  ! 4        R# R# )    N)WIN)TestCase)_test_extension_cppc                   v   a  ] tR t^t o R tR tR tR t]P                  ! ]
R4      R 4       tR tR tR	tV tR
# )CPPTestsc                "   . p\        ^4       FI  p\        P                  ! \        P                  4      pVP	                  V4       VP                  V4       KK  	  \        V4       F%  w  r#V P                  VP	                  4       V4       K'  	  R# )   N)rangegreenletr   test_exception_switchswitchappend	enumerateassertEqual)self	greenletsigs   &   L/home/ubuntu/cf-venv/lib/python3.14/site-packages/greenlet/tests/test_cpp.pyr   CPPTests.test_exception_switch   sn    	qA!!"5"K"KLAHHQKQ  i(DAQXXZ+ )    c                ~   ^ RI p^ RIpVP                  P                  VP                  P	                  \
        4      R4      pVP                  T\        V\        4      '       g   VP                  MT.pTpV P                  \        P                  4      ;_uu_ 4       p\        P                  ! VR\        P                  R7       RRR4       XP                  pV P!                  4       p	V P#                  VP$                  V	4       V P#                  RVP&                  4       VP&                  #   + '       g   i     Lp; i)r   Nzfail_cpp_exception.pyzutf-8)encodingstderrzfail_cpp_exception is running)ossyspathjoindirname__file__
executable
isinstancestr__name__assertRaises
subprocessCalledProcessErrorcheck_outputSTDOUT	exception,get_expected_returncodes_for_aborted_processassertIn
returncodeoutput)
r   targetr   r   scriptargs__traceback_info__excexexpected_exits
   &&        r   _do_test_unhandled_exception%CPPTests._do_test_unhandled_exception   s    GGOOH%#
 z&RU?V?V\bc!z<<==## !(( > ]]IIKbmm]35ryyAyy >=s   (D,,D<	c                D    V P                  \        P                  4       R # N)r6   r   test_exception_throw_nonstdr   s   &r   &test_unhandled_nonstd_exception_aborts/CPPTests.test_unhandled_nonstd_exception_aborts.   s    ))*=*Y*YZr   c                D    V P                  \        P                  4       R # r9   )r6   r   test_exception_throw_stdr;   s   &r   #test_unhandled_std_exception_aborts,CPPTests.test_unhandled_std_exception_aborts2   s    ))*=*V*VWr   z#XXX: This does not crash on Windowsc                L    V P                  R 4      pV P                  RV4       R# )run_as_greenlet_targetzThrown from an extension.N)r6   r,   )r   r.   s   & r   8test_unhandled_std_exception_as_greenlet_function_abortsACPPTests.test_unhandled_std_exception_as_greenlet_function_aborts6   s)     223KL
 (	
r   c                (    V P                  R 4       R# )*run_unhandled_exception_in_greenlet_abortsN)r6   r;   s   &r   +test_unhandled_exception_in_greenlet_aborts4CPPTests.test_unhandled_exception_in_greenlet_abortsD   s    ))*VWr   c                   R  p\         P                  ! 4        \        P                  ! R4      p\	        R4       F?  pV P                  \        4      ;_uu_ 4        \        P                  ! V4       RRR4       KA  	  \         P                  ! 4        \        P                  ! R4      pWB,
          pV P                  ^ V4       R#   + '       g   i     K  ; i)c                      \        R 4      h)boom)
ValueError r   r   raiserECPPTests.test_leak_test_exception_switch_and_do_in_g2.<locals>.raiserJ   s    V$$r   r   i  N)
gccollectobjgraphcountr
   r%   rM   r   "test_exception_switch_and_do_in_g2r   )r   rO   before_afterleakeds   &     r   ,test_leak_test_exception_switch_and_do_in_g25CPPTests.test_leak_test_exception_switch_and_do_in_g2I   s    	% 	


+tA"":..#FFvN /.  	

z*F# /..s   CCrN   N)r$   
__module____qualname____firstlineno__r   r6   r<   r@   unittestskipIfr   rD   rH   rZ   __static_attributes____classdictcell__)__classdict__s   @r   r   r      sL     ,.[X __S?@

 A

X
$ $r   r   __main__)rQ   r&   r_   r   rS    r   r   r   r   r$   mainrN   r   r   <module>rg      sD    	       !J$x J$Z zMMO r   