+
    Bi1                         ^ RI t ^ RIt^ RIt^ RIHt  ! R R] P                  4      t ! R R] P                  4      t]	R8X  d   ] P                  ! 4        R# R# )    N)systemc                   X   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V tR# )ExceptionClassTestszYTests for anything relating to exception objects themselves (e.g.,
inheritance hierarchy)c                :    V P                  \        \        4       R # N)assertIsSubclass	Exceptionobjectselfs   &./usr/lib/python3.14/test/test_baseexception.pytest_builtins_new_style+ExceptionClassTests.test_builtins_new_style   s    i0    c                :    R F  pV P                  W4       K  	  R# )argsN)r   __str____repr__)assertHasAttr)r   insattrs   && r   verify_instance_interface-ExceptionClassTests.verify_instance_interface   s    3Ds) 4r   c           	        \        4       p\        P                  P                  4        F7  p \	        V\
        4      '       d   VP                  VP                  4       K7  K9  	  \        \        P                  P                  \        P                  P                  \        4      ^ ,          R4      RR7      p VP                  4       P!                  4       p \#        \        V4      pV P)                  WARV,          4       VP+                  V4       . p^ pV EF  pVP!                  4       pVP-                  R4      p	W^,           R p
RV
9   dK   V
P/                  R4      pW^,           R pV
RV^,
           p
\1        4       V8w  d   VP+                  V
4       K  R	V
9   d   V
P/                  R	4      pV
RV^,
           p
 \#        \        V
4      pWy8  d   VP3                  VX34       M-Wy8  d(   VR,          ^ ,          V	8  d   VP5                  4        K'  V P7                  XVR,          ^,          VP                  : RVR,          ^,          P                  : 24        V P9                  V! 4       4       V P)                  W4       VP+                  V
4       TpT	pEK  	  VP;                  4        \        R V 4       4      pV P=                  \?        V4      ^ RV,          4       R#   \         d     EK  i ; i  \$         d    T P'                  RT,          4        EL9i ; i  \$         d    T P'                  R
T
,          4        EL}i ; i  \         d     Li ; i  TP;                  4        i ; i)r   zexception_hierarchy.txtzutf-8)encodingzbase class %s not a built-inz%s not foundu   ─N([z%s not a built-in exceptionz is not a subclass of c              3   V   "   T F  qP                  R 4      '       d   K  Vx  K!  	  R# 5i)_N)
startswith).0es   & r   	<genexpr>7ExceptionClassTests.test_inheritance.<locals>.<genexpr>Q   s     BAS0Aaas   )
)z%s not accounted for) setbuiltins__dict__values
issubclassBaseExceptionadd__name__	TypeErroropenospathjoinsplit__file__readlinerstripgetattrAttributeErrorfailassertIndiscardrindexindexplatform_systemappendpopr   r   closeassertEquallen)r   exc_setobject_inheritance_treesuperclass_namelast_excsuperclasses
last_depthexc_linedepthexc_nameparen_indexplatform_nameleft_bracketexcs   &              r   test_inheritance$ExceptionClassTests.test_inheritance   s   %((//1Gg}55KK 0 01 6 2  RWW]]84Q79RS ".	%.779@@BOL"8_= MM/(?:<OOO,LJ,#??, .#!GH-(?"*.."5K$,]2$>M'Q7H&(M91 (?#+>>##6L'a8HH!(H5C % ''X(>?'&r*1-6$((*%%c<+;A+>03 $Q'002322359 h0)"
C -F ""$ BBBWq*@7*JKq   " L		8?JKL. & HII;hFGH !  ""$s   1K'8M K: 'CM =L$BM M5+M 'K76K7:#L!M  L!!M $#MM 
MM MM MM M1c           
         \        V P                  V4       F%  w  pw  r4V P                  W4V: R V: RV: 24       K'  	  R# )z: z != N)zipinterface_testsrB   )r   results	test_namegivenexpecteds   &&   r   interface_test_driver)ExceptionClassTests.interface_test_driverV   s>    ,/0D0Dg,N(I(U	x/! " -Or   c                   R p\        V4      p\        VP                  4      ^.VP                  ^ ,          V.\        V4      \        V4      .\	        V4      VP
                  P                  : RV: R2.3pV P                  V4       R# )spamr   )N)r	   rC   r   strrepr	__class__r-   r[   )r   argrQ   rW   s   &   r   test_interface_single_arg-ExceptionClassTests.test_interface_single_arg[   sr    nM1%S'9Hc#h'#YCMM$:$:C@AC 	""7+r   c                N   ^p\        \        V4      4      p\        V!  p\        VP                  4      V.VP                  V.\        V4      \        V4      .\        V4      VP                  P                  \        VP                  4      ,           .3pV P                  V4       R# )   N)
tupleranger	   rC   r   r`   ra   rb   r-   r[   )r   	arg_countr   rQ   rW   s   &    r   test_interface_multi_arg,ExceptionClassTests.test_interface_multi_argd   s    	U9%&M9-$/?S3t9%cCMM22T#((^CDF 	""7+r   c                    \        4       p\        VP                  4      ^ .VP                  \        4       .\	        V4      R.\        V4      VP                  P                  R,           .3pV P                  V4       R# )r    z()N)	r	   rC   r   rh   r`   ra   rb   r-   r[   )r   rQ   rW   s   &  r   test_interface_no_arg)ExceptionClassTests.test_interface_no_argn   sc    kM1%%'':S2cCMM22T9:< 	""7+r   c                   a ^ RI p/ o ! V3R lR\        4      p ! R R\        4      p\        4       pV! 4       SV! 4       &   VP                  S4       VP	                  4        R# )r   Nc                   B   <a a ] tR t^{t oV3R lV V3R lltRtVtV ;t# )XExceptionClassTests.test_setstate_refcount_no_crash.<locals>.HashThisKeyWillClearTheDictc                    < V ^8  d   QhRS[ /# )   return)int)format__classdict__s   "r   __annotate__eExceptionClassTests.test_setstate_refcount_no_crash.<locals>.HashThisKeyWillClearTheDict.__annotate__|   s     * *# *r   c                @   < SP                  4        \        SV `	  4       # r   )clearsuper__hash__)r   rb   ds   &r   r   aExceptionClassTests.test_setstate_refcount_no_crash.<locals>.HashThisKeyWillClearTheDict.__hash__|   s    	w'))r    )r-   
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classcell__)rb   ry   r   s   @@r   HashThisKeyWillClearTheDictrs   {   s     * * *r   r   c                       ] tR t^tRtR# )BExceptionClassTests.test_setstate_refcount_no_crash.<locals>.Valuer   Nr-   r   r   r   r   r   r   r   Valuer          r   r   )gcr`   r	   __setstate__collect)r   r   r   r   rQ   r   s   &    @r   test_setstate_refcount_no_crash3ExceptionClassTests.test_setstate_refcount_no_crashv   sW     		*# 	*	C 	k+07
%
'( 	 	

r   r   N)lengthr   r`   ra   )r-   r   r   r   __doc__r   r   rR   rV   r[   rd   rk   ro   r   r   r   ry   s   @r   r   r      s@     1*?LB 8O"
,,, r   r   c                   N   a  ] tR t^t o RtR tR tR tR tR t	R t
R tR	tV tR
# )
UsageTestszTest usage of exceptionsc                ,     Vh  \          d     R# i ; i)z6Make sure that raising 'object_' triggers a TypeError.N)r.   r9   typer   rE   s   &&r   raise_failsUsageTests.raise_fails   s    	M 		s    c                p     \         h  T d       \         hi ; i  \         d       \         h\          d,    T P                  R\        T4      ,          4          \         hi ; i  T3 d     R# i ; i  \         d     R# \          d&    T P                  R\        T4      ,          4        R# i ; i)z,Catching 'object_' should raise a TypeError.z#TypeError expected when catching %sNz;TypeError expected when catching %s as specified in a tuple)r	   r.   r9   r   r   s   &&r   catch_failsUsageTests.catch_fails   s    	M 		1 			1  	MII;d7mKL		1	M :  	 	1II  "&w-0 1	1si   	  A)  A&A) A&"A&A) %A&)A51A8 4A55A8 8B5B5"B54B5c                r     ! R  R\         4      pV P                  V4       V P                  V! 4       4       R# )c                       ] tR t^tRtR# )DUsageTests.test_raise_new_style_non_exception.<locals>.NewStyleClassr   Nr   r   r   r   NewStyleClassr      r   r   r   N)r
   r   )r   r   s   & r   "test_raise_new_style_non_exception-UsageTests.test_raise_new_style_non_exception   s,    
	F 	')r   c                (    V P                  R 4       R# r^   N)r   r   s   &r   test_raise_stringUsageTests.test_raise_string        r   c                r     ! R  R\         4      pV P                  V4       V P                  V! 4       4       R# )c                       ] tR t^tRtR# )AUsageTests.test_catch_non_BaseException.<locals>.NonBaseExceptionr   Nr   r   r   r   NonBaseExceptionr      r   r   r   N)r
   r   )r   r   s   & r   test_catch_non_BaseException'UsageTests.test_catch_non_BaseException   s/    	v 	)*)+,r   c                8    V P                  \        4       4       R # r   )r   r+   r   s   &r   !test_catch_BaseException_instance,UsageTests.test_catch_BaseException_instance   s    )r   c                (    V P                  R 4       R# r   )r   r   s   &r   test_catch_stringUsageTests.test_catch_string   r   r   r   N)r-   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s   @r   r   r      s1     "G1.*!-*! !r   r   __main__)unittestr'   r0   platformr   r>   TestCaser   r   r-   mainr   r   r   <module>r      sQ      	 .E(++ EP?!"" ?!D zMMO r   