+
    Bi6                        ^ RI t ^ RIt^ RIt^ RIt^ RIHt ]P                  ! R4      t^ RIHtH	t	  ^ RI
Ht Rt ! R R4      t ! R R	4      t ! R
 R4      t ! R R]4      t ! R R]4      t ! R R]4      tR t ! R R]4      t ! R R]4      t ! R R]P0                  4      t]R8X  d   ]P6                  ! 4        R# R#   ] d    Rt Li ; i)    N)import_helper	_testcapi)PY_SSIZE_T_MAXPY_SSIZE_T_MIN)ndarrayc                   *   a  ] tR t^t o RR ltRtV tR# )BadDescrNc                    \         hN)RuntimeError)selfobjobjtypes   &&&1/usr/lib/python3.14/test/test_capi/test_number.py__get__BadDescr.__get__   s         r   )__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classdict__s   @r   r	   r	      s      r   r	   c                   X   a a ] tR t^t oR t]V 3R l4       t]V 3R l4       tRtVt	V ;t
# )
WithDunderc                ~    V P                   '       d   V P                   # V P                  '       d   V P                  hR # r   )valexc)r   argss   &*r   _methWithDunder._meth   s+    88888O888((N r   c                   < \         SV `  V 4      pWn        R Vn        \	        W P
                  V P                  4       V# r   super__new__r    r!   setattrmethnamer#   )clsr    r   	__class__s   && r   with_valWithDunder.with_val   s4    goc"\\399-
r   c                   < \         SV `  V 4      pR Vn        Wn        \	        W P
                  V P                  4       V# r   r&   )r+   r!   r   r,   s   && r   with_excWithDunder.with_exc$   s4    goc"\\399-
r   r   )r   r   r   r   r#   classmethodr-   r0   r   r   __classcell__r,   r   s   @@r   r   r      s7     
     r   r   c                   2   a a ] tR t^,t oV 3R ltRtVtV ;t# )
HasBadAttrc                b   < \         SV `  V 4      p\        W P                  \	        4       4       V# r   )r'   r(   r)   r*   r	   )r+   r   r,   s   & r   r(   HasBadAttr.__new__-   s&    goc"\\8:.
r   r   )r   r   r   r   r(   r   r   r3   r4   s   @@r   r6   r6   ,   s      r   r6   c                       ] tR t^3tRtRtR# )	IndexLike	__index__r   Nr   r   r   r   r*   r   r   r   r   r:   r:   3       Hr   r:   c                       ] tR t^6tRtRtR# )IntLike__int__r   Nr<   r   r   r   r?   r?   6   s    Hr   r?   c                       ] tR t^9tRtRtR# )	FloatLike	__float__r   Nr<   r   r   r   rB   rB   9   r=   r   rB   c                 @    \        V P                  R ,           V 3/ 4      # )Subclass)typer   )bases   &r   
subclassofrH   =   s    
*TGR88r   c                       ] tR t^AtRtR# )	SomeErrorr   Nr   r   r   r   r   r   r   r   rJ   rJ   A       r   rJ   c                       ] tR t^DtRtR# )
OtherErrorr   NrK   r   r   r   rN   rN   D   rL   r   rN   c                      a  ] tR t^Ht o R tR tR t]P                  ! ]	RJ R4      R 4       t
]P                  ! ]	RJ R4      R 4       tR tR	 tR
 tR tR tR tRtV tR# )CAPITestc                |   \         P                  pV P                  V! ^4      4       V P                  V! \        P	                  ^4      4      4       V P                  V! \
        P	                  ^c4      4      4       V P                  V! R4      4       V P                  V! \        P	                  R4      4      4       V P                  V! R4      4       V P                  V! . 4      4       V P                  V! R4      4       V P                  V! \        4       4      4       V P                  V! \        4      4       R# )         ?      @abcN      ?       @)
r   number_check
assertTruer:   r-   r?   rB   assertFalseobjectNULL)r   checks   & r   
test_checkCAPITest.test_checkI   s    &&a!i00345g..r234c
#i00678d$r#u&vx)t%r   c                    R \         P                  R\         P                  R\         P                  R\         P                  /pVP                  4        F  w  r#V P                  \        V\        4       4       V P                  \        V\        4       \        \        V4      pR F*  p V! V4       V P                  V! V4      V! V4      4       K,  	  K  	  R#   \         d    T P                  \        Y54        KX  i ; i)__neg____pos____abs__
__invert__N)r   *   Q	@rV   )r   number_negativenumber_positivenumber_absolutenumber_invertitemsassertRaises	TypeErrorrZ   SystemErrorr[   getattroperatorassertEqual)r   methmapnamefuncopxs   &     r   test_unary_opsCAPITest.test_unary_opsY   s    i77i77i77!8!8:
 "--/JDivx8 k46 4(B,5qE $$T!Wbe4 - * ! :%%i9:s   (C!C=<C=c                   / R \         P                  bR\         P                  bR\         P                  bR\         P                  bR\         P
                  bR\         P                  bR\         P                  bR\         P                  bR\         P                  bR	\         P                  bR
\         P                  bR\         P                  bR\         P                  bR\         P                  bR\         P                  bR\         P                   bR\         P"                  bR\         P$                  R\         P&                  R\         P(                  R\         P*                  R\         P,                  R\         P.                  R\         P0                  R\         P2                  R\         P4                  R\         P6                  /
CpVP9                  4        F  w  r#. ROpV FB  pV P;                  \<        V\?        4       V4       V P;                  \<        W5\?        4       4       KD  	  \A        \B        V\D        4      p\F        PH                  ! V^4       F,  w  rW V! WW4       V PK                  V! WW4      V! WW4      4       K.  	  K  	  R#   \<        \L        \N        3 d)   pT P;                  TPP                  Y5T4        Rp?Ko  Rp?ii ; i)__add____sub____mul__
__matmul____floordiv____truediv____mod__
__divmod__
__lshift__
__rshift____and____xor____or____pow____iadd____isub____imul____imatmul____ifloordiv____itruediv____imod____ilshift____irshift____iand____ixor____ior____ipow__N)r   rd   rf   re   {   rV   ))r   
number_addnumber_subtractnumber_multiplynumber_matrixmultiplynumber_floordividenumber_truedividenumber_remaindernumber_divmodnumber_lshiftnumber_rshift
number_and
number_xor	number_ornumber_powernumber_inplaceaddnumber_inplacesubtractnumber_inplacemultiplynumber_inplacematrixmultiplynumber_inplacefloordividenumber_inplacetruedividenumber_inplaceremaindernumber_inplacelshiftnumber_inplacershiftnumber_inplaceandnumber_inplacexornumber_inplaceornumber_inplacepowerrk   rl   rm   rZ   ro   rp   divmod	itertoolscombinationsrq   
ValueErrorZeroDivisionErrorr,   )	r   rr   rs   rt   casesrv   ru   yr!   s	   &        r   test_binary_opsCAPITest.test_binary_opsp   s|   9i22 i77i77  !@!@ "9#?#?	
 !)"="= i88  !8!8  !8!8  !8!8 i22 i22 Y00 i44 y:: y??  y??!" !)"H"H"I$G$G!9#E#Ey@@ )"@"@ )"@"@y::y::i88y<<5: "--/JD0E !!)T68Q?!!)Tfh? 
 40B!..ua8;qH $$T!ZA: 9 * ":/@A A%%cmmTa@@As   J		KKKNzneeds _testbufferc                   \         P                  p\         P                  p^^.^^.. ROrTpV P                  V! W44      V4       V P                  V^^.4       V P	                  \
        V\        ^.R4      ^4       ^^.^^.. ROrTpV P                  V! W44      V4       V P                  W54       V P	                  \
        V\        ^.R4      ^4       R# )rR   N)rR            rR   )r   r   r   rq   rl   rm   r   )r   add
inplaceaddabrs   &     r   test_misc_addCAPITest.test_misc_add   s     ""00
 a&1a&,aQA&QF#)S'1#t*<a@a&1a&,aA)1-)Z!d1CQGr   c                   \         P                  p\         P                  p^.^^^.rTpV P                  V! W44      V4       V P                  W43^.^34       V P                  V! WC4      V4       V P                  W43^.^34       V P                  V! ^.R4      . 4       V P	                  \
        V\        ^.R4      ^4       V P	                  \
        V^.R4       V P	                  \        V^.\        ^,           4       V P	                  \        V^^.\        ^,          ^,           4       ^.^^^.rTpV P                  V! W44      V4       V P                  W43V^34       ^.pV P                  V! WC4      V4       V P                  W43^.^34       V P	                  \
        V\        ^.R4      ^4       V P	                  \        V^.\        ^,           4       V P	                  \        V^^.\        ^,          ^,           4       R# )rR   rS   Nre   r   )
r   r   r   rq   rl   rm   r   OverflowErrorr   MemoryError)r   multiplyinplacemultiplyr   r   r   s   &     r   test_misc_multiplyCAPITest.test_misc_multiply   s    ,,#:: #q1a&a!+!1#q*!+!1#q*1#r*B/)XwsD/A1E)XsC8-A38JK+x!Q9JQ9NO#q1a&a.2!!Q(C.2!1#q*)_gqc46H!L-1#~PQ?QR+APQ@QTU@UVr   c           	        \         P                  p\         P                  p ! R  R\        4      pV P	                  V! ^^^4      \        ^^^4      4       V P                  \        V^^R4       V P                  \        V^^VP                  \        4      4       V P                  \        V^^\        4       4       V P	                  V! ^^^4      \        ^^^4      4       V P                  \        V^^R4       V P                  \        V^^\        4       4        ! R R4      pV! 4       pV P	                  V! V^4      V^34       V P	                  V! V^4      V^34       V P	                  V! V^^4      V^^34       V P	                  V! V^^4      V^^34        ! R R4      pV! 4       pV P	                  V! ^V4      V^34       V P	                  V! ^V4      V^34       V P	                  V! ^V^4      V^^34       V P	                  V! ^V^4      V^^34        ! R R4      pV! 4       pV P	                  V! V^4      V^34       V P	                  V! V^^4      V^34       R# )c                       ] tR t^tRtRtR# )(CAPITest.test_misc_power.<locals>.HasPowr   r   Nr<   r   r   r   HasPowr      s     Hr   r         ?c                   &   a  ] tR t^t o R tRtV tR# )#CAPITest.test_misc_power.<locals>.Xc                     V # r   r   r"   s   *r   r   +CAPITest.test_misc_power.<locals>.X.__pow__       r   r   N)r   r   r   r   r   r   r   r   s   @r   Xr            r   r   c                   &   a  ] tR t^t o R tRtV tR# )r   c                     V # r   r   r   s   *r   __rpow__,CAPITest.test_misc_power.<locals>.X.__rpow__   r   r   r   N)r   r   r   r   r   r   r   r   s   @r   r   r      r   r   c                   &   a  ] tR t^t o R tRtV tR# )r   c                     V # r   r   r   s   *r   r   ,CAPITest.test_misc_power.<locals>.X.__ipow__   r   r   r   N)r   r   r   r   r   r   r   r   s   @r   r   r      r   r   N)r   r   r   r   rq   powrl   rm   r-   NotImplementedrZ   )r   powerinplacepowerr   r   rv   s   &     r   test_misc_powerCAPITest.test_misc_power   s7   && 44	!Z 	! 	q"a#aQ-8)UAr48)UAr6??>3RS)UAr68<aQ/QA?)\1b$?)\1b&(C	 	 Cq"2w/a,q"g6q"a1b!*5aQ/!R<	 	 Cq!q!f-a+aV4q!Q!Q3aA.Aq	:	 	 Ca,q"g6aQ/!R9r   c           	     ,   \         P                  pV P                  V! ^*4      ^*4       V P                  V! R4      ^4       V P                  V! R4      ^*4       V P                  V! R4      ^*4       V P                  V! \        R4      4      ^*4       V P                  V! \	        R4      4      ^*4       V P                  V! \
        P                  ^c4      4      ^c4       V P                  V! \        P                  ^c4      4      ^c4       V P                  \        V\        P                  R4      4       \        P                  ! 4       ;_uu_ 4        \        P                  ! R\        4       V P                  \        V\        P                  R4      4       RRR4       V P                  \        4      ;_uu_ 4        V P                  V! \        P                  R4      4      ^4       RRR4       V P                  \        V\        P!                  \        4      4       V P                  \        VR4       V P                  \        V\#        4       4       V P                  \$        V\&        4       R#   + '       g   i     L; i  + '       g   i     L; i)	rd   r   42s   42      ?errorTN              ?)r   number_longrq   	bytearray
memoryviewr:   r-   r?   rl   rm   warningscatch_warningssimplefilterDeprecationWarningassertWarnsr   r0   rZ   rn   r[   )r   longs   & r   	test_longCAPITest.test_long   s   $$b2&dQ'dR(eb)i./4j/0"5i0045r:g..r23R8)T7+;+;C+@A$$&&!!'+=>0$8H8H8NO ' 011T'"2"24"891= 2,g.>.>|.LM)T2.)T684+tT2 '& 21s   AI0;,J0J 	J	c                   \         P                  pV P                  V! R 4      R 4       V P                  V! ^{4      R4       V P                  V! R4      R 4       V P                  V! \        P	                  R4      4      R4       V P                  V! \
        P	                  ^c4      4      R4       V P                  V! \
        P	                  R
4      4      R4       V P                  \        V\        P	                  R4      4       \        P                  ! 4       ;_uu_ 4        \        P                  ! R\        4       V P                  \        V\        P	                  \        \        4      ! R4      4      4       RRR4       V P                  \        4      ;_uu_ 4        V P                  V! \        P	                  \        \        4      ! R4      4      4      R4       RRR4       V P                  \        V\        P!                  \        4      4       V P                  \        V\
        P	                  R 4      4       V P                  \"        V\
        P	                  ^R,          4      4       V P                  \        VR	4       V P                  \        V\%        4       4       V P                  \&        V\(        4       R#   + '       g   i     ELQ; i  + '       g   i     EL; i)r   g     ^@z1.25rT   g     X@i  r   Ni  r   re   g      )r   number_floatrq   rB   r-   r:   rl   rm   r   r   r   r   rH   floatr   r   r0   r   rZ   rn   r[   )r   float_s   & r   
test_floatCAPITest.test_float  s   ''t,d+.	 2 24 894@	 2 22 67>	 2 22 67>)VY-?-?-DE$$&&!!'+=>0&):L:LZX]M^_cMd:ef ' 011VI$6$6z%7H7N$OPRVW 2,	0B0B<0PQ)VY-?-?-EF-1C1CAtG1LM)VR0)VVX6+vt4 '&& 211s   !AK?KK	K'	c           	        \         P                  pV P                  V! ^4      ^4       \        P                  ! 4       ;_uu_ 4        \        P
                  ! R\        4       V P                  \        V\        P                  R4      4       RRR4       V P                  \        4      ;_uu_ 4        V P                  V! \        P                  R4      4      ^4       RRR4       V P                  \        V\        P                  R4      4       V P                  \        V\        P                  \        4      4       V P                  \        VR4       V P                  \        VR4       V P                  \        V\        4       4       V P                  \        V\         4       R#   + '       g   i     EL$; i  + '       g   i     L; i)   r   TNr   r   r   )r   number_indexrq   r   r   r   r   rl   r:   r-   r   rm   r   r0   rZ   rn   r[   )r   indexs   & r   
test_indexCAPITest.test_index0  s6   &&rB'$$&&!!'+=>0%9K9KD9QR ' 011U9#5#5d#;<a@ 2)UI,>,>s,CD,y/A/A,/OP)UD1)UD1)UFH5+ud3 '&& 21s   AF'1,F;'F8	;G	c                   \         P                  pV P                  V! ^
^4      \        ^
4      4       V P                  V! ^^4      \	        ^4      4       V P                  V! ^^
4      \        ^4      4       V P                  V! ^^4      \        ^4      4       V P                  \        V\        ^4       V P                  \        V^^4       V P                  \        VR^4       V P                  \        VR^4       R# )
   r   r   N)r   number_tobaserq   binoctstrhexrl   rn   r[   rm   )r   tobases   & r   test_tobaseCAPITest.test_tobaseC  s    ((AB0AB0BR1BR1+vtQ7+vq!4)VT15)VT15r   c                .   \         P                  p. \        R^4      O\        N\        N F   pV P                  V! V\        4      V4       K"  	  V P                  V! \        ^
,           \        4      \        4       V P                  V! \        ^
,
          \        4      \        4       V P                  \        V\        ^
,           \        4       V P                  \        V\        ^
,           \        4       V P                  \        V\        \        4       R# )   Ni)r   number_asssizetranger   r   rq   r   r[   rl   r   rn   rm   )r   asssizetns   &  r   test_asssizetCAPITest.test_asssizetQ  s    ,,@5Q<@@@AXa7; A."3T:NK."3T:NK->B3FV,.22E|T+xyAr   r   )r   r   r   r   r]   rw   r   unittestskipIfr   r   r   r   r   r   r  r  r  r   r   r   s   @r   rP   rP   H   s     & 5..;f __W_&9:H ;H __W_&9:W ;W4,:\32564&6B Br   rP   __main__)r   rp   r  r   test.supportr   import_moduler   r   r   _testbufferr   ImportErrorr[   r	   r   r6   r:   r?   rB   rH   	ExceptionrJ   rN   TestCaserP   r   mainr   r   r   <module>r     s        &''4	 4#   , 
 j 
 9		 		 	TBx   TBn zMMO e
  Gs   C 	CC