+
    Bih                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHtHt ^ RIHt ^RIHt ]	P(                  ! R4      tRt ! R	 R
]4      t ! R R]P2                  4      t ! R R]P2                  4      t ! R R]P2                  4      t ! R R]4      t ! R R]P2                  4      t ! R R]]P2                  4      t ]!R8X  d   ]PD                  ! 4        R# R# )    N)support)import_helper)TESTFNTESTFN_UNDECODABLE)assert_python_failureassert_python_ok)ExceptionIsLikeMixin)decode_stderr	_testcapic                       ] tR t^tRtR# )CustomError N__name__
__module____qualname____firstlineno____static_attributes__r       5/usr/lib/python3.14/test/test_capi/test_exceptions.pyr   r      s    r   r   c                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )Test_Exceptionsc                   \        R 4      p\        R4      p Vh  \          d   p\        P                  ! 4       p\
        P                  T4      p\        P                  ! 4       p\
        P                  T4      p\        P                  ! 4       pT P                  YS4       T P                  YQ4       T P                  YE4       T P                  Y4       T P                  Yr4       T P                  Yg4        Rp?R# Rp?ii ; i5TESTN)
ValueError	TypeErrorfailsys	exceptionr   set_exceptionassertEqual)	selfraised_exceptionnew_exceorig_sys_exceptionorig_exceptionnew_sys_exceptionnew_exceptionreset_sys_exceptions	   &        r   test_exceptionTest_Exceptions.test_exception   s    %c?F#	."" 	?!$&44W=N #%33NCM"%--/^/^>/@0A]4.>>	?s    C?CC::C?c                v   \        R 4      p\        R4      p Vh  \          Ed   pTP                  p\        P
                  ! 4       p\        P                  TP                  TR4      p\        P
                  ! 4       p\        P                  ! T!  p\        P
                  ! 4       p	T P                  T^,          T4       T P                  YaP                  Y34       T P                  YV4       T P                  Y4       T P                  YP                  TR34       T P                  Yx4        Rp?R# Rp?ii ; ir   )r   r   
assertTrue__traceback__r    exc_infor   set_exc_info	__class__r#   assertSequenceEqual)
r$   r%   r&   r'   tborig_sys_exc_infoorig_exc_infonew_sys_exc_infonew_exc_inforeset_sys_exc_infos
   &         r   test_exc_infoTest_Exceptions.test_exc_info1   s   %c?F#	#"" 	EB #%2273D3DgtTM"||~$11=AL!$]1-q1$$]5O5OQa4fg$$%6F$$%7G$$\4E4EwPT3UV$$%5DD	Es    D8DD33D8c                    \         P                  ! R 4      p\        RV4      pVP                  P	                  4       pV P                  VRR.4       R# )z            import _testcapi

            def foo():
                _testcapi.function_set_warning()

            foo()  # line 6


            foo()  # line 9
        -cs0   <string>:6: RuntimeWarning: Testing PyErr_WarnExs0   <string>:9: RuntimeWarning: Testing PyErr_WarnExNtextwrapdedentr   err
splitlinesr#   r$   codeprocwarningss   &   r   test_warn_with_stacklevel)Test_Exceptions.test_warn_with_stacklevelH   sP     
  
  d+88&&(??$
 	r   c                    \         P                  ! R 4      p\        RV4      pVP                  P	                  4       pV P                  VR.4       R# )z            import _testcapi

            class Foo:
                def foo(self):
                    _testcapi.function_set_warning()
                def __del__(self):
                    self.foo()

            ref = Foo()
        r?   s0   <string>:7: RuntimeWarning: Testing PyErr_WarnExNr@   rE   s   &   r   test_warn_during_finalization-Test_Exceptions.test_warn_during_finalization[   sO     
  
  d+88&&( 	?$
 	r   r   N)
r   r   r   r   r-   r<   rI   rL   r   __classdictcell____classdict__s   @r   r   r      s     .,#.& r   r   c                   X   a  ] tR t^pt o RR lt]P                  ! 4       R 4       tRtV t	R# )Test_FatalErrorc                   \         P                  ! 4       ;_uu_ 4        \        R RV4      w  rEpRRR4       \        X4      pV P	                  RV4       \
        P                  ! RV\
        P                  4      pV'       g   V P                  RV: 24       \        VP                  ^4      P                  4       P                  R4      4      p\        VP                  ^4      4      p	V F  p
V P	                  W4       K  	  V F  p
V P                  W4       K  	  V P                  \!        V4      V	4       R#   + '       g   i     EL; i)z-sSIr?   Nz8Fatal Python error: _testcapi_fatal_error_impl: MESSAGE
z,^Extension modules:(.*) \(total: ([0-9]+)\)$z$Cannot find 'Extension modules:' in z, )r   SuppressCrashReportr   r
   assertInresearch	MULTILINEr   setgroupstripsplitintassertNotInr#   len)r$   rF   expectednot_expectedrcoutrC   matchmodulestotalnames   &&&&       r   check_fatal_error!Test_FatalError.check_fatal_errorr   s    ((**0tDLBS + C Q	 		Ir||-II<SGDEekk!n**,22489EKKN#DMM$(  DT+ !Wu-% +**s   D99E
	c                d    RpRpRpV P                  W1V4       RpRpRpV P                  W14       R# )r   z8import _testcapi, sys; _testcapi.fatal_error(b"MESSAGE")zif True:
            import _testcapi, sys
            sys.stdlib_module_names = frozenset({"_testcapi"})
            _testcapi.fatal_error(b"MESSAGE")
        N)r   )r    )rh   )r$   r`   ra   rF   s   &   r   test_fatal_error Test_FatalError.test_fatal_error   sF     "It|< %
 	t.r   r   N)r   )
r   r   r   r   rh   r   requires_subprocessrk   r   rN   rO   s   @r   rR   rR   p   s'     .*   "/ #/r   rR   c                   V   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V tR# )Test_ErrSetAndRestorec                F   V P                  \        4      ;_uu_ 4        \        P                  \        4       4       R R R 4       \        4       p \        P                  V4       R #   + '       g   i     L2; i  \         d   pT P	                  Y4        R p?R # R p?ii ; iN)assertRaisesr   r   err_set_raisedassertIs)r$   vexs   &  r   test_err_set_raised)Test_ErrSetAndRestore.test_err_set_raised   sk    z**$$Z\2 +L	!$$Q'	 +*
  	!MM!  	!s#   A&A9 &A6	9B BB c                   V P                  \        4      ;_uu_ 4        \        P                  \        4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  \        ^4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  \        ^R 4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  \        \        4       4       R R R 4        \        P                  \        R4        ^^ ,           V P                  \        4      ;_uu_ 4        \        P                  \        ^X4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  \        ^^ 4       R R R 4        \        P                  \        ^X4       R #   + '       g   i     EL; i  + '       g   i     ELs; i  + '       g   i     ELF; i  + '       g   i     EL; i  \         d/   pT P                  RTP                  ^ ,          4        R p?EL.R p?ii ; i  \         d   pTP                  p R p?ELIR p?ii ; i  + '       g   i     EL!; i  + '       g   i     L; i  \         dU   pT P                  ^TP                  ^ ,          4       T P                  XTP                  P                  4        R p?R # R p?ii ; i)Nhi)rr   r   r   err_restoreKeyErrorr#   args	Exceptionr1   r   rt   tb_next)r$   kr'   r6   ru   s   &    r   test_err_restore&Test_ErrSetAndRestore.test_err_restore   s   z**!!*- +z**!!*a0 +z**!!*a6 +z**!!*jl; +	.!!(D1	!aC z**!!*a4 +y))!!*a3 *	7!!*a4+ +***********  	.T166!9--	.  	!B	!***))  	7Qq	*MM"aoo5566	7s   GG"G6#H

H %	I I?J1J& G	"G3	6H	
H	I)#III<%I77I<?J	J#	&L1A	L  Lc           
     B   V P                  \        4      ;_uu_ 4       p\        P                  \        ^*4       RRR4       V P	                  XP
                  P                  R4       V P                  \        4      ;_uu_ 4       p\        P                  \        \        ^^^4      4       RRR4       VP
                  P                  ^ ,          pV P                  V\        4       V P	                  VP                  R4       V P                  \        4      ;_uu_ 4       p\        P                  \        \        ^4      4       RRR4       V P	                  VP
                  P                  R	4        ! R R\        4      p ! R R\        VR7      pV P                  \        4      ;_uu_ 4       p\        P                  WD! 4       4       RRR4       R#   + '       g   i     EL; i  + '       g   i     ELE; i  + '       g   i     L; i  + '       g   i     R# ; i)
*   Nc                   &   a  ] tR t^t o R tRtV tR# )3Test_ErrSetAndRestore.test_set_object.<locals>.Metac                    ^^ ,           R# )   Nr   )clssubs   &&r   __subclasscheck__ETest_ErrSetAndRestore.test_set_object.<locals>.Meta.__subclasscheck__   s    !r   r   N)r   r   r   r   r   r   rN   rO   s   @r   Metar      s      r   r   c                       ] tR t^tRtR# )5Test_ErrSetAndRestore.test_set_object.<locals>.Brokenr   Nr   r   r   r   Brokenr      s    r   r   )	metaclass)r   )r         )   )rr   r   r   exc_set_objectr#   r!   r}   r   assertIsInstancePermissionErrorOSErrortyper~   ZeroDivisionError)r$   r'   wrappedr   r   s   &    r   test_set_object%Test_ErrSetAndRestore.test_set_object   sq    z**a$$Z4 +))51 z**a$$Z1Qq1AB +++""1%gy1y1 //1$$Wob.AB 0))51	4 		Y$ 	 011Q$$VVX6 21/ +**
 +** 0/ 211s/   G&G&$G:-HG#	&G7	:H
	H	c                |    ! R  R\         4      p\        P                  VR4      pV P                  V\        4       V P                  VP                  ^ ,          R4        ! R R4      p\        P                  W! 4       4      pV P                  V\        4       V P                  VP                  ^ ,          R4       R# )c                   &   a  ] tR t^t o R tRtV tR# )?Test_ErrSetAndRestore.test_set_object_and_fetch.<locals>.Brokenc                    \        R 4      h)zBroken __init__)r   )r$   args   &*r   __init__HTest_ErrSetAndRestore.test_set_object_and_fetch.<locals>.Broken.__init__   s     !233r   r   N)r   r   r   r   r   r   rN   rO   s   @r   r   r      s     4 4r   r   abcdz-Normalization failed: type=Broken args='abcd'c                   &   a  ] tR t^t o R tRtV tR# )?Test_ErrSetAndRestore.test_set_object_and_fetch.<locals>.BadArgc                    \        R 4      h)zBroken arg type)r   r$   s   &r   __repr__HTest_ErrSetAndRestore.test_set_object_and_fetch.<locals>.BadArg.__repr__   s     122r   r   N)r   r   r   r   r   r   rN   rO   s   @r   BadArgr      s     3 3r   r   z0Normalization failed: type=Broken args=<unknown>N)r~   r   exc_set_object_fetchr   r   r#   	__notes__)r$   r   excr   s   &   r   test_set_object_and_fetch/Test_ErrSetAndRestore.test_set_object_and_fetch   s    	4Y 	4 ,,VV<c:.q)H	J	3 	3 ,,VVX>c:.q)K	Mr   c                   \         P                  pV P                  \        4      ;_uu_ 4       pV! \        R4       RRR4       V P	                  XP
                  P                  R4       V P                  \        4      ;_uu_ 4       pV! \        RP                  4       4       RRR4       V P	                  VP
                  P                  R4       V P                  \        4      ;_uu_ 4        V! \        R4       RRR4       V P                  \        V\        R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LT; i)zTest PyErr_SetString()   errorN   помилка   )errorr   )r   err_setstringrr   r   r#   r!   r}   encodeUnicodeDecodeErrorSystemErrorlist)r$   	setstringr'   s   &  r   test_set_string%Test_ErrSetAndRestore.test_set_string   s    ++	011Q'2 2)):6011Q')9)@)@)BC 2))+>?122'1 3+y$A 21 21 32s#   D"D5.E"D2	5E	E	c           
        \         P                  ! R4       ^ RIHpHpHpHp Rp\        W4      pW#3Vn        W&n	        V P                  \        4      ;_uu_ 4       pV! \        RRV! ^*4      4       RRR4       V P                  XP                  P                  R4       V P                  \        4      ;_uu_ 4       pV! \        RRP                  4       4       RRR4       V P                  VP                  P                  R4       V P!                  \"        R	4      ;_uu_ 4        V! \        R
V! R4      4       RRR4       V P!                  \$        R4      ;_uu_ 4        V! \        R4       RRR4       V P                  \&        V\(        R4       R#   + '       g   i     EL,; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lh; i)zTest PyErr_Format()ctypes)	pythonapi	py_objectc_char_pc_intPyErr_Formats   %s %dr   Ns   %sr   znot in ranges   %czformat stringr   )zerror 42r   )r   import_moduler   r   r   r   r   getattrargtypesrestyperr   r   r#   r!   r}   r   assertRaisesRegexOverflowErrorr   r   r   )r$   r   r   r   r   rg   r   r'   s   &       r   test_format!Test_ErrSetAndRestore.test_format  sO   ##H-@@y/!* 6(011Q*Hhb	J 2))=9011Q*E3C3J3J3LM 2))+>?##M>BB*E59= C##J@@*G4 A+|T8D 211 21 CB@@s0   F<F(%F; GF%	(F8	;G	G	c           	     4   \         P                  p\        P                  pV P	                  \
        4      ;_uu_ 4       pV! V\        R4       RRR4       V P                  XP                  P                  VR34       V P                  VP                  P                  V4       V P                  VP                  P                  R4       V P	                  \
        4      ;_uu_ 4       pV! V\        \        P                  ! \        4      4       RRR4       V P                  VP                  P                  \        4       \        '       dw   V P	                  \
        4      ;_uu_ 4       pV! V\        \        4       RRR4       V P                  VP                  P                  \        P                  ! \        4      4       V P	                  \
        4      ;_uu_ 4       pV! V\        \         4       RRR4       V P#                  VP                  P                  4       V P	                  \        4      ;_uu_ 4       pV! ^ \        R4       RRR4       V P                  VP                  P                  R4       V P                  VP                  P                  ^ 4       V P                  VP                  P                  R4       V P	                  \$        4      ;_uu_ 4       pV! V\$        R4       RRR4       V P                  VP                  P                  VRR34       R#   + '       g   i     EL; i  + '       g   i     EL3; i  + '       g   i     EL; i  + '       g   i     ELw; i  + '       g   i     EL2; i  + '       g   i     L; i)z%Test PyErr_SetFromErrnoWithFilename()s   fileNzNo such file or directoryfile)r   Error)r   err_setfromerrnowithfilenameerrnoENOENTrr   FileNotFoundErrorr   r#   r!   r}   filenameosfsencoder   r   fsdecodeNULLassertIsNoner   )r$   setfromerrnowithfilenamer   r'   s   &   r   test_setfromerrnowithfilename3Test_ErrSetAndRestore.test_setfromerrnowithfilename  sq   #,#I#I 011Q$VWg> 2)) "=>	@**F3--v6011Q$VWbkk&6IJ 2--v6""#455(:LM 6Q[[11[[);<> 011Q$VWd; 2!++../w''1$Q9 ())<8**A.--v6011Q$V->H 2)) "=vF	H; 211 211
 655
 211 ('' 21sG   L#&'L7(MM;M3!N#L4	7M	M	M0	3N	N	c           	        \         P                  pV P                  P                  P                  p\
        P                  ! 4       ;_uu_ 4       pV! \        R 4      \        4       V P                  VP                  P                  \        4       V P                  \        VP                  P                  4      R 4       V P                  VP                  P                  P                  V^,           4       V P!                  VP                  P"                  4       V P                  VP                  P$                  \        4       RRR4       \
        P                  ! 4       ;_uu_ 4       pV! \        R 4      \&        4       V P                  VP                  P                  \        4       V P                  \        VP                  P                  4      R 4       V P                  VP                  P                  P                  V^,           4       V P!                  VP                  P"                  4       V P!                  VP                  P$                  4       RRR4       \
        P(                  ! \*        RR4      ;_uu_ 4        \
        P,                  ! 4       ;_uu_ 4       pV! \        R 4      \        4       RRR4       RRR4       XP/                  4       P1                  4       pV P                  V^ ,          R\        : 24       V P                  V^,          R4       V P                  VR,          \2         R24       \
        P(                  ! \*        RR4      ;_uu_ 4        \
        P,                  ! 4       ;_uu_ 4       pV! \        R 4      \&        4       RRR4       RRR4       VP/                  4       P1                  4       pV P                  V^ ,          R4       V P                  VR,          \2         R24       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL{; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i)oops!NunraisablehookzException ignored in: "Traceback (most recent call last):.CustomError: oops!r   )r   err_writeunraisabletest_err_writeunraisable__code__co_firstlinenor   catch_unraisable_exceptionr   hexr#   
unraisableexc_typestr	exc_valueexc_traceback	tb_linenor   err_msgobjectr   	swap_attrr    captured_stderrgetvaluerD   r   )r$   writeunraisable	firstlinecmstderrliness   &     r   r   .Test_ErrSetAndRestore.test_err_writeunraisable=  s   #7711::II	//11RK0#6R]]33[AS!8!897CR]]88BB&],bmm334R]]1137 2 //11RK0$7R]]33[AS!8!897CR]]88BB&^-bmm334bmm223 2 %5t<<%%''6K0#6 ( = !,,.q%;C7#CDq#GHrxj0C$DE%5t<<%%''6K0$7 ( = !,,.q#GHrxj0C$DE? 211 211 ('' =<< (' =<sb   C6P)C1PQ$P-	;Q'Q(Q	Q(P	P*	-P>8	QQ	Q% Q((Q8	c           	        \         P                  pV P                  P                  P                  p\
        P                  ! 4       ;_uu_ 4       pV! \        R 4      R. 4       V P                  VP                  P                  \        4       V P                  \        VP                  P                  4      R 4       V P                  VP                  P                  P                  V^,           4       V P                  VP                  P                  R4       V P!                  VP                  P"                  4       RRR4       \
        P                  ! 4       ;_uu_ 4       pV! \        R 4      R4       V P                  VP                  P                  \        4       V P                  \        VP                  P                  4      R 4       V P                  VP                  P                  P                  V^,           4       V P!                  VP                  P                  4       V P!                  VP                  P"                  4       RRR4       \
        P                  ! 4       ;_uu_ 4       pV! \        R 4      \$        4       V P                  VP                  P                  \        4       V P                  \        VP                  P                  4      R 4       V P                  VP                  P                  P                  V^,           4       V P!                  VP                  P                  4       V P!                  VP                  P"                  4       RRR4       \
        P&                  ! \(        RR4      ;_uu_ 4        \
        P*                  ! 4       ;_uu_ 4       pV! \        R 4      R. 4       RRR4       RRR4       XP-                  4       P/                  4       pV P                  V^ ,          R4       V P                  V^,          R4       V P                  VR	,          \0         R24       \
        P&                  ! \(        RR4      ;_uu_ 4        \
        P*                  ! 4       ;_uu_ 4       pV! \        R 4      R4       RRR4       RRR4       VP-                  4       P/                  4       pV P                  V^ ,          R4       V P                  VR	,          \0         R24       \
        P&                  ! \(        RR4      ;_uu_ 4        \
        P*                  ! 4       ;_uu_ 4       pV! \        R 4      \$        4       RRR4       RRR4       VP-                  4       P/                  4       pV P                  V^ ,          R4       V P                  VR	,          \0         R24       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELC; i  + '       g   i     ELO; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     EL	; i)
r   s   Error in %RzError in []Ns   undecodable r   zError in []:r   r   r   )r   err_formatunraisabletest_err_formatunraisabler   r   r   r   r   r#   r   r   r   r   r   r   r   r   r   r   r   r    r   r   rD   r   )r$   formatunraisabler   r   r   r   s   &     r   r   /Test_ErrSetAndRestore.test_err_formatunraisablef  sh   $9922;;JJ	//11R[1>2FR]]33[AS!8!897CR]]88BB&],R]]22MBbmm223 2 //11R[13FGR]]33[AS!8!897CR]]88BB&^-bmm334bmm223 2 //11R[148R]]33[AS!8!897CR]]88BB&^-bmm334bmm223 2 %5t<<%%''6[1>2F ( = !,,.q\3q#GHrxj0C$DE%5t<<%%''6[13FG ( = !,,.q#GHrxj0C$DE%5t<<%%''6[148 ( = !,,.q#GHrxj0C$DE_ 211 211 211 ('' =<< ('' =<< (' =<<s   C/W"C-W4C1W)X/W=	X'X9X%	X9#Y Y	Y W	W&	)W:	=X	XX"	%X60	X99Y
	YY  Y1	r   N)r   r   r   r   rw   r   r   r   r   r   r   r   r   r   rN   rO   s   @r   ro   ro      s@     !767:M&B E."HJ$FR4F 4Fr   ro   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )TestUnicodeTranslateErrori  c                (   < \         SV `  ! V/ VB  R # rq   )superr   )r$   encodingr}   kwargsr4   s   &&*,r   r   "TestUnicodeTranslateError.__init__  s    $)&)r   r   )r   r   r   r   r   r   rN   __classcell__r4   rP   s   @@r   r  r    s     * *r   r  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR tRtV tR# )TestUnicodeErrori  c                    \        V4      pR # rq   )r   )r$   r   _s   && r   _check_no_crash TestUnicodeError._check_no_crash  s    Hr   c                T    \         P                  pV P                  R \        V4       R# xN)r   unicode_encode_get_start_test_unicode_error_get_startUnicodeEncodeErrorr$   	get_starts   & r   #test_unicode_encode_error_get_start4TestUnicodeError.test_unicode_encode_error_get_start       66	**30BINr   c                T    \         P                  pV P                  R \        V4       R#    xN)r   unicode_decode_get_startr  r   r  s   & r   #test_unicode_decode_error_get_start4TestUnicodeError.test_unicode_decode_error_get_start       66	**41CYOr   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_translate_get_startr  r  r  s   & r   &test_unicode_translate_error_get_start7TestUnicodeError.test_unicode_translate_error_get_start       99	**30I9Ur   c           
        R Ff  w  rEpW,          pV P                  WrVR7      ;_uu_ 4        V! RWuVR4      pV P                  V! V4      V4       V P                  V4       RRR4       Kh  	  R#   + '       g   i     K}  ; i)   )r   startutf-8reasonN))r(  r   r   r(  r   r   r(  r   r   r   r   r   r   r   r   r   
   r   )r(  r(     )r(  r1  r2  r   r   r   )r   r   r   )r   r   r   )r   r   subTestr#   r  )	r$   literalr   r  obj_lenr)  c_startobjr   s	   &&&&     r   r  .TestUnicodeError._test_unicode_error_get_start  sx    (
#GG" #CcEBBwGXF  39$$S) CB%(
$ CBBs   5A//B c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_encode_set_start_test_unicode_error_set_startr  r$   	set_starts   & r   #test_unicode_encode_error_set_start4TestUnicodeError.test_unicode_encode_error_set_start  r  r   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_decode_set_startr>  r   r?  s   & r   #test_unicode_decode_error_set_start4TestUnicodeError.test_unicode_decode_error_set_start  r!  r   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_translate_set_startr>  r  r?  s   & r   &test_unicode_translate_error_set_start7TestUnicodeError.test_unicode_translate_error_set_start  r&  r   c           
     >   ^pW,          p\        RV,          ^V,          4       F  pV P                  RWRVR7      ;_uu_ 4        V! RV^ VR4      pV! Wv4       V P                  VP                  V4       V P	                  V4       RRR4       V P                  RWRVR7      ;_uu_ 4        V! RV^ VR4      pWgn        V P                  VP                  V4       V P	                  V4       RRR4       K  	  R#   + '       g   i     Lz; i  + '       g   i     K  ; i)r(  C-API)r:  r   	new_startr*  r+  NPy-APIr4  )ranger6  r#   r)  r  )r$   r7  r   r@  r8  r:  rM  r   s   &&&&    r   r>  .TestUnicodeError._test_unicode_error_set_start  s    rG|Q[9Ig3YWWwQB#)  I6$$S) X hCiXXwQB%	  I6$$S) YX :WW YXX   AC8*A D8DDc                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_encode_get_end_test_unicode_error_get_endr  r$   get_ends   & r   !test_unicode_encode_error_get_end2TestUnicodeError.test_unicode_encode_error_get_end       22((.@'Jr   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_decode_get_endrT  r   rU  s   & r   !test_unicode_decode_error_get_end2TestUnicodeError.test_unicode_decode_error_get_end       22((/A7Kr   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_translate_get_endrT  r  rU  s   & r   $test_unicode_translate_error_get_end5TestUnicodeError.test_unicode_translate_error_get_end       55((.GQr   c           
        R Fg  w  rEpW,          pV P                  WrVR7      ;_uu_ 4        V! RV^ VR4      pV P                  V! V4      V4       V P                  V4       RRR4       Ki  	  R#   + '       g   i     K~  ; i)r(  )r   endr*  r+  N))r(  r   r   r,  r-  r.  r/  r0  )r   r   r   )r   r   r   r(  r(  r(  rf  )r(  r1  r(  r3  )r   r   r   )r   r   r   )r   r4  r   r5  )	r$   r7  r   rV  r8  re  c_endr:  r   s	   &&&&     r   rT  ,TestUnicodeError._test_unicode_error_get_end  sx    $
G%( #Cc#>>wQX>  u5$$S) ?>+$
* ?>>s   6A00Bc                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_encode_set_end_test_unicode_error_set_endr  r$   set_ends   & r   !test_unicode_encode_error_set_end2TestUnicodeError.test_unicode_encode_error_set_end  rY  r   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_decode_set_endrk  r   rl  s   & r   !test_unicode_decode_error_set_end2TestUnicodeError.test_unicode_decode_error_set_end  r^  r   c                T    \         P                  pV P                  R \        V4       R# r  )r   unicode_translate_set_endrk  r  rl  s   & r   $test_unicode_translate_error_set_end5TestUnicodeError.test_unicode_translate_error_set_end  rc  r   c           
     >   ^pW,          p\        RV,          ^V,          4       F  pV P                  RWRVR7      ;_uu_ 4        V! RV^ VR4      pV! Wv4       V P                  VP                  V4       V P	                  V4       RRR4       V P                  RWRVR7      ;_uu_ 4        V! RV^ VR4      pWgn        V P                  VP                  V4       V P	                  V4       RRR4       K  	  R#   + '       g   i     Lz; i  + '       g   i     K  ; i)r(  rL  )r:  r   new_endr*  r+  NrN  r4  )rO  r6  r#   re  r  )r$   r7  r   rm  r8  r:  ry  r   s   &&&&    r   rk  ,TestUnicodeError._test_unicode_error_set_end#  s    R'\1w;7Gg37SSwQB%  '2$$S) T hCGTTwQB!  '2$$S) UT 8SS UTTrQ  r   N)r   r   r   r   r  r  r  r$  r  rA  rE  rI  r>  rW  r\  ra  rT  rn  rr  rv  rk  r   rN   rO   s   @r   r  r    sk     OPV*0OPV*$KLR*6KLR* *r   r  c                   P   a a ] tR tRt oV 3R ltR tR tR tR tR t	Rt
VtV ;t# )	#Test_PyUnstable_Exc_PrepReraiseStari6  c                   < \         SV `  4         \        R \        R4      \	        ^*4      .4      h  \         d   pYn         Rp?R# Rp?ii ; i)egzbad typeN)r  setUpExceptionGroupr   r   orig)r$   r'   r4   s   & r   r  )Test_PyUnstable_Exc_PrepReraiseStar.setUp8  sC    	 	*(=z"~'NOO 	II	s    1 AAAc           
        V P                  \        R 4      ;_uu_ 4        \        P                  ^*R.4       RRR4       V P                  \        R4      ;_uu_ 4        \        P                  V P                  ^*4       RRR4       V P                  \        R4      ;_uu_ 4        \        P                  V P                  \        ^*4      ^*.4       RRR4       V P                  \
        R4      ;_uu_ 4        \        P                  \        ^*4      \        ^*4      .4       RRR4       V P                  \
        R4      ;_uu_ 4        \        P                  \        R\        ^*4      .4      \        ^*4      .4       RRR4       R#   + '       g   i     ELW; i  + '       g   i     EL$; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)zorig must be an exceptionNzexcs must be a listznot an exceptionzorig must be a raised exceptionr~  )r   r   r   unstable_exc_prep_reraise_starr  r   r  r   s   &r   test_invalid_args5Test_PyUnstable_Exc_PrepReraiseStar.test_invalid_args?  sR   ##I/JKK44R$@ L ##I/DEE44TYYC F ##I/ABB44TYY2PR@ST C ##J0QRR44Z^iPRm_U S ##J0QRR44^D:VX>JZ5[6?m_F SR LKK FEE CB SR SRRs;   F!F$,F-6*G 5GF	F*	-F=	 G	G$	c                   V P                  \        P                  V P                  R .4      R 4        \	        ^*4      h  \         d   pTp R p?MR p?ii ; iT P                  \        P                  TR .4      R 4       R # rq   )r#   r   r  r  r   )r$   r'   r  s   &  r   test_nothing_to_reraise;Test_PyUnstable_Exc_PrepReraiseStar.test_nothing_to_reraiseQ  sp    44TYYG	O	R.  	D	44TD6BD	Js   > A	AAc                l    V P                   p\        P                  W.4      pV P                  W!4       R # rq   )r  r   r  assertExceptionIsLike)r$   r  ress   &  r   test_reraise_orig5Test_PyUnstable_Exc_PrepReraiseStar.test_reraise_orig\  s+    yy66tVD""3-r   c                F   V P                   pVP                  \        4      w  r#W#.V3W2.V3V.V3V.V3. R 3.pV FN  w  rVV P                  VR7      ;_uu_ 4        \        P                  W4      pV P                  Wv4       R R R 4       KP  	  R #   + '       g   i     Ke  ; i)Ninput)r  r\   r   r6  r   r  r  )r$   r  rd   rest
test_casesr  r`   r  s   &       r   test_raise_orig_parts9Test_PyUnstable_Exc_PrepReraiseStar.test_raise_orig_partsa  s    yyjj+ ]D!]D!WeVTNJ

  *OEE**>>tK**39 +*  ****s   'BB c                   V P                   pVP                  \        4      w  r#\        R 4      p\	        R4      pWBV.\        RWA.4      3W$V.\        RWA.4      3W#V.\        RWA.4      3WEW#.\        RWEV.4      3WBWS.\        RWEV.4      3WSW$.\        RWTV.4      3W5W$.\        RWTV.4      3WEV.\        RWEV.4      3WBV.\        RWEV.4      3W5V.\        RWTV.4      3WE.\        RWE.4      3WT.\        RWT.4      3.pV FN  w  rxV P                  VR7      ;_uu_ 4        \        P                  W4      p	V P                  W4       RRR4       KP  	  R#   + '       g   i     Ke  ; i)zbad filezbad runtime r  N)
r  r\   r   r   RuntimeErrorr  r6  r   r  r  )
r$   r  rd   r  new1new2r  r  r`   r  s
   &         r   test_raise_with_new_exceptionsBTest_PyUnstable_Exc_PrepReraiseStar.test_raise_with_new_exceptionss  s   yyjj+z"M* 4 .d\"BC4 .d\"BC4 .d\"BC%&rD;M(NO4&rD;M(NO%&rD;M(NO%&rD;M(NO $T4F!GH4 .d%5H"IJ$T4F!GH\>"tl;<\>"tl;<

$ ",UE**>>tK**39 +* ",***s   "'EE()r  )r   r   r   r   r  r  r  r  r  r  r   rN   r  r	  s   @@r   r|  r|  6  s*     F$	J.
:$: :r   r|  __main__)#r   r   rV   r    unittestrA   testr   test.supportr   test.support.os_helperr   r   test.support.script_helperr   r   test.support.testcaser	   	test_miscr
   r   r   r   r~   r   TestCaser   rR   ro   UnicodeTranslateErrorr  r  r|  r   mainr   r   r   <module>r     s     	 	 
    & = N 6 $ ''4		) 	Th'' Tn(/h'' (/VFH-- FJ* 5 *K*x(( K*\Y:*>@Q@Q Y:x zMMO r   