+
    Bi%                        ^ RI t ^ RIt^ RIHt ]P                  ! R4      t]P                  ! R4      tRt]P                  t]P                  t	 ! R R]
4      t ! R R] P                  4      t]R	8X  d   ] P                  ! 4        R# R# )
    N)import_helper	_testcapi_testlimitedcapic                       ] tR t^tRtR# )TupleSubclass N)__name__
__module____qualname____firstlineno____static_attributes__r       0/usr/lib/python3.14/test/test_capi/test_tuple.pyr   r      s    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R
 tR tR tR tRtV tR# )CAPITestc                   \         P                  pV P                  V! R4      4       V P                  V! R4      4       V P                  V! \        R4      4      4       V P	                  V! ^^/4      4       V P	                  V! ^^.4      4       V P	                  V! ^*4      4       V P	                  V! \        4       4      4       R#    Nr      r   )r   tuple_check
assertTruer   assertFalseobjectselfchecks   & r   
test_checkCAPITest.test_check   s     ,,f&b	"mF3451v'1v'r#vx)r   c                   \         P                  pV P                  V! R4      4       V P                  V! R4      4       V P                  V! \	        R4      4      4       V P                  V! ^^/4      4       V P                  V! ^^.4      4       V P                  V! ^*4      4       V P                  V! \        4       4      4       R# r   )r   tuple_checkexactr   r   r   r   r   s   & r   test_tuple_checkexactCAPITest.test_tuple_checkexact   s     11f&b	"}V4561v'1v'r#vx)r   c                r   \         P                  p\         P                  p\        P                  pV! ^ 4      pV P                  VR4       V P                  V! V4      ^ 4       V P                  \        V4      \        4       V! ^4      pV P                  \        V4      \        4       V P                  V! V4      ^4       V P                  WT4       V P                  V! V^ 4      4       V P                  \        VR4       V P                  \        V\        4       V P                  \        V\        4       R# r   Nr   )r   	tuple_new
tuple_sizer   _check_tuple_item_is_NULLassertEqualassertIstypetupleassertIsNotr   assertRaisesSystemErrorPY_SSIZE_T_MINMemoryErrorPY_SSIZE_T_MAX)r   r'   size	checknulltup1tup2s   &     r   test_tuple_newCAPITest.test_tuple_new-   s    $..	**77	|r"dQ'd4j%(|d4j%(dQ'$	$*++y"5+y.A+y.Ar   c                h   \         P                  pV P                  V! ^ 4      R4       V P                  V! ^^.4      ^.34       V P                  V! ^^.^.4      ^.^.34       V P                  \        V\
        4       V P                  \        VR4       V P                  \        V\        4       R# r%   )r   
tuple_packr*   r/   r0   r1   r2   r3   )r   packs   & r   test_tuple_packCAPITest.test_tuple_packA   s    **a"%a!v.a!qc*aS1#J7+t^<+tR0+t^<r   c                b   \         P                  pV P                  V! R4      ^ 4       V P                  V! R4      ^4       V P                  V! \        R4      4      ^4       V P	                  \
        V. 4       V P	                  \
        V^*4       V P	                  \
        V\        4       4       R# r   Nr   r   )r   r(   r*   r   r/   r0   r   r   r4   s   & r   test_tuple_sizeCAPITest.test_tuple_sizeP   s    **b1%fq)mF34a8+tR0+tR0+tVX6r   c                    \         P                  pV P                  V! R4      ^ 4       V P                  V! R4      ^4       V P                  V! \        R4      4      ^4       R# r@   )r   tuple_get_sizer*   r   rA   s   & r   test_tuple_get_sizeCAPITest.test_tuple_get_size^   sO    ''b1%fq)mF34a8r   c                f   \         P                  p^.^.^.3pV P                  V! V^ 4      ^.4       V P                  V! V^4      ^.4       \        ^.^.^.34      pV P                  V! V^ 4      ^.4       V P                  V! V^4      ^.4       V P	                  \
        W\        4       V P	                  \
        WR4       V P	                  \
        W\        V4      4       V P	                  \
        W\        4       V P	                  \        V. RO^4       V P	                  \        V^*^4       R# )r   Nr&   r   r      )
r   tuple_getitemr*   r   r/   
IndexErrorr1   lenr3   r0   )r   getitemtupr7   s   &   r   test_tuple_getitemCAPITest.test_tuple_getitemf   s
   "00sQC!oa1#.a1#.qcA3_-q)A3/q)A3/*gNC*gB7*gCH=*gNC+w	1=+wA6r   c                (   \         P                  p^.^.^.3pV P                  V! V^ 4      ^.4       V P                  V! V^4      ^.4       \        ^.^.^.34      pV P                  V! V^ 4      ^.4       V P                  V! V^4      ^.4       R# r   N)r   tuple_get_itemr*   r   )r   get_itemrO   r7   s   &   r   test_tuple_get_itemCAPITest.test_tuple_get_item{   s    ++sQC!o#q)A3/#q)A3/qcA3_-$*QC0$*QC0r   c                   \         P                  p^.^.^.3pV P                  V! V\        ^ 4      R4       V P                  V! VR^ 4      R4       V P                  V! V^\        4      R4       V P                  V! V^^4      R4       V P                  V! V^^4      R4       \        ^.^.^.34      pV P                  V! V\        ^ 4      R4       V P                  V! VR^ 4      R4       V P                  V! V^\        4      R4       V P                  V! V^^4      R4       V P                  V! V^^4      R4       ^.^.^.^.3pV P                  V! V^^4      ^.^.34       \        ^.^.^.^.34      pV P                  V! V^^4      ^.^.34       ^.^.^.3pV P                  V! V^ ^4      V4       V P                  V! V^ ^d4      V4       V P                  V! VR^d4      V4       \        ^.^.^.34      pV P                  V! V^ ^4      V4       V P                  V! V^ ^d4      V4       V P                  V! VR^d4      V4       V P                  \        V^.^.^..^ ^ 4       V P                  \        V^*^ ^ 4       R# )r   Nr   r&   i)r   tuple_getslicer*   r1   r3   r   r/   r0   )r   getslicerO   s   &  r   test_tuple_getsliceCAPITest.test_tuple_getslice   s   #22 sQC!o#~q92>#r1-r2#q.92>#q!,b1#q!,b1aS1#sO,#~q92>#r1-r2#q.92>#q!,b1#q!,b1 sQC!qc"#q!,sQCj9aS1#sQC01#q!,sQCj9 sQC!o#q!,c2#q#.4#tS137aS1#sO,#q!,c2#q#.4#tS137+x1#sQC!QG+xQ:r   c                   \         P                  p\        P                  p^.^.3pV P	                  V! V^ . 4      . ^.34       V P	                  V! V^. 4      ^.. 34       V! V^\
        4      pV P                  V! V^4      4       \        ^.^.34      pV P                  \        W^ . 4       V P                  \        W\        . 4       V P                  \        WR. 4       V P                  \        W\        V4      . 4       V P                  \        W\        . 4       V P                  \        V^.^ . 4       V P                  \        V^*^ . 4       R# )r   Nr&   )r   tuple_setitemr   r)   r*   NULLr   r   r/   r0   rL   r1   rM   r3   )r   setitemr5   rO   r7   s   &    r   test_tuple_setitemCAPITest.test_tuple_setitem   s,   "0077	sQCja,rA3i8a,sBi8sAt$	$*+qcA3Z(+wa<*gNBG*gB;*gCHbA*gNBG+wQ;+wAr:r   c                   \         P                  p\         P                  p^.^.3pV P                  V! V^ . 4      . ^.34       V P                  V! V^. 4      ^.. 34       V! V^\        4      pV P                  V! V^4      4       \        ^.^.34      pV P                  V! V^ . 4      V4       V P                  V. ^.34       R# rS   )r   tuple_set_itemr)   r*   r_   r   r   r+   )r   set_itemr5   rO   r7   s   &    r   test_tuple_set_itemCAPITest.test_tuple_set_item   s    ++77	sQCj#q"-QCy9#q"-Ry9Q%	$*+qcA3Z(htQ+T2QCy)r   c                |   \         P                  p\         P                  pRpV! V^ R4      pV P                  \	        V4      ^ 4       V P                  \	        V4      ^ 4       V! V^R4      pV P                  \	        V4      ^ 4       V P                  \	        V4      ^4       V P                  V! V^ 4      4       V P                  V! V^4      4       ^.^.^.3pV! V^4      pV P                  WC4       V! V^4      pV P                  WCR,          4       V! V^4      pV P                  \	        V4      ^4       V P                  VR,          V4       V P                  V! V^4      4       V P                  V! V^4      4       RpV P                  \        W\        4       V P                  \        WR4       V P                  \        W\        4       RpV P                  \        W^R4       V P                  \        W^ R4       V P                  \        V. RO^ R4       V P                  \        V\        ^ R4       R# )r   F:Nr   N:NrJ   NNr   r&   rI   )r   _tuple_resizer)   r*   rM   r   r/   r2   r3   r0   r1   r_   )r   resizer5   abs   &    r   test__tuple_resizeCAPITest.test__tuple_resize   s   ((77	1aQ#Q#1aQ#Q#	!Q(	!Q(S1#sO1aL1aLbE"1aLQ#2"	!Q(	!Q(+v.A+v"5+v.A+v!U;+v!U;+vy!UC+vtQ>r   c                   aaa \        4       o. oV3R  loVVV3R lpV P                  \        V! 4       4      S.\        ^
4      O54       V P                  S. 4       R# )c                     < \         P                  ! S4       U u. uF  p \        V \        4      '       g   K  V NK  	  up # u up i )N)gcget_referrers
isinstancer-   )xTAGs    r   referrer_tuples0CAPITest.test_bug_59313.<locals>.referrer_tuples
  s?    !//4 )4!a' A4 ) ) )s
   A A c               3   |   <"   Sx  SS! 4       ,          o\        ^
4       F  p SS! 4       ,          oV x  K  	  R# 5i)
   N)range)rt   ru   rv   tupless    r   my_iter(CAPITest.test_bug_59313.<locals>.my_iter  s8     Io''F2Y/++ s   9<N)r   r*   r-   rz   )r   r|   ru   rv   r{   s   & @@@r   test_bug_59313CAPITest.test_bug_59313  sP     h	)	 	wy)C+<%)+<=$r   r   N)r	   r
   r   r   r   r"   r8   r=   rB   rF   rP   rV   r[   ra   rf   rm   r~   r   __classdictcell__)__classdict__s   @r   r   r      sN     
*
*B(
=
797*
1#;N;0**$?L% %r   r   __main__)unittestrq   test.supportr   import_moduler   r   r_   r1   r3   r-   r   TestCaser   r	   mainr   r   r   <module>r      s     	 &''4	 ../AB ))))	E 	H%x   H%V zMMO r   