+
    Bi*                        ^ 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 ]P                  ! ]
! ]R4      R4      ]P                  ! ]P                  R8H  R4       ! R R]P                  4      4       4       t]P                  ! ]
! ]R4      R4      ]P                  ! ]P                  R8H  R4       ! R	 R
]4      4       4       t]P                  ! ]
! ]R4      R4      ]P                  ! ]P                  R8H  R4       ! R R]4      4       4       t]P                  ! ]
! ]R4      R4      ]P                  ! ]P                  R8H  R4       ! R R]4      4       4       t]R8X  d   ]P&                  ! 4        R# R# )    N)supportkillzTest requires os.killwin32zTest cannot run on Windowsc                      a  ] tR t^t o Rt^tR tR tR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V tR# )	TestBreakNc                    \         P                  ! \         P                  4      V n        V P                  e2   \         P                   ! \         P                  V P                  4       R # R # N)signal	getsignalSIGINT_default_handlerint_handlerselfs   &4/usr/lib/python3.14/test/test_unittest/test_break.pysetUpTestBreak.setUp   sB     & 0 0 ?'MM&--)9)9: (    c                    \         P                   ! \         P                  V P                  4       \        P                  ! 4       \
        P                  n        R \
        P                  n        R # r	   )	r
   r   r   weakrefWeakKeyDictionaryunittestsignals_results_interrupt_handlerr   s   &r   tearDownTestBreak.tearDown   s?    fmmT%:%:;$+$=$=$?!.2+r   c                   \         P                  ! R R7      '       g   ^pMVf   V P                  p\        V4       Fb  pV P	                  VR7      ;_uu_ 4        V^ 8w  d   V P                  4         V! 4        W2^,
          8w  d   V P                  4        RRR4       Kd  	  R#   Y2^,
          8w  d   T P                  4        i i ; i  + '       g   i     K  ; i)T)cpythonN)repeat)r   check_impl_detaildefault_repeatsrangesubTestr   r   )r   test_functionrepeatsr    s   &&& r   withRepeatsTestBreak.withRepeats   s    ((66 G_**GGnFV,, Q;JJL(!O1, -, % 1, - -,,s$   C2B$9C$ C	CCc                    \         P                  ! \         P                  4      p\        P                  ! 4        V P                  \         P                  ! \         P                  4      V4        \        P                  ! 4       p\        P                  ! V\         P                  4       V P                  \        P                  P                  P                  4       R#   \         d    T P                  R 4        LSi ; izKeyboardInterrupt not handledN)r
   r   r   r   installHandlerassertNotEqualosgetpidr   KeyboardInterruptfail
assertTruer   r   called)r   default_handlerpids   &  r   testInstallHandlerTestBreak.testInstallHandler4   s     **6==9!F,,V]];_M	7))+CGGC' 	((;;BBC ! 	7II56	7s   /:C C=<C=c                h   \         P                  ! 4       pV P                  V\         P                  P                  4       \         P
                  ! V4        V P                  V\         P                  P                  4       \         P                  ! V4       R #   \         P                  ! T4       i ; ir	   )r   
TestResultassertNotInr   r   registerResultassertInremoveResult)r   results   & r   testRegisterResultTestBreak.testRegisterResultA   sv    $$&!1!1!:!:;'	*MM&("2"2";";<!!&)H!!&)s   *B B1c                F   a a V 3R  loV V3R lpS P                  V4       R# )c                    < \         P                  ! 4       p\         P                  ! V\        P                  4       R V n        SP                  V P                  4       R# )TN)r-   r.   r   r
   r   breakCaughtr1   
shouldStopr=   r4   r   s   & r   test+TestBreak.testInterruptCaught.<locals>.testL   s:    ))+CGGC'!%FOOF--.r   c                    < \         P                  ! 4       p \         P                  ! 4        \         P                  ! V 4       SP	                  \
        P                  ! \
        P                  4      SP                  4        S! V 4       SP                  V P                  4       R#   \         d    SP                  R 4        L;i ; ir*   )r   r8   r+   r:   r,   r
   r   r   r   r/   r0   r1   rB   r=   r   rE   s    r   r%   4TestBreak.testInterruptCaught.<locals>.test_functionR   s    ((*F##%##F+  /%%
;V OOF../ % ;		9:;s   B& &CCNr'   r   r%   rE   s   f @r   testInterruptCaughtTestBreak.testInterruptCaughtK   s    	/	0 	'r   c                   a a \         P                  ! \         P                  4      \         P                  8X  d   S P	                  R 4       V 3R loV V3R lpS P                  V4       R# )&test requires SIGINT to not be ignoredc                 ,  < \         P                  ! 4       p\         P                  ! V\        P                  4       R V n        SP                  V P                  4       \         P                  ! V\        P                  4       SP                  R4       R# )Tz#Second KeyboardInterrupt not raisedN)	r-   r.   r   r
   r   rB   r1   rC   r0   rD   s   & r   rE   +TestBreak.testSecondInterrupt.<locals>.testi   sY    ))+CGGC'!%FOOF--.GGC'II;<r   c                  @  < \         P                  ! 4       p \         P                  ! 4        \         P                  ! V 4       SP	                  \
        4      ;_uu_ 4        S! V 4       R R R 4       SP                  V P                  4       R #   + '       g   i     L-; ir	   )r   r8   r+   r:   assertRaisesr/   r1   rB   rH   s    r   r%   4TestBreak.testSecondInterrupt.<locals>.test_functionq   sd    ((*F##%##F+""#455V 6OOF../ 65s   	BB	Nr
   r   r   SIG_IGNskipTestr'   rK   s   f @r   testSecondInterruptTestBreak.testSecondInterruptc   sG     FMM*fnn<MMBC	=	0 	'r   c                6   a  V 3R  lpS P                  V4       R# )c                    < \         P                  ! 4        \         P                  ! 4       p \         P                  ! V 4       \        P
                  ! \        P                  4      p\         P                  ! 4       p\         P                  ! V4       SP                  \        P
                  ! \        P                  4      V4       \         P                  ! 4       p \        P                  ! \        P                  ! 4       \        P                  4       SP                  V P                  4       SP                  VP                  4       SP                  VP                  4       R#   \         d    SP                  R 4        Lqi ; ir*   )r   r+   r8   r:   r
   r   r   assertEqualr-   r   r.   r/   r0   r1   rC   assertFalse)r=   new_handlerresult2result3r   s       r   r%   /TestBreak.testTwoResults.<locals>.test_function}   s    ##%((*F##F+ **6==9K))+G##G,V--fmm<kJ))+G;		V]]3 OOF--.OOG../W//0 % ;		9:;s   8E& &FFNrJ   r   r%   s   f r   testTwoResultsTestBreak.testTwoResults|   s    	1* 	'r   c                   a  \         P                  ! \         P                  4      \         P                  8X  d   S P	                  R 4       V 3R lpS P                  V4       R# )rO   c                    <a \         P                  ! 4        \        P                  ! \        P                  4      oV3R  lp \        P                  ! \        P                  V 4        \
        P                  ! \
        P                  ! 4       \        P                  4       SP                  R4       R#   \         d     R# i ; i)c                    < S! W4       R # r	    )framesignumhandlers   &&r   r^   RTestBreak.testHandlerReplacedButCalled.<locals>.test_function.<locals>.new_handler   s    &r   z6replaced but delegated handler doesn't raise interruptN)
r   r+   r
   r   r   r-   r   r.   r0   r/   )r^   rk   r   s    @r   r%   =TestBreak.testHandlerReplacedButCalled.<locals>.test_function   s}     ##%&&v}}5G'MM&--5T		V]]3 		RS % s   (8B3 3CCNrU   rb   s   f r   testHandlerReplacedButCalled&TestBreak.testHandlerReplacedButCalled   sC     FMM*fnn<MMBC	T" 	'r   c                    \         P                  ! \        P                  ! 4       R 7      pVP	                  \         P
                  ! 4       4      pV P                  V\         P                  P                  4       R# ))streamN)	r   TextTestRunnerioStringIOrun	TestSuiter;   r   r   )r   runnerr=   s   &  r   
testRunnerTestBreak.testRunner   sK     ((>H..01fh..778r   c                
   \         P                  ! 4       p\         P                  ! V4       \        P                  ! V4      p?\
        P                  ! 4        \
        P                  ! 4        V P                  V! 4       4       R # r	   )r   r8   r:   r   refgccollectassertIsNone)r   r=   r{   s   &  r   testWeakReferencesTestBreak.testWeakReferences   sR    $$&'kk&! 	

RZZ\#% r   c                   \         P                  ! 4       p\         P                  ! V4       \         P                  ! 4        V P	                  \         P
                  ! V4      4       V P                  \         P
                  ! \         P                  ! 4       4      4        \        P                  ! 4       p\        P                  ! V\        P                  4       V P                  VP                  4       R #   \         d     L*i ; ir	   )r   r8   r:   r+   r1   r<   r]   r-   r.   r   r
   r   r/   rC   )r   r=   r4   s   &  r   testRemoveResultTestBreak.testRemoveResult   s    $$&'!--f56 	..x/B/B/DEF	))+CGGC' 	**+ ! 		s   :C6 6DDc                  aaaaa \        4       o\        4       o\        4       o\        4       o\        P                  ! \        P                  4      p ! V3R  lR\         4      o ! VVVV3R lR\        P
                  4      pV! R4      pVP                  4        V P                  SP                  RRRRSRSR	RR
RRR/3.4       V P                  SP                  S.4       V P                  VP                  S4       V P                  \        P                  ! \        P                  4      V4       . Sn        . Sn	        V! R4      pVP                  4        V P                  SP                  RRRRSRSR	RR
RRR/3.4       V P                  SP                  S.4       V P                  VP                  S4       V P                  \        P                  ! \        P                  4      V4       R# )c                   <   <a  ] tR t^t o . t. tR tV3R ltRtV t	R# )5TestBreak.testMainInstallsHandler.<locals>.FakeRunnerc                >    V P                   P                  W34       R # r	   )initArgsappend)r   argskwargss   &*,r   __init__>TestBreak.testMainInstallsHandler.<locals>.FakeRunner.__init__   s    $$d^4r   c                >   < V P                   P                  V4       S# r	   )runArgsr   )r   rE   r=   s   &&r   ru   9TestBreak.testMainInstallsHandler.<locals>.FakeRunner.run   s    ##D)r   rh   N)
__name__
__module____qualname____firstlineno__r   r   r   ru   __static_attributes____classdictcell__)__classdict__r=   s   @r   
FakeRunnerr      s     HG5 r   r   c                   4   <a  ] tR t^t o VVVV3R ltRtV tR# )2TestBreak.testMainInstallsHandler.<locals>.Programc                   < R V n         SV n        SV n        Wn        R V n        SV n        SV n        RV n        RV n        R# )FN)	exit	verbosityfailfast
catchbreak	tb_localsrx   rE   r=   	durations)r   r   r   r   rE   r   s   &&r   r   ;TestBreak.testMainInstallsHandler.<locals>.Program.__init__   s@    !	!* (",!&", 	"!%r   )	r   r   r   r   r=   r   rE   rx   r   N)r   r   r   r   r   r   r   )r   r   r   rE   r   s   @r   Programr      s     	& 	&r   r   FbufferNr   r   r   warningsr   Trh   )objectr
   r   r   r   TestProgramrunTestsr\   r   r   r=   r,   )	r   r3   r   pr   r   r=   rE   r   s	   &   @@@@@r   testMainInstallsHandler!TestBreak.testMainInstallsHandler   s   8xH	 **6==9	 	
	& 
	&h** 
	& EN	

,,Xt5@)5?5@%5?5@$5H 0I /J 	K 	++dV46*))&--8/J 

DM	

,,Xt5@)5?5@%5?5@$5H 0I /J 	K 	++dV46*F,,V]];_Mr   c                   \         P                  ! \         P                  4      p\        P                  ! 4        \        P
                  ! 4        V P                  \         P                  ! \         P                  4      V4       \        P
                  ! 4        V P                  \         P                  ! \         P                  4      V4       R # r	   )r
   r   r   r   r+   removeHandlerr\   )r   r3   s   & r   testRemoveHandlerTestBreak.testRemoveHandler  sz     **6==9! ))&--8/J 	 ))&--8/Jr   c                &  a a \         P                  ! \         P                  4      o\        P                  ! 4        \        P
                  VV 3R  l4       pV! 4        S P                  \         P                  ! \         P                  4      S4       R# )c                  p   < SP                  \        P                  ! \        P                  4      S 4       R # r	   )r\   r
   r   r   )r3   r   s   r   rE   4TestBreak.testRemoveHandlerAsDecorator.<locals>.test  s"    V--fmm<oNr   N)r
   r   r   r   r+   r   r,   )r   rE   r3   s   f @r   testRemoveHandlerAsDecorator&TestBreak.testRemoveHandlerAsDecorator  sc     **6==9!				O 
 	O 	F,,V]];_Mr   )r   r	   )r   r   r   r   r   r"   r   r   r'   r5   r>   rL   rX   rc   rn   rx   r   r   r   r   r   r   r   )r   s   @r   r   r      si      K O;
3(*D*(0(2(2(29
!,$8NtK	N 	Nr   r   c                   .    ] tR tRt]P
                  tRtR# )TestBreakDefaultIntHandleri$  rh   N)r   r   r   r   r
   default_int_handlerr   r   rh   r   r   r   r   $  s     ,,Kr   r   c                   .    ] tR tRt]P
                  tRtR# )TestBreakSignalIgnoredi)  rh   N)r   r   r   r   r
   rV   r   r   rh   r   r   r   r   )       ..Kr   r   c                   .    ] tR tRt]P
                  tRtR# )TestBreakSignalDefaulti.  rh   N)r   r   r   r   r
   SIG_DFLr   r   rh   r   r   r   r   .  r   r   r   __main__)r|   rs   r-   sysr
   r   r   rE   r   
skipUnlesshasattrskipIfplatformTestCaser   r   r   r   r   mainrh   r   r   <module>r      s~   	 	 	 
     
WR(*AB	')EFTN!! TN G CTNl 
WR(*AB	')EF- - G C- 
WR(*AB	')EF!Y ! G C! 
WR(*AB	')EF!Y ! G C! zMMO r   