+
    Bi!                    
   ^ RI t^ RIt^ RIt^ 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Ht ^ RIHt ^ RIHt  ! R R]4      tR t ! R R	4      t ! R
 R4      t ! R R]4      t ! R R4      t ! R R]]P4                  4      t ! R R]4      t ! R R]4      t ! R R]]P4                  4      t ! R R] 4      t! ! R R]4      t" ! R R]4      t# ! R R]P4                  4      t$ ! R  R!] 4      t% ! R" R#]$4      t&]! 4       t' ! R$ R%4      t( ! R& R'](]P4                  4      t) ! R( R)](]P4                  4      t* ! R* R+](]P4                  4      t+ ! R, R-](]P4                  4      t, ! R. R/](]P4                  4      t- ! R0 R1](]P4                  4      t. ! R2 R3](]P4                  4      t/R4 t0R5 t1 ! R6 R7]P4                  4      t2 ! R8 R9]P4                  4      t3 ! R: R;]P4                  4      t4 ! R< R=]P4                  4      t5 ! R> R?]P4                  4      t6 ! R@ RA4      t7 ! RB RC]7]P4                  4      t8 ! RD RE]7]P4                  4      t9 ! RF RG]7]P4                  4      t: ! RH RI]7]P4                  4      t; ! RJ RK]7]P4                  4      t< ! RL RM4      t= ! RN RO]=]P4                  4      t> ! RP RQ]=]P4                  4      t? ! RR RS]=]P4                  4      t@ ! RT RU]=]P4                  4      tA ! RV RW]=]P4                  4      tB ! RX RY]=]P4                  4      tC ! RZ R[4      tD ! R\ R]]D]P4                  4      tE ! R^ R_]D]P4                  4      tF ! R` Ra]D]P4                  4      tG ! Rb Rc]D]P4                  4      tH ! Rd Re]D]P4                  4      tI ! Rf Rg]P4                  4      tJRh tK ! Ri Rj4      tL ! Rk Rl4      tM ! Rm Rn4      tN ! Ro Rp4      tO ! Rq Rr4      tP ! Rs Rt4      tQ ! Ru Rv4      tR^ RwIHStS Rx tT ! Ry Rz]P4                  4      tU ! R{ R|4      tV ! R} R~4      tW ! R R]P4                  4      tX ! R R4      tY ! R R]Y4      tZ ! R R]Z]P4                  4      t[ ! R R]Z]P4                  4      t\ ! R R]Z]P4                  4      t] ! R R]Z]P4                  4      t^ ! R R]Y4      t_ ! R R]_]P4                  4      t` ! R R]_]P4                  4      ta ! R R]_]P4                  4      tb ! R R]_]P4                  4      tc ! R R]_]P4                  4      td ! R R]_]P4                  4      teR tfR tgR thR ti ! R R]P4                  4      tj]kR8X  d   ]P                  ! 4        R# R# )    N)	randrangeshuffle)support)warnings_helperc                       ] tR t^tRtR# )PassThru N__name__
__module____qualname____firstlineno____static_attributes__r	       $/usr/lib/python3.14/test/test_set.pyr   r          r   r   c               #      "   \         h5i   )r   r	   r   r   check_pass_thrur      s
     
N   	c                   ,   a  ] tR t^t o R tR tRtV tR# )BadCmpc                    ^# r   r	   selfs   &r   __hash__BadCmp.__hash__       r   c                    \         hN)RuntimeErrorr   others   &&r   __eq__BadCmp.__eq__   s    r   r	   Nr   r   r   r   r   r%   r   __classdictcell____classdict__s   @r   r   r      s      r   r   c                   *   a  ] tR t^t o RtR tRtV tR# )ReprWrapperz*Used to test self-referential repr() callsc                ,    \        V P                  4      # r!   )reprvaluer   s   &r   __repr__ReprWrapper.__repr__   s    DJJr   r	   N)r   r   r   r   __doc__r0   r   r(   r)   s   @r   r,   r,      s     0   r   r,   c                   0   a  ] tR t^"t o RtR tR tRtV tR# )HashCountingIntzBint-like object that counts the number of times __hash__ is calledc                    ^ V n         R# r   N
hash_count)r   argss   &*r   __init__HashCountingInt.__init__$   s	    r   c                ^    V ;P                   ^,          un         \        P                  V 4      # r   )r8   intr   r   s   &r   r   HashCountingInt.__hash__&   s    1||D!!r   r7   N)	r   r   r   r   r2   r:   r   r   r(   r)   s   @r   r4   r4   "   s     H" "r   r4   c                      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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# )TestJointOpsc                    R ;V n         pRV n        RV n        V P                  V4      V n        \
        P                  V4      V n        R# )
simsalabim
madagascar4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZN)word	otherwordlettersthetypesdictfromkeysd)r   rE   s   & r   setUpTestJointOps.setUp-   s<    ''	D%Md#t$r   c                    V P                  \        V P                  . ^4       V P                  \        \        4       P                  ^R7       R# )   aN)assertRaises	TypeErrorrH   setr:   r   s   &r   test_new_or_initTestJointOps.test_new_or_init4   s5    )T\\2q9)SU^^q9r   c                   \        V P                  4      p\        V P                  4      pV P                  W4       V P	                  \
        V P                  \        4       4       V P	                  \        V P                  . .4       R # r!   )	sortedrI   rL   assertEqualrS   r   rH   r   rT   )r   actualexpecteds   &  r   test_uniquification TestJointOps.test_uniquification8   s[    $&&>*(DLL/2CD)T\\B48r   c                v    V P                  \        V P                  4      \        V P                  4      4       R # r!   )rZ   lenrI   rL   r   s   &r   test_lenTestJointOps.test_len?   s"    TVVc$&&k2r   c                x   V P                    F-  pV P                  WP                  9   WP                  9   4       K/  	  V P	                  \
        V P                  P                  . .4       V P                  \        V P                   4      .4      pV P                  V P                  V P                   4      V4       R # r!   )
rG   rZ   rI   rL   rS   rT   __contains__rH   	frozensetassertIn)r   crI   s   &  r   test_containsTestJointOps.test_containsB   s    AQ&&[!vv+6 )TVV%8%82$?LL)DLL123dll4<<0!4r   c           	        V P                   P                  V P                  4      pV P                   F9  pT P	                  W!9   W P
                  9   ;'       g    W P                  9   4       K;  	  V P	                  V P                   V P                  V P                  4      4       V P	                  \        V4      V P                  4       V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       \        \        \         P"                  \$        \&        \(        3 EFF  pV P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      V! R	4      4      \        R4      4       EKI  	  V P                  4       pV P	                  VP                  \        ^.4      V\        ^.4      4      V P                  ^^.4      4       R
# )abcbacdcabcdefgfeabcefgccbabcefabceffgN)rI   unionrF   rG   rZ   rL   rH   rE   typebasetyperS   r   r   rT   rU   re   rJ   rK   strlisttuple)r   urg   Cxs   &    r   
test_unionTestJointOps.test_unionI   s   FFLL(AQVQ&&[%G%GA4GH dii!89a$--0(DFFLL/2CD)TVV\\B48iT5@AT\\'2885BCKPT\\'2887Dc(mTT\\'2885BCJOT\\'2884A3w<PT\\'2884!D'JCPXMZ A LLNaS1c1#h7q!f9MNr   c                   V P                   P                  V P                  4      pV P                  V P                   \	        V P                  4      ,          V4       V P                  V P                   \        V P                  4      ,          V4        V P                   V P                  ,           V P                  R 4       R#   \         d     R# i ; i)z(s|t did not screen-out general iterablesN)rI   ru   rF   rZ   rU   re   failrT   r   is   & r   test_orTestJointOps.test_or\   s    FFLL(#dnn"55q9)DNN";;Q?	BFFT^^# II@A  		   C CCc           	        V P                   P                  V P                  4      pV P                   F9  pT P	                  W!9   W P
                  9   ;'       d    W P                  9   4       K;  	  V P	                  V P                   V P                  V P                  4      4       V P	                  \        V4      V P                  4       V P                  \        V P                   P                  \        4       4       \        \        \        P                   \"        \$        \&        3 EFF  pV P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      V! R	4      4      \        R
4      4       EKI  	  V P                  R 4      pVP                  4       pV P                  \        4       8X  d'   V P	                  \)        V4      \)        V4      4       R# V P+                  \)        V4      \)        V4      4       R# )rk   rl   ccrn    rp   bcrr   cbcfbagbN)rI   intersectionrF   rG   rZ   rL   rH   rE   rv   rw   rS   r   r   rU   re   rJ   rK   rx   ry   rz   idassertNotEqual)r   r   rg   r|   rI   zs   &     r   test_intersectionTestJointOps.test_intersectiong   s   FF/AQVQ&&[%H%HQ..5HI dii!89a$--0(DFF$7$79JKiT5@AT\\'2??%I3t9UT\\'2??'
KSQSWUT\\'2??%I3t9UT\\'2??$H#b'RT\\'2??&	1U8TVYZ]V^_ A LL!NN<<9;&RUBqE*1r!u-r   c                V   R  pR F  pV P                  V4      pR F  p\        \        \        P                  \
        \        \        3 FT  pV! V4      pVP                  V4      pV! W64      pV P                  Wx4       T P                  VRJ ;'       g    VRJ 4       KV  	  K  	  K  	  R# )c                @    \        V 4      P                  V4      '       * # )z&Pure python equivalent of isdisjoint())rU   r   )s1s2s   &&r   f'TestJointOps.test_isdisjoint.<locals>.f|   s    2w++B///r   TFN)
r   rR   abrq   ababacrl   r   rn   rp   rr   )rH   rU   re   rJ   rK   rx   ry   rz   
isdisjointrZ   
assertTrue)	r   r   largr   rargr|   r   r[   r\   s	   &        r   test_isdisjointTestJointOps.test_isdisjoint{   s    	0 VDd#BYiT5HA4B]]2.F yH$$V6OOFdN$E$EfoF I Z Vr   c                   V P                   P                  V P                  4      pV P                  V P                   \	        V P                  4      ,          V4       V P                  V P                   \        V P                  4      ,          V4        V P                   V P                  ,           V P                  R 4       R#   \         d     R# i ; i)z(s&t did not screen-out general iterablesN)rI   r   rF   rZ   rU   re   r   rT   r   s   & r   test_andTestJointOps.test_and   s    FF/#dnn"55q9)DNN";;Q?	BFFT^^# II@A  		r   c           	        V P                   P                  V P                  4      pV P                   F9  pT P	                  W!9   W P
                  9   ;'       d    W P                  9  4       K;  	  V P	                  V P                   V P                  V P                  4      4       V P	                  \        V4      V P                  4       V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       \        \        \         P"                  \$        \&        \(        3 EF~  pV P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  4       \        R4      4       V P	                  V P                  R 4      P                  V! R4      V! R4      4      \        R	4      4       EK  	  R
# )rk   rl   r   rn   rq   rp   rR   rr   r   rg   N)rI   
differencerF   rG   rZ   rL   rH   rE   rv   rw   rS   r   r   rT   rU   re   rJ   rK   rx   ry   rz   r   r   rg   r|   s   &   r   test_differenceTestJointOps.test_difference   s   FFdnn-AQVQ&&[%L%LQnn5LM dii!89a$--0(DFF$5$57HI)TVV%6%6=iT5@AT\\'2==ahGTST\\'2==ajI3u:VT\\'2==ahGSRT\\'2==agFE
ST\\'2==?ULT\\'2==afafMsSVxX Ar   c                   V P                   P                  V P                  4      pV P                  V P                   \	        V P                  4      ,
          V4       V P                  V P                   \        V P                  4      ,
          V4        V P                   V P                  ,
           V P                  R 4       R#   \         d     R# i ; i)z(s-t did not screen-out general iterablesN)rI   r   rF   rZ   rU   re   r   rT   r   s   & r   test_subTestJointOps.test_sub   s    FFdnn-#dnn"55q9)DNN";;Q?	BFFT^^# II@A  		r   c                   V P                   P                  V P                  4      pV P                   F6  pV P	                  W!9   W P
                  9   W P                  9   ,          4       K8  	  V P	                  V P                   V P                  V P                  4      4       V P	                  \        V4      V P                  4       V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       \        \        \         P"                  \$        \&        \(        3 EF   pV P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       V P	                  V P                  R 4      P                  V! R4      4      \        R4      4       EK  	  R	# )
rk   rl   abdrn   ro   rp   rR   rr   rs   N)rI   symmetric_differencerF   rG   rZ   rL   rH   rE   rv   rw   rS   r   r   rT   rU   re   rJ   rK   rx   ry   rz   r   s   &   r   test_symmetric_difference&TestJointOps.test_symmetric_difference   s   FF''7AQVa66ka>>6I%JK dii!89a$--0(DFF$?$?ARS)TVV%@%@2$GiT5@AT\\'2GG%QSVW\S]^T\\'2GG'
SUXYaUbcT\\'2GG%QSVWZS[\T\\'2GG$PRUV]R^_	 Ar   c                   V P                   P                  V P                  4      pV P                  V P                   \	        V P                  4      ,          V4       V P                  V P                   \        V P                  4      ,          V4        V P                   V P                  ,           V P                  R 4       R#   \         d     R# i ; i)z(s^t did not screen-out general iterablesN)rI   r   rF   rZ   rU   re   r   rT   r   s   & r   test_xorTestJointOps.test_xor   s    FF''7#dnn"55q9)DNN";;Q?	BFFT^^# II@A  		r   c                "   V P                  V P                  \        V P                  4      4       V P                  V P                  \	        V P                  4      4       V P                  V P                  V P                  8H  R 4       V P                  V P                  \        V P                  4      4       V P                  V P                  \	        V P                  4      4       V P                  V P                  V P                  8g  R4       R# FTN)rZ   rI   rU   rE   re   r   rF   r   s   &r   test_equalityTestJointOps.test_equality   s    TYY0499!56499,e4DFFC$78DFFIdnn$=>499,d3r   c                    \        \        . RO4      pV P                  V4      pV P                  \	        V4      ^4       R# )abcdefN)r   bcdbdcbfedfedccba)mapre   rH   rZ   r`   )r   trI   s   &  r   test_setOfFrozensets!TestJointOps.test_setOfFrozensets   s0    	FGLLOQ#r   c                   \        V P                  . RO4      w  rpV P                  W8  4       V P                  W8*  4       V P                  W"8*  4       V P                  W!8  4       V P                  W!8  4       V P                  W#8  4       V P                  W#8*  4       V P                  W#8  4       V P                  W#8  4       V P                  \	        R4      P                  R4      4       V P                  \	        R4      P                  R4      4       V P                  \	        R4      P                  R4      4       V P                  \	        R4      P                  R4      4       R# )r   rR   rq   cbsN)r   abcdedef)r   rH   r   assertFalserU   issubset
issuperset)r   pqrs   &   r   test_sub_and_superTestJointOps.test_sub_and_super   s   dll$:;a  C))%01E
--c23S**512U..s34r   c                $   \        \        P                  ^,           4       EFj  p\        V P                  4      \
        \        39  d%   R.V P                  n        R.V P                  n        \        P                  ! V P                  V4      p\        P                  ! V4      pV P                  V P                  W0P                  : RV: 24       \        V P                  4      \
        \        39  g   K  V P                  V P                  P                  VP                  4       V P                  V P                  P                  VP                  4       V P                  V P                  R4       V P                  =V P                  =EKm  	  R# )r   r}   r    != yN)rangepickleHIGHEST_PROTOCOLrv   rI   rU   re   r}   r   dumpsloadsrZ   assertNotHasAttr)r   r   r   dups   &   r   test_picklingTestJointOps.test_pickling   s    v..23ADFF|C#3355TVVQ'A,,q/CTVVS*DEDFF|C#33  3551  3551%%dffc2FFHdffh 4r   c                   \        \        P                  ^,           4       EF0  p\        V P                  4      pV P                  V P                  4      p\        P                  ! W!4      p\        P                  ! V4      pV P                  V\        P                  P                  4       V P                  V P                  V4      V4       \        P                  ! V4      p \        V4      p\        P                  ! YQ4      p\        P                  ! T4      pT P                  T P                  T4      Y0P                  T34      ,
          4       EK3  	  R#   \         d     EKF  i ; ir   N)r   r   r   iterrI   rH   r   r   assertIsInstancecollectionsrq   IteratorrZ   nextStopIteration)r   protoitorgdatarL   itdrops   &      r   test_iterator_pickling#TestJointOps.test_iterator_pickling   s    622Q67ELE<<'DU*AaB !!"koo&>&>?T\\"-t4aBBx R'AaBT\\"-tllD76K/KL% 8 ! s   #EE('E(c                  a  ! V3R  lR4      oS! ^
4      pV P                  V.4      p\        P                  ! V4      pV P                  \	        V4      \	        V4      4       V F  pTpK  	  V P                  \	        V4      \	        X4      4       V P                  VP                  ^,           VP                  4       R# )c                   >   <a  ] tR tRt o R tR tRV3R lltRtV tR# )*TestJointOps.test_deepcopy.<locals>.Traceri	  c                    Wn         R # r!   r/   )r   r/   s   &&r   r:   3TestJointOps.test_deepcopy.<locals>.Tracer.__init__
  s    "
r   c                    V P                   # r!   r   r   s   &r   r   3TestJointOps.test_deepcopy.<locals>.Tracer.__hash__  s    zz!r   Nc                6   < S! V P                   ^,           4      # r   r   )r   memoTracers   &&r   __deepcopy__7TestJointOps.test_deepcopy.<locals>.Tracer.__deepcopy__  s    djj1n--r   r   r!   )	r   r   r   r   r:   r   r   r   r(   )r*   r   s   @r   r   r   	  s     #". .r   r   N)rH   copydeepcopyr   r   rZ   r/   )r   r   rI   r   elemnewtr   s   &     @r   test_deepcopyTestJointOps.test_deepcopy  s    	. 	. 2JLL!mmABqE2c7+DD BqE2d8,1djj1r   c                   a  ! R  R4      o\        V3R l\        R4       4       4      pV F   pWn        W"n        \        V.4      Vn         K"  	  R# )c                       ] tR tRtRtR# )TestJointOps.test_gc.<locals>.Ai  r	   Nr
   r	   r   r   Ar         r   r   c              3   2   <"   T F  pS! 4       x  K  	  R # 5ir!   r	   ).0r   r   s   & r   	<genexpr>'TestJointOps.test_gc.<locals>.<genexpr>  s     )[[     N)rU   r   cyclesub)r   rI   r   r   s   &  @r   test_gcTestJointOps.test_gc  sB    	 	)U4[))DJHD6{DH r   c                     ! R  RV P                   4      pV! 4       p\        4       pVP                  V4       V P                  W#4       VP	                  V4       VP                  V4       VP                  V4       R# )c                   &   a  ] tR tRt o R tRtV tR# )6TestJointOps.test_subclass_with_custom_hash.<locals>.Hi%  c                8    \        \        V 4      R ,          4      # )i)r=   r   r   s   &r   r   ?TestJointOps.test_subclass_with_custom_hash.<locals>.H.__hash__&  s    2d8j011r   r	   Nr   r   r   r   r   r   r(   r)   s   @r   Hr  %  s     2 2r   r  N)rH   rU   addrf   removediscard)r   r  rI   r   s   &   r   test_subclass_with_custom_hash+TestJointOps.test_subclass_with_custom_hash#  sZ    	2 	2 #
%	aa		a			!r   c                   V P                  \        4       .4      pV P                  \        V P                   \        4       \        4       .4       V P                  \        VP                  \        4       4       \        VR 4      '       d~   V P                  \        VP                  \        4       4       V P                  \        VP                  \        4       4       V P                  \        VP                  \        4       4       R# R# )r  N)	rH   r   rS   r"   rd   hasattrr  r  r  r   rI   s   & r   test_badcmpTestJointOps.test_badcmp0  s    LL&($,vx6JK,A1elAEE68<lAIIvx@lAHHfh? r   c                6   \        4       pV P                  V.4      pW!n        V P                  \        8X  d   V P	                  \        V4      R 4       R# \        V4      P                  R4      ^ ,          pV P	                  \        V4      V: RV: R24       R# )z
{set(...)}(z({z(...)})N)r,   rH   r/   rU   rZ   r.   	partition)r   wrI   names   &   r   test_cyclical_reprTestJointOps.test_cyclical_repr;  sp    MLL!<<3T!Wl37$$S)!,DT!Wt&DEr   c                   ^
p\         P                  \        \        \	        V4      4      4      pV P                  \        R V 4       4      V4       V P                  V4      pV P                  \        R V 4       4      V4       VP                  V4       V P                  \        R V 4       4      V4       \        VR4      '       d   VP                  V4       V P                  \        R V 4       4      V4       \         P                  \        V4      4      pV P                  \        R V 4       4      V4       \         P                  \        V4      4      pV P                  \        R V 4       4      V4       \         P                  \        V4      ^{4      pV P                  \        R V 4       4      V4       V P                  V\         P                  V^{4      4       R	# )

   c              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r  r   s   & r   r  <TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>H       ;__   c              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r'  s   & r   r  r(  J  r)  r*  c              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r'  s   & r   r  r(  L  r)  r*  symmetric_difference_updatec              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r'  s   & r   r  r(  O  r)  r*  c              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r'  s   & r   r  r(  Q  r)  r*  c              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r'  s   & r   r  r(  S  r)  r*  c              3   8   "   T F  qP                   x  K  	  R # 5ir!   r7   r'  s   & r   r  r(  U  r)  r*  N)rJ   rK   r   r4   r   rZ   sumrH   r   r  r-  rU   re   )r   nrL   rI   d2d3s   &     r   test_do_not_rehash_dict_keys)TestJointOps.test_do_not_rehash_dict_keysE  sd   MM#ouQx89;;;Q?LLO;;;Q?	Q;;;Q?1344))!,;;;Q?]]3q6";;;Q?]]9Q<(;;;Q?]]9Q<-;;;Q?T]]1c23r   c                     ! R  R\         4      pV! 4       p\        P                  ! V4      p\        V^.4      p\	        V4      Vn        ??\        P                  ! 4        V P                  V! 4       RJ R4       R# )c                       ] tR tRtRtR# )/TestJointOps.test_container_iterator.<locals>.CiZ  r	   Nr
   r	   r   r   r|   r:  Z  r  r   r|   NzCycle was not collected)	objectweakrefrefrU   r   r}   gccollectr   )r   r|   objr=  	containers   &    r   test_container_iterator$TestJointOps.test_container_iteratorX  s^    	 	ckk#aM	Y


'@Ar   c                R    \         P                  ! V \        V P                  4       R # r!   )r   check_free_after_iteratingr   rH   r   s   &r   test_free_after_iterating&TestJointOps.test_free_after_iteratingd  s    **4t||Dr   )rL   rG   rF   rI   rE   N)!r   r   r   r   rM   rV   r]   ra   rh   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
  r  r  r"  r6  rB  rF  r   r(   r)   s   @r   r@   r@   *   s     %:935O&	B.(G	BY 	B`	B4$
5 'M*2"#	@F4&
BE Er   r@   c                      a  ] tR tRt o ]t]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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# )TestSetig  c                   V P                  4       pVP                  V P                  4       V P                  V\	        V P                  4      4       VP                  V P
                  4       V P                  V\	        V P
                  4      4       V P                  \        VP                  V^4       V P                  \        VP                  ^4       R# rP   N)rH   r:   rE   rZ   rU   rF   rS   rT   r  s   & r   	test_initTestSet.test_initk  s    LLN	

499C		N+	

4>>"C/0)QZZA6)QZZ3r   c                    V P                  \        ^4      4      pV P                  V4      pV P                  \        V4      \        V4      4       R#    NrH   r   r   r   r   rI   r   s   &  r   test_constructor_identity!TestSet.test_constructor_identityt  9    LLq"LLOBqE2a5)r   c                J    \        . RO4      p0 RmpV P                  W4       R# )r   Nr   rP   rP     r   rP   rP  rU   rZ   rR  s   &  r   test_set_literalTestSet.test_set_literaly  s    Lr   c                    0 RmpV P                  \        V4      ^4       VP                  4       pV P                  \        V4      \        4       R# )r   N>   r   )rZ   r`   poprv   r=   )r   rI   stored_values   &  r    test_set_literal_insertion_order(TestSet.test_set_literal_insertion_order~  s;    Q#uuwl+S1r   c                n   a . oV3R  lpV! ^4      V! ^4      V! ^4      0pV P                  S. RO4       R# )c                 *   < SP                  V 4       R # r!   )append)r@  eventss   &r   record9TestSet.test_set_literal_evaluation_order.<locals>.record  s    MM#r   NrW  )rZ   )r   re  rI   rd  s   &  @r   !test_set_literal_evaluation_order)TestSet.test_set_literal_evaluation_order  s5    	AYq	6!9-+r   c                P    V P                  \        \        V P                  4       R # r!   )rS   rT   hashrI   r   s   &r   	test_hashTestSet.test_hash  s    )T4662r   c                    V P                   P                  4        V P                  V P                   \        4       4       V P                  \	        V P                   4      ^ 4       R# r6   )rI   clearrZ   rU   r`   r   s   &r   
test_clearTestSet.test_clear  s=    'TVVa(r   c                   V P                   P                  4       pV P                  V P                   V4       V P                  \	        V P                   4      \	        V4      4       V P                  \        V4      V P                  4       R # r!   )rI   r   rZ   r   r   rv   rw   r   r   s   & r   	test_copyTestSet.test_copy  sY    ffkkm%BtvvJ30cDMM2r   c                l   V P                   P                  R 4       V P                  R V P                   4       V P                   P                  4       pV P                   P                  R 4       V P	                  V P                   V4       V P                  \        V P                   P                  . 4       R# )QN)rI   r  rf   r   rZ   rS   rT   rr  s   & r   test_addTestSet.test_add  so    

3c466"ffkkm

3%)TVVZZ4r   c                   V P                   P                  R 4       V P                  R V P                   4       V P                  \        V P                   P                  R4       V P                  \
        V P                   P                  . 4       V P                  \        V P                  4      .4      pV P                  V P                  V P                  4      V4       VP                  V P                  V P                  4      4       V P                  V P                  V P                  4      V4       V P                  \        V P                   P                  V P                  V P                  4      4       R# rR   rv  N)
rI   r  assertNotInrS   KeyErrorrT   rH   re   rE   rf   r  s   & r   test_removeTestSet.test_remove  s    cdff%(DFFMM37)TVV]]B7LL)DII./0dll499-q1	dii()dii0!4(DFFMM4<<		3JKr   c                    R F/  p V P                   P                  V4       V P                  4        K1  	  R#   \         d0   pTP                  ^ ,          pT P                  Y4        Rp?Kj  Rp?ii ; i)rv  N)rv  r   )rI   r  r   r|  r9   rZ   )r   v1ev2s   &   r   test_remove_keyerror_unpacking&TestSet.test_remove_keyerror_unpacking  s\    Bb!
 		   )VVAY  (()s   8A2$A--A2c           	     B   V P                  ^^.4      p V P                  P                  V4       V P                  4        R#   \         dR   pT P                  TP                  ^ ,          TJ RP                  TTP                  ^ ,          4      4        Rp?R# Rp?ii ; i)rP  zKeyError should be {0}, not {1}N)rH   rI   r  r   r|  r   r9   format)r   keyr  s   &  r   test_remove_keyerror_set TestSet.test_remove_keyerror_set  s    llAq6"	FFMM# IIK  	NOOAFF1I,:AA#BC&&)MN N	Ns   A BABBc                   V P                   P                  R 4       V P                  R V P                   4       V P                   P                  R4       V P                  \        V P                   P                  . 4       V P                  \        V P                  4      .4      pV P                  V P                  V P                  4      V4       VP                  V P                  V P                  4      4       V P                  V P                  V P                  4      V4       VP                  V P                  V P                  4      4       R# rz  )	rI   r  r{  rS   rT   rH   re   rE   rf   r  s   & r   test_discardTestSet.test_discard  s    sdff%s)TVV^^R8LL)DII./0dll499-q1			$,,tyy)*dii0!4			$,,tyy)*r   c                   \        \        V P                  4      4       F8  pV P                  P                  4       pV P	                  W P                  4       K:  	  V P                  \        V P                  P                  4       R # r!   )r   r`   rI   r]  r{  rS   r|  )r   r   r   s   &  r   test_popTestSet.test_pop  sT    s466{#A66::<DT66* $ 	(DFFJJ/r   c           
     :   V P                   P                  V P                  4      pV P                  VR 4       V P                  V P                  ,            F  pV P                  W P                   4       K   	  V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       R F  w  r4\        \        \        P                  \        \        \         3 FV  pV P#                  R4      pV P                  VP                  V! V4      4      R 4       V P                  V\        V4      4       KX  	  K  	  R F  pRp\        \        \        P                  \        \        \         3 F}  pV P#                  R4      pV P                  VP                  V! V4      V! V4      4      R 4       V P                  V\        V4      \        V4      ,          \        V4      ,          4       K  	  K  	  R # )Nrk   ahi))rl   rm   rn   ro   )rp   rq   rr   rs   )rl   rn   rp   rr   abcda)rI   updaterF   rZ   rE   rf   rS   r   r   rT   rU   re   rJ   rK   rx   ry   rz   rH   r   retvalrg   r   r   r|   rI   s   &      r   test_updateTestSet.test_update  su   t~~.&))dnn,,AMM!VV$ -(DFFMM?3DE)TVV]]RD9[DA)T]]CuDLL)  !A$6  CF+ E \
 8AA)T]]CuDLL)  !A$!!5t<  CFSVOc!f$<= E 8r   c                    V ;P                   \        V P                  4      ,          un         V P                  V P                  ,            F  pV P	                  WP                   4       K   	  R # r!   )rI   rU   rF   rE   rf   r   rg   s   & r   test_iorTestSet.test_ior  sC    #dnn%%))dnn,,AMM!VV$ -r   c           
     H   V P                   P                  V P                  4      pV P                  VR 4       V P                  V P                  ,            F[  pW P                  9   d.   W P                  9   d   V P                  W P                   4       K@  V P                  W P                   4       K]  	  V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       R EF  w  r4\        \        \        P                  \        \         \"        3 F  pV P%                  R4      pV P                  VP                  V! V4      4      R 4       V P                  V\        V4      4       RpV P%                  V4      pRpV P                  VP                  V! V4      V! V4      4      R 4       V P                  V\        R4      \        V4      ,          \        V4      ,          4       K  	  EK  	  R # )Nrk   cbc))rl   rg   )rn   r   )rp   r   )rr   r   )rI   intersection_updaterF   rZ   rE   rf   r{  rS   r   r   rT   rU   re   rJ   rK   rx   ry   rz   rH   )	r   r  rg   r   r   r|   rI   ssr   s	   &        r   test_intersection_update TestSet.test_intersection_update  s   ++DNN;&))dnn,,ANN"qII~a(  FF+	 -
 	(DFF$>$>@QR)TVV%?%?"FLDA)T]]CuDLL)  !6!6qt!<dC  CF+LL$  !6!6qtQqT!BDI  CLQ$7A$>? E Mr   c                V   V ;P                   \        V P                  4      ,          un         V P                  V P                  ,            F[  pWP                  9   d.   WP                  9   d   V P	                  WP                   4       K@  V P                  WP                   4       K]  	  R # r!   rI   rU   rF   rE   rf   r{  r  s   & r   	test_iandTestSet.test_iand  sg    #dnn%%))dnn,,ANN"qII~a(  FF+	 -r   c           	     X   V P                   P                  V P                  4      pV P                  VR 4       V P                  V P                  ,            F[  pW P                  9   d.   W P                  9  d   V P                  W P                   4       K@  V P                  W P                   4       K]  	  V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       V P                  \        V P                   P                  . .4       R EFd  w  r4\        \        \        P                  \         \"        \$        3 EF/  pV P'                  R4      pV P                  VP                  V! V4      4      R 4       V P                  V\        V4      4       V P'                  R4      pVP                  4        V P                  W`P'                  R4      4       V P'                  R4      pVP                  V! R4      4       V P                  W`P'                  R4      4       V P'                  R4      pVP                  V! R4      V! R4      4       V P                  W`P'                  R4      4       EK2  	  EKg  	  R # )Nrl   rk   
abcdefghihabacdefghihefghih))rl   r   )rn   rq   rp   rR   )rr   rq   )rI   difference_updaterF   rZ   rE   rf   r{  rS   r   r   rT   r-  rU   re   rJ   rK   rx   ry   rz   rH   r  s   &      r   test_difference_updateTestSet.test_difference_update
  s   ))$..9&))dnn,,AII~!>>"9a(  FF+	 -
 	(DFF$<$<o>OP)TVV%=%=tD)TVV%G%G"NRDA)T]]CuDLL)  !4!4QqT!:DA  CF+LL.##%  LL$>?LL.##AeH-  LL$<=LL.##AeHah7  LL$:; E Sr   c                V   V ;P                   \        V P                  4      ,          un         V P                  V P                  ,            F[  pWP                  9   d.   WP                  9  d   V P	                  WP                   4       K@  V P                  WP                   4       K]  	  R # r!   r  r  s   & r   	test_isubTestSet.test_isub'  sg    #dnn%%))dnn,,AII~!>>"9a(  FF+	 -r   c           	     V   V P                   P                  V P                  4      pV P                  VR 4       V P                  V P                  ,            Fb  pW P                  9   W P                  9   ,          '       d   V P                  W P                   4       KG  V P                  W P                   4       Kd  	  V P                  \        V P                   P                  \        4       4       V P                  \        V P                   P                  . .4       R F  w  r4\        \        \        P                  \        \         \"        3 FV  pV P%                  R4      pV P                  VP                  V! V4      4      R 4       V P                  V\        V4      4       KX  	  K  	  R # )Nrk   ))rl   r   r  r  r  )rI   r-  rF   rZ   rE   rf   r{  rS   r   r   rT   rU   re   rJ   rK   rx   ry   rz   rH   r  s   &      r    test_symmetric_difference_update(TestSet.test_symmetric_difference_update/  s'   33DNNC&))dnn,,AYY1#677a(  FF+	 -
 	(DFF$F$FHYZ)TVV%G%G"NXDA)T]]CuDLL)  !>!>qt!DdK  CF+ E Yr   c                d   V ;P                   \        V P                  4      ,          un         V P                  V P                  ,            Fb  pWP                  9   WP                  9   ,          '       d   V P	                  WP                   4       KG  V P                  WP                   4       Kd  	  R # r!   r  r  s   & r   	test_ixorTestSet.test_ixor?  sm    #dnn%%))dnn,,AYY1#677a(  FF+	 -r   c                   V P                   P                  4       pW,          pV P                  WP                   4       W,          pV P                  WP                   4       W,          pV P                  WP                  4       4       V P                   P                  4       pW,          pV P                  WP                  4       4       R # r!   )rI   r   rZ   rH   )r   r   s   & r   test_inplace_on_selfTestSet.test_inplace_on_selfG  s    FFKKM	FF#	FF#	LLN+FFKKM	LLN+r   c                    V P                  R 4      p\        P                  ! V4      pV P                  \	        V4      \	        V4      4       Rp\
        P                  ! 4        V P                  \        \        V4       R# )gallahadN)	rH   r<  proxyrZ   rx   r   
gc_collectrS   ReferenceError)r   rI   r   s   &  r   test_weakrefTestSet.test_weakrefS  sY    LL$MM!QQ(.#q1r   c                R    ! R  R4      p0 RmpV! 4       pW#8   V P                  VP                  4       V! 4       pW#8   V P                  VP                  4       V! 4       pW#8*   V P                  VP                  4       V! 4       pW#8   V P                  VP                  4       R# )c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )5TestSet.test_rich_compare.<locals>.TestRichSetComparei\  c                    R V n         R# TF)	gt_calledr   some_sets   &&r   __gt__<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__gt__]      !%r   c                    R V n         R# r  )	lt_calledr  s   &&r   __lt__<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__lt__`  r  r   c                    R V n         R# r  )	ge_calledr  s   &&r   __ge__<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__ge__c  r  r   c                    R V n         R# r  )	le_calledr  s   &&r   __le__<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__le__f  r  r   )r  r  r  r  N)
r   r   r   r   r  r  r  r  r   r(   r)   s   @r   TestRichSetComparer  \  s      r   r  NrX  )r   r  r  r  r  )r   r  mysetmyobjs   &   r   test_rich_compareTestSet.test_rich_compare[  s    	 	" "$("$("$("$(r   c           	        \        \        ^4      4      pVR^0pV P                  \        \        ^4      4      V4       V P	                  \        \        ^4      4      V4       VP                  \        \        ^4      4      4       V P                  VR^04       V P                  \        VP                  \        \        ^4      4      4       V P                  \        VP                  \        \        ^4      4      4       R# )rP  rq   N)
re   r   rf   rU   r{  r  rZ   rS   r|  r  )r   myfrozensetr  s   &  r   test_set_membershipTestSet.test_set_membership  s    a)eQ'c%(mU+U1X.c%(m$
+(ELL#eAh-@(ELL#eAh-@r   c                8  a  R 0p. ROpV 3R lpV! 4       ;_uu_ 4        W!9    RRR4       V! 4       ;_uu_ 4        VP                  V4       RRR4       V! 4       ;_uu_ 4        VP                  V4       RRR4        ! R R4      pV! 4       pS P                  \        4      ;_uu_ 4        WQ9    RRR4       S P                  \        4      ;_uu_ 4        VP                  V4       RRR4       S P                  \        4      ;_uu_ 4        VP                  V4       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)rR   c                  \   < R p SP                  \        \        P                  ! V 4      4      # )z<cannot use 'list' as a set element (unhashable type: 'list'))assertRaisesRegexrT   reescape)msgr   s    r   check_unhashable_elementATestSet.test_unhashable_element.<locals>.check_unhashable_element  s#    PC)))RYYs^DDr   Nc                   &   a  ] tR tRt o R tRtV tR# )2TestSet.test_unhashable_element.<locals>.HashErrori  c                    \        R 4      h)error)r|  r   s   &r   r   ;TestSet.test_unhashable_element.<locals>.HashError.__hash__  s    w''r   r	   Nr  r)   s   @r   	HashErrorr    s     ( (r   r  rW  )r  r  rS   r|  )r   r  r   r  r  elem2s   f     r   test_unhashable_elementTestSet.test_unhashable_element  s   	E &''M (%''IIdO (%''MM$ (
	( 	( x((N )x((IIe )x((MM%  )(% ('''''' )((((((sF   D(D<#E+E"E5F(D9	<E	E	"E2	5F	F	r	   N)$r   r   r   r   rU   rH   rw   rL  rS  rZ  r_  rg  rk  ro  rs  rw  r}  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r(   r)   s   @r   rI  rI  g  s     GH4*

2,3)
35	L			+0>&%
@*,<:,, ,
,2")HA! !r   rI  c                       ] tR tRtRtR# )SetSubclassi  r	   Nr
   r	   r   r   r  r    r   r   r  c                   .   a  ] tR tRt o ]t]tR tRt	V t
R# )TestSetSubclassi  c                p    ! R  R\         4      pV! ^^.4      pV P                  \        V4      V4       V P                  \        V4      ^^04       V P	                  \
        4      ;_uu_ 4        V! R	R7       RRR4        ! R R\         4      pV! ^^.^R7      pV P                  \        V4      V4       V P                  \        V4      ^^04       V P                  VP                  ^4        ! R R\         4      pV! ^^.4      pV P                  \        V4      V4       V P                  \        V4      ^^04       V P                  VP                  4       V P	                  \
        4      ;_uu_ 4        V! ^^.^R7       RRR4       R#   + '       g   i     EL ; i  + '       g   i     R# ; i)
c                       ] tR tRtRtR# );TestSetSubclass.test_keywords_in_subclass.<locals>.subclassi  r	   Nr
   r	   r   r   subclassr    r  r   r  sequenceNc                   6   a a ] tR tRt oRV 3R lltRtVtV ;t# )ETestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_initi  c                2   < \         SV `  V4       W n        R # r!   )superr:   newarg)r   argr  	__class__s   &&&r   r:   NTestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_init.__init__  s     %$r   r  r!   )r   r   r   r   r:   r   r(   __classcell__r  r*   s   @@r   subclass_with_initr     s     % %r   r
  r  c                   6   a a ] tR tRt oRV 3R lltRtVtV ;t# )DTestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_newi  c                2   < \         SV `  W4      pW#n        V# r!   r  __new__r  clsr  r  r   r  s   &&& r   r  LTestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_new.__new__      ws0$r   r  r!   r   r   r   r   r  r   r(   r  r	  s   @@r   subclass_with_newr          r   r  r	   )rU   assertIsrv   rZ   rS   rT   r  assertIsNoner   r  r{   r
  r  s   &    r   test_keywords_in_subclass)TestSetSubclass.test_keywords_in_subclass  sY   	s 	aVd1gx(Q!Q(y))b! *	% 	% 1va0d1g12Q!Q(1%	 	
 q!f%d1g01Q!Q(!((#y))q!fQ/ *)- *)), *))s   /
F9F$F!	$F5	r	   N)r   r   r   r   r  rH   rU   rw   r  r   r(   r)   s   @r   r  r    s     GH0 0r   r  c                   R   a  ] tR tRt o ]t]tR tR tR t	R t
R tR tR tR	tV tR
# )TestFrozenSeti  c                    V P                  V P                  4      pVP                  V P                  4       V P	                  V\        V P                  4      4       R # r!   )rH   rE   r:   rF   rZ   rU   r  s   & r   rL  TestFrozenSet.test_init  s<    LL#	

4>>"C		N+r   c                    V P                  \        ^4      4      pV P                  V4      pV P                  \        V4      \        V4      4       R# rO  )rH   r   rZ   r   rR  s   &  r   rS  'TestFrozenSet.test_constructor_identity  s9    LLq"LLOA1&r   c                   V P                  \        V P                  R 4      4      \        V P                  R4      4      4       ^dp\        V4       Uu. uF  p\	        V4      NK  	  pp\        4       p\        ^4       F7  p\        V4       VP                  \        V P                  V4      4      4       K9  	  V P                  \        V4      ^4       R# u upi )abcdebebecdaN)	rZ   rj  rH   r   r   rU   r   r  r`   )r   r3  r   seqresultss   &    r   rk  TestFrozenSet.test_hash  s    dll845dll845	7 %*1X.Xy|X.%sACLKKT\\#./0  	Wq) /s   Cc                    V P                   P                  4       pV P                  \        V P                   4      \        V4      4       R # r!   )rI   r   rZ   r   rr  s   & r   rs  TestFrozenSet.test_copy  s-    ffkkmDFFRW-r   c                Z   \        \        ^
4      4      \        R4      ,           R.,           pV P                  V4      pV P                  \        V4      4      pV P	                  W#4       V P                  \        V4      \        V4      4       / p^*WB&   V P	                  WC,          ^*4       R# )r%  abcdefgappleN)ry   r   rH   reversedrZ   r   r   )r   r%  key1key2rL   s   &    r   test_frozen_as_dictkey$TestFrozenSet.test_frozen_as_dictkey  s    59oY/7);||C ||HSM*$BtHbh/"%r   c                p    V P                  R 4      pV P                  \        V4      \        V4      4       R# )abcdcdaN)rH   rZ   rj  r   r   s   & r   test_hash_cachingTestFrozenSet.test_hash_caching  s(    LL#a$q'*r   c                   ^p\        4       pVP                  p\        V4       Uu. uF  qD^,           ^V,          3NK  	  pp\        ^V,          4       FA  pT! \        \	        V UUu. uF  w  rgWt,          '       g   K  VNK  	  upp4      4      4       KC  	  V P                  \        V4      ^V,          4       R pR p	\        ^4       Fx  p^V,          p
V
^,
          p\        V3 FW  p\        \        \        V	! V! V4      4      4       Uu0 uF  qV,          kK  	  up4      pV P                  ^V,          V
4       KY  	  Kz  	  R# u upi u uppi u upi )   c                     \        4       .p\        V ^,
          4       F  p\        V4      pVP                  V4       K!  	  VRV  # r   )re   r   rc  )r3  numsr   nums   &   r   zf_range7TestFrozenSet.test_hash_effectiveness.<locals>.zf_range  s?    K=D1Q3ZoC    8Or   c              3      "   \        \        V 4      ^,           4       F/  p\        \        \        P
                  ! W4      4       Rj  xL
  K1  	  R#  L
5ir   )r   r`   r   re   	itertoolscombinations)rI   r   s   & r   powerset7TestFrozenSet.test_hash_effectiveness.<locals>.powerset  s9     3q6!8_y)*@*@*FGGG %Gs   AAA	AN)	rU   r  r   rj  re   rZ   r`   r   assertGreater)r   r3  
hashvaluesaddhashvaluer   	elemmasksr  mr<  rA  r   maskr:  hr{   s   &              r   test_hash_effectiveness%TestFrozenSet.test_hash_effectiveness  s   U
!~~*/(3(Qc1a4[(	3q!tAiy(HytqACCy(HIJK Z!Q$/		H rAQAq5D)3tXd1g5F+GH+GaT+GHI""1Q3* * # 4(H& Is   E
(E?EEr	   N)r   r   r   r   re   rH   rw   rL  rS  rk  rs  r0  r5  rJ  r   r(   r)   s   @r   r  r    s7     GH,
'
*.&++ +r   r  c                       ] tR tRtRtR# )FrozenSetSubclassi  r	   Nr
   r	   r   r   rM  rM    r   r   rM  c                   F   a  ] tR tRt o ]t]tR tR t	R t
R tR tRtV tR# )	TestFrozenSetSubclassi  c                    ! R  R\         4      pV! ^^.4      pV P                  \        V4      V4       V P                  \	        V4      ^^04       V P                  \        4      ;_uu_ 4        V! R	R7       RRR4        ! R R\         4      pV! ^^.^R7      pV P                  \        V4      V4       V P                  \	        V4      ^^04       V P                  VP                  ^4        ! R R\         4      pV! ^^.^R7      pV P                  \        V4      V4       V P                  \	        V4      ^^04       V P                  VP                  ^4       R#   + '       g   i     L; i)
c                       ] tR tRtRtR# )ATestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclassi  r	   Nr
   r	   r   r   r  rR    r  r   r  r  Nc                   *   a  ] tR tRt o RR ltRtV tR# )KTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_initi'  Nc                    W n         R # r!   r  )r   r  r  s   &&&r   r:   TTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_init.__init__(  s    $r   r  r!   )r   r   r   r   r:   r   r(   r)   s   @r   r
  rT  '  s     % %r   r
  r  c                   6   a a ] tR tRt oRV 3R lltRtVtV ;t# )JTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_newi/  c                2   < \         SV `  W4      pW#n        V# r!   r  r  s   &&& r   r  RTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_new.__new__0  r  r   r  r!   r  r	  s   @@r   r  rX  /  r  r   r  r	   )re   r  rv   rZ   rU   rS   rT   r  r  s   &    r   r  /TestFrozenSetSubclass.test_keywords_in_subclass  s'   	y 	aVd1gx(Q!Q(y))b! *	% 	% 1va0d1g12Q!Q(1%		 	
 q!fQ/d1g01Q!Q(1%' *)s   /
E!!E1	c                    V P                  \        ^4      4      pV P                  V4      pV P                  \        V4      \        V4      4       R# rO  rQ  rR  s   &  r   rS  /TestFrozenSetSubclass.test_constructor_identity9  rU  r   c                    V P                   P                  4       pV P                  \        V P                   4      \        V4      4       R # r!   )rI   r   r   r   rr  s   & r   rs  TestFrozenSetSubclass.test_copy>  s-    ffkkmBtvvJ30r   c                j    V P                  4       pV P                  V4      pV P                  W4       R # r!   )rH   rZ   rR  s   &  r   test_nested_empty_constructor3TestFrozenSetSubclass.test_nested_empty_constructorB  s(    LLNLLOr   c                   V P                   p\        4       pV! 4       pV! 4       V! . 4      V! R4      V! R 4      V! 4       V! . 4      V! R4      V! R 4      V! \        ^ 4      4      V! V! 4       4      V! \        4       4      W#V! V4      V! V4      .pV P                  \	        \        \        \        V4      4      4      \	        V4      4       R# )r   Nr	   )rH   re   r   rZ   r`   rU   r   r   )r   	Frozensetr   Fefss   &    r   test_singleton_empty_frozenset4TestFrozenSetSubclass.test_singleton_empty_frozensetG  s    LL	KK{IbM9R=)B-{IbM9R=)B-q"Iik$:%qYq\9Q<I
 	SR./S:r   r	   N)r   r   r   r   rM  rH   re   rw   r  rS  rs  ra  rg  r   r(   r)   s   @r   rO  rO    s-     GH&6*
1
	; 	;r   rO  c                       ] tR tRtRtRtR# )SetSubclassWithSlotsiS  r	   Nr}   r   __dict__r   r   r   r   	__slots__r   r	   r   r   rj  rj  S      &Ir   rj  c                   J    ] tR tRt]t]P                  t]P                  tRt	R# )TestSetSubclassWithSlotsiV  r	   N)
r   r   r   r   rj  rH   r@   rM   r   r   r	   r   r   rq  rq  V  s    "GE ..Mr   rq  c                       ] tR tRtRtRtR# )FrozenSetSubclassWithSlotsi[  r	   Nrk  rm  r	   r   r   rs  rs  [  ro  r   rs  c                       ] tR tRt]tRtR# )TestFrozenSetSubclassWithSlotsi^  r	   N)r   r   r   r   rs  rH   r   r	   r   r   ru  ru  ^  s    (Gr   ru  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R tR tR tR tR tRtV tR# )TestBasicOpsig  c                    V P                   e2   V P                  \        V P                  4      V P                   4       R # R # r!   )r.   rZ   rU   r   s   &r   	test_reprTestBasicOps.test_repri  s-    99 T$((^TYY7 !r   c                T   \        V P                  4      pV P                  VR 4       V P                  VR4       V^R P	                  R4      pVP                  4        V P                   Uu. uF  p\        V4      NK  	  ppVP                  4        V P                  W$4       R# u upi ){}z, N)r.   rU   assertStartsWithassertEndsWithsplitsortvaluesrZ   )r   textresultr/   sorted_repr_valuess   &    r   check_repr_against_values&TestBasicOps.check_repr_against_valuesm  s    DHH~dC(D#&a!!$'7;{{C{ed5k{C!4 Ds   ,B%c                d    V P                  \        V P                  4      V P                  4       R # r!   )rZ   r`   rU   lengthr   s   &r   test_lengthTestBasicOps.test_lengthx  s    TXX4r   c                R    V P                  V P                  V P                  4       R # r!   rZ   rU   r   s   &r   test_self_equalityTestBasicOps.test_self_equality{      488,r   c                R    V P                  V P                  V P                  4       R # r!   )rZ   rU   r   r   s   &r   test_equivalent_equality%TestBasicOps.test_equivalent_equality~  r  r   c                n    V P                  V P                  P                  4       V P                  4       R # r!   )rZ   rU   r   r   r   s   &r   rs  TestBasicOps.test_copy  s     $((3r   c                v    V P                   V P                   ,          pV P                  WP                  4       R # r!   rU   rZ   r   r   r  s   & r   test_self_unionTestBasicOps.test_self_union  &    DHH$*r   c                j    V P                   \        ,          pV P                  WP                  4       R # r!   rU   	empty_setrZ   r   r  s   & r   test_empty_unionTestBasicOps.test_empty_union  "    I%*r   c                j    \         V P                  ,          pV P                  WP                  4       R # r!   )r  rU   rZ   r   r  s   & r   test_union_emptyTestBasicOps.test_union_empty  s"    TXX%*r   c                v    V P                   V P                   ,          pV P                  WP                  4       R # r!   r  r  s   & r   test_self_intersection#TestBasicOps.test_self_intersection  r  r   c                `    V P                   \        ,          pV P                  V\        4       R # r!   rU   r  rZ   r  s   & r   test_empty_intersection$TestBasicOps.test_empty_intersection  s     I%+r   c                `    \         V P                  ,          pV P                  V\         4       R # r!   r  rU   rZ   r  s   & r   test_intersection_empty$TestBasicOps.test_intersection_empty       TXX%+r   c                    V P                   P                  V P                   4      pV P                  WP                   '       * 4       R # r!   rU   r   rZ   r  s   & r   test_self_isdisjoint!TestBasicOps.test_self_isdisjoint  s.    $$TXX.XX.r   c                h    V P                   P                  \        4      pV P                  VR 4       R# TN)rU   r   r  rZ   r  s   & r   test_empty_isdisjoint"TestBasicOps.test_empty_isdisjoint  s&    $$Y/&r   c                h    \         P                  V P                  4      pV P                  VR 4       R# r  )r  r   rU   rZ   r  s   & r   test_isdisjoint_empty"TestBasicOps.test_isdisjoint_empty  s&    %%dhh/&r   c                l    V P                   V P                   ,          pV P                  V\        4       R # r!   rU   rZ   r  r  s   & r   test_self_symmetric_difference+TestBasicOps.test_self_symmetric_difference  $    DHH$+r   c                j    V P                   \        ,          pV P                  WP                   4       R # r!   r  r  s   & r   test_empty_symmetric_difference,TestBasicOps.test_empty_symmetric_difference  r  r   c                l    V P                   V P                   ,
          pV P                  V\        4       R # r!   r  r  s   & r   test_self_difference!TestBasicOps.test_self_difference  r  r   c                j    V P                   \        ,
          pV P                  WP                  4       R # r!   r  r  s   & r   test_empty_difference"TestBasicOps.test_empty_difference  r  r   c                `    \         V P                  ,
          pV P                  V\         4       R # r!   r  r  s   & r   test_empty_difference_rev&TestBasicOps.test_empty_difference_rev  r  r   c                    V P                    F  pV P                  WP                  4       K   	  \        V P                   4      pV P	                  VP                  4       \        V P                   4      4       R # r!   )rU   rf   r  r   rZ   __length_hint__r`   )r   vsetiters   &  r   test_iterationTestBasicOps.test_iteration  sN    AMM![[) txx.002CMBr   c                   \        \        P                  ^,           4       Fh  p\        P                  ! V P                  V4      p\        P
                  ! V4      pV P                  V P                  VV P                  : RV: 24       Kj  	  R# )r   r   N)r   r   r   r   rU   r   rZ   )r   r   r   r   s   &   r   r   TestBasicOps.test_pickling  s_    622Q67ETXXu-A<<?DTXXt+/88T:< 8r   c                P   V P                  \        4      ;_uu_ 4        \        4       P                  ^{4       RRR4       V P                  \        4      ;_uu_ 4        \        4       P	                  ^{4       RRR4       R#   + '       g   i     LQ; i  + '       g   i     R# ; i){   N)rS   rT   rU   r   r  r   s   &r   test_issue_37219TestBasicOps.test_issue_37219  sd    y))ES! *y))E##C( *) *))))s   BBB	B%	r	   N)r   r   r   r   ry  r  r  r  r  rs  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r   r(   r)   s   @r   rw  rw  g  s~     8	55--4++++,,/'',+,+,C<) )r   rw  c                   &   a  ] tR tRt o R tRtV tR# )TestBasicOpsEmptyi  c                    R V n         . V n        \        V P                  4      V n        \        V P                  4      V n        ^ V n        RV n        R# )z	empty setzset()Ncaser  rU   r   r  r.   r   s   &r   rM   TestBasicOpsEmpty.setUp  s>    !	$++&$++&	r   r  r   r  r.   rU   r  Nr   r   r   r   rM   r   r(   r)   s   @r   r  r    s      r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestBasicOpsSingletoni  c                    R V n         ^.V n        \        V P                  4      V n        \        V P                  4      V n        ^V n        RV n        R# )zunit set (number)z{3}Nr  r   s   &r   rM   TestBasicOpsSingleton.setUp  s@    )	c$++&$++&	r   c                >    V P                  ^V P                  4       R# rO  rf   rU   r   s   &r   test_inTestBasicOpsSingleton.test_in  s    a"r   c                >    V P                  ^V P                  4       R# rK  r{  rU   r   s   &r   test_not_in!TestBasicOpsSingleton.test_not_in      DHH%r   r  N	r   r   r   r   rM   r  r  r   r(   r)   s   @r   r  r    s     #& &r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestBasicOpsTuplei  c                    R V n         R.V n        \        V P                  4      V n        \        V P                  4      V n        ^V n        RV n        R# )zunit set (tuple)z{(0, 'zero')}Nr   zeror  r   s   &r   rM   TestBasicOpsTuple.setUp  s@    (	"m$++&$++&%	r   c                >    V P                  RV P                  4       R# )r   Nr  r  r   s   &r   r  TestBasicOpsTuple.test_in  s    k488,r   c                >    V P                  ^	V P                  4       R# )	   Nr  r   s   &r   r  TestBasicOpsTuple.test_not_in  r  r   r  Nr  r)   s   @r   r  r    s     &-& &r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestBasicOpsTriplei  c                    R V n         ^ R\        P                  .V n        \	        V P                  4      V n        \	        V P                  4      V n        ^V n        RV n        R# )z
triple setr  N)r  operatorr  r  rU   r   r  r.   r   s   &r   rM   TestBasicOpsTriple.setUp  sI    "	&(,,/$++&$++&	r   r  Nr  r)   s   @r   r  r    s      r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestBasicOpsStringi	  c                    R V n         . ROV n        \        V P                  4      V n        \        V P                  4      V n        ^V n        R# )z
string setNrR   r   rg   r  r  rU   r   r  r   s   &r   rM   TestBasicOpsString.setUp
  s7    "	%$++&$++&r   c                &    V P                  4        R # r!   r  r   s   &r   ry  TestBasicOpsString.test_repr      &&(r   r  r   r  rU   r  Nr   r   r   r   rM   ry  r   r(   r)   s   @r   r  r  	       ) )r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestBasicOpsBytesi  c                    R V n         . ROV n        \        V P                  4      V n        \        V P                  4      V n        ^V n        R# )z	bytes setN)   a   b   cr  r   s   &r   rM   TestBasicOpsBytes.setUp  s7    !	($++&$++&r   c                &    V P                  4        R # r!   r  r   s   &r   ry  TestBasicOpsBytes.test_repr  r	  r   r
  Nr  r)   s   @r   r  r    r  r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestBasicOpsMixedStringBytesi#  c                   V P                  \        P                  ! 4       4       \        P                  ! R \
        4       RV n        . ROV n        \        V P                  4      V n        \        V P                  4      V n	        ^V n
        R# )ignorezstring and bytes setN)rR   r   r  r  )enterContextr   check_warningswarningssimplefilterBytesWarningr  r  rU   r   r  r   s   &r   rM   "TestBasicOpsMixedStringBytes.setUp$  s^    /88:;h5,	,$++&$++&r   c                &    V P                  4        R # r!   r  r   s   &r   ry  &TestBasicOpsMixedStringBytes.test_repr-  r	  r   r
  Nr  r)   s   @r   r  r  #  s     ) )r   r  c               #      "   \         h5i)T)rT   r	   r   r   baditerr#  2  s
     
Or   c               #      "   R x  R# 5ir  r	   r	   r   r   gooditerr%  6  s
     
Jr   c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )TestExceptionPropagationi9  z?SF 628246:  Set constructor should not trap iterator TypeErrorsc                L    V P                  \        \        \        4       4       R # r!   )rS   rT   rU   r#  r   s   &r   test_instanceWithException3TestExceptionPropagation.test_instanceWithException<  s    )S')4r   c                    \        . RO4       \        R4       \        R^R^R^/4       \        \        ^4      4       \        R4       \        \        4       4       R# )r   onetwothreerq   NrW  )rU   r   r%  r   s   &r   test_instancesWithoutException7TestExceptionPropagation.test_instancesWithoutException?  s@    GGU1eAwq)*E!HE
HJr   c                    \        . RO4      p V F  pVP                  ^.4       K  	  V P                  R4       R#   \         d     R# i ; i)r   z0no exception when changing size during iterationNrW  )rU   r  r   r"   )r   rI   r   s   &  r   test_changingSizeWhileIterating8TestExceptionPropagation.test_changingSizeWhileIteratingH  sK    L	J! 
 IIHI  		s   = AAr	   N)
r   r   r   r   r2   r)  r/  r2  r   r(   r)   s   @r   r'  r'  9  s     I5J Jr   r'  c                   &   a  ] tR tRt o R tRtV tR# )TestSetOfSetsiT  c                .   \        ^.4      p\        V.4      pVP                  4       pV P                  \	        V4      \         4       VP                  V4       VP                  V4       V P                  V\        4       4       VP                  V4       R# r   )re   rU   r]  rZ   rv   r  r  r  )r   innerouterelements   &   r   test_constructorTestSetOfSets.test_constructorU  sm    1#UG))+g	2		%U&er   r	   N)r   r   r   r   r:  r   r(   r)   s   @r   r5  r5  T  s      r   r5  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RtV tR# )TestBinaryOpsia  c                &    \        R4      V n         R# rP   NrP         rU   r   s   &r   rM   TestBinaryOps.setUpb      y>r   c                \    V P                  V P                  \        ^^^^^^/4      4       R# rK  r  r   s   &r   test_eqTestBinaryOps.test_eqe  s'    3!Aa!}#56r   c                v    V P                   \        ^.4      ,          pV P                  V\        R4      4       R# r?  rY  r  s   & r   test_union_subsetTestBinaryOps.test_union_subseth  s*    CH$Y0r   c                |    V P                   \        . RO4      ,          pV P                  V\        . RO4      4       R# rP   NrP   rA  rB     rY  r  s   & r   test_union_superset!TestBinaryOps.test_union_supersetl  s*    C--\!23r   c                |    V P                   \        . RO4      ,          pV P                  V\        . RO4      4       R# rP  NrP  rA     )rP   rP  rA  rU  rB  rY  r  s   & r   test_union_overlap TestBinaryOps.test_union_overlapp  s)    C	N*_!56r   c                z    V P                   \        ^.4      ,          pV P                  V\        . RO4      4       R# rO  NrN  rY  r  s   & r   test_union_non_overlap$TestBinaryOps.test_union_non_overlapt  +    CH$\!23r   c                t    V P                   \        R4      ,          pV P                  V\        R4      4       R# rP   NrP   rA  rY  r  s   & r   test_intersection_subset&TestBinaryOps.test_intersection_subsetx  s(    CK'V-r   c                |    V P                   \        . RO4      ,          pV P                  V\        . RO4      4       R# rP   NrN  r@  rY  r  s   & r   test_intersection_superset(TestBinaryOps.test_intersection_superset|  s)    C--Y0r   c                z    V P                   \        . RO4      ,          pV P                  V\        ^.4      4       R# rP  NrT  rY  r  s   & r   test_intersection_overlap'TestBinaryOps.test_intersection_overlap  s*    C	N*aS*r   c                l    V P                   \        ^.4      ,          pV P                  V\        4       R# rO  Nr  r  s   & r   test_intersection_non_overlap+TestBinaryOps.test_intersection_non_overlap  s&    CH$+r   c                r    V P                   P                  \        R4      4      pV P                  VR4       R# )rP   FNr_  r  r  s   & r   test_isdisjoint_subset$TestBinaryOps.test_isdisjoint_subset  s*    $$S[1'r   c                v    V P                   P                  \        . RO4      4      pV P                  VR4       R# )rP   FNrN  r  r  s   & r   test_isdisjoint_superset&TestBinaryOps.test_isdisjoint_superset  s+    $$S%67'r   c                v    V P                   P                  \        . RO4      4      pV P                  VR4       R# )rP  FNrT  r  r  s   & r   test_isdisjoint_overlap%TestBinaryOps.test_isdisjoint_overlap  s*    $$S^4'r   c                t    V P                   P                  \        ^.4      4      pV P                  VR4       R# )rO  TNr  r  s   & r   test_isdisjoint_non_overlap)TestBinaryOps.test_isdisjoint_non_overlap  s,    $$S!X.&r   c                v    V P                   \        R4      ,          pV P                  V\        ^.4      4       R# r^  rY  r  s   & r   test_sym_difference_subset(TestBinaryOps.test_sym_difference_subset  s*    CK'aS*r   c                v    V P                   \        R4      ,          pV P                  V\        ^.4      4       R# rM  rY  r  s   & r   test_sym_difference_superset*TestBinaryOps.test_sym_difference_superset  s+    C--aS*r   c                x    V P                   \        R4      ,          pV P                  V\        . RO4      4       R# rP  NrT  )rP   rP  rU  rB  rY  r  s   & r   test_sym_difference_overlap)TestBinaryOps.test_sym_difference_overlap  s)    C	N*\!23r   c                z    V P                   \        ^.4      ,          pV P                  V\        . RO4      4       R# rY  rY  r  s   & r   test_sym_difference_non_overlap-TestBinaryOps.test_sym_difference_non_overlap  r\  r   rC  N)r   r   r   r   rM   rG  rJ  rP  rV  rZ  r`  rd  rh  rl  ro  rr  ru  rx  r{  r~  r  r  r   r(   r)   s   @r   r=  r=  a  sd     "71474.1+,((('++44 4r   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R tR tR tRtV tR# )TestUpdateOpsi  c                &    \        R4      V n         R# r?  rC  r   s   &r   rM   TestUpdateOps.setUp  rE  r   c                    V ;P                   \        ^.4      ,          un         V P                  V P                   \        R4      4       R# r?  rY  r   s   &r   rJ  TestUpdateOps.test_union_subset  s.    CH3y>2r   c                    V ;P                   \        . RO4      ,          un         V P                  V P                   \        . RO4      4       R# rM  rY  r   s   &r   rP  !TestUpdateOps.test_union_superset  s.    C%%3|#45r   c                    V ;P                   \        . RO4      ,          un         V P                  V P                   \        . RO4      4       R# rS  rY  r   s   &r   rV   TestUpdateOps.test_union_overlap  s-    C	N"3#78r   c                    V ;P                   \        ^.4      ,          un         V P                  V P                   \        . RO4      4       R# rY  rY  r   s   &r   rZ  $TestUpdateOps.test_union_non_overlap  /    CH3|#45r   c                    V P                   P                  \        . RO4      4       V P                  V P                   \        . RO4      4       R# rS  )rU   r  rZ   r   s   &r   test_union_method_call$TestUpdateOps.test_union_method_call  s/    I'3#78r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        R4      4       R# r^  rY  r   s   &r   r`  &TestUpdateOps.test_intersection_subset  s,    CK3v;/r   c                    V ;P                   \        . RO4      ,          un         V P                  V P                   \        . RO4      4       R# rc  rY  r   s   &r   rd  (TestUpdateOps.test_intersection_superset  s-    C%%3y>2r   c                    V ;P                   \        . RO4      ,          un         V P                  V P                   \        ^.4      4       R# rg  rY  r   s   &r   rh  'TestUpdateOps.test_intersection_overlap  s.    C	N"3s8,r   c                    V ;P                   \        ^.4      ,          un         V P                  V P                   \        4       R# rk  r  r   s   &r   rl  +TestUpdateOps.test_intersection_non_overlap  s*    CH9-r   c                    V P                   P                  \        . RO4      4       V P                  V P                   \        ^.4      4       R# rg  )rU   r  rZ   r   s   &r   test_intersection_method_call+TestUpdateOps.test_intersection_method_call  s2    $$S^43s8,r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        ^.4      4       R# r^  rY  r   s   &r   r{  (TestUpdateOps.test_sym_difference_subset  .    CK3s8,r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        ^.4      4       R# rM  rY  r   s   &r   r~  *TestUpdateOps.test_sym_difference_superset  s/    C%%3s8,r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        . RO4      4       R# r  rY  r   s   &r   r  )TestUpdateOps.test_sym_difference_overlap  s-    C	N"3|#45r   c                    V ;P                   \        ^.4      ,          un         V P                  V P                   \        . RO4      4       R# rY  rY  r   s   &r   r  -TestUpdateOps.test_sym_difference_non_overlap  r  r   c                    V P                   P                  \        . RO4      4       V P                  V P                   \        . RO4      4       R# r  )rU   r-  rZ   r   s   &r   test_sym_difference_method_call-TestUpdateOps.test_sym_difference_method_call  s1    ,,S^<3|#45r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        ^.4      4       R# r^  rY  r   s   &r   test_difference_subset$TestUpdateOps.test_difference_subset  r  r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        . 4      4       R# rM  rY  r   s   &r   test_difference_superset&TestUpdateOps.test_difference_superset  s-    C%%3r7+r   c                    V ;P                   \        R4      ,          un         V P                  V P                   \        ^^.4      4       R# rg  rY  r   s   &r   test_difference_overlap%TestUpdateOps.test_difference_overlap  s0    C	N"31v;/r   c                    V ;P                   \        ^.4      ,          un         V P                  V P                   \        . RO4      4       R# )rO  Nr@  rY  r   s   &r   test_difference_non_overlap)TestUpdateOps.test_difference_non_overlap  s.    CH3y>2r   c                    V P                   P                  \        . RO4      4       V P                  V P                   \        ^^.4      4       R# rg  )rU   r  rZ   r   s   &r   test_difference_method_call)TestUpdateOps.test_difference_method_call  s4    ""3y>231v;/r   rC  N)r   r   r   r   rM   rJ  rP  rV  rZ  r  r`  rd  rh  rl  r  r{  r~  r  r  r  r  r  r  r  r  r   r(   r)   s   @r   r  r    ss     "3696903-.---666-,030 0r   r  c                   t   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V tR# )
TestMutatei   c                L    . ROV n         \        V P                   4      V n        R# )rR   Nr  )r  rU   r   s   &r   rM   TestMutate.setUp  s    %t{{#r   c                    V P                   P                  R 4       V P                  V P                   \        R4      4       R# )rg   rq   NrU   r  rZ   r   s   &r   test_add_presentTestMutate.test_add_present  s*    S3u:.r   c                    V P                   P                  R 4       V P                  V P                   \        R4      4       R# )rL   rm   Nr  r   s   &r   test_add_absentTestMutate.test_add_absent	  s*    S3v;/r   c                    \        4       p^ pV P                   F8  pVP                  V4       V^,          pV P                  \	        V4      V4       K:  	  V P                  WP                   4       R# r6   )rU   r  r  rZ   r`   )r   tmpexpected_lenr  s   &   r   test_add_until_fullTestMutate.test_add_until_full  sY    eAGGAJALSX|4  	hh'r   c                    V P                   P                  R 4       V P                  V P                   \        R4      4       R# )r   acN)rU   r  rZ   r   s   &r   test_remove_presentTestMutate.test_remove_present  s*    3t9-r   c                     V P                   P                  R 4       V P                  R4       R#   \         d     R# i ; i)rL   z7Removing missing element should have raised LookupErrorN)rU   r  r   LookupErrorr   s   &r   test_remove_absentTestMutate.test_remove_absent  s6    	HHOOC IIOP 		s   ,0 ??c                    \        V P                  4      pV P                   FL  pV P                  P                  V4       V^,          pV P	                  \        V P                  4      V4       KN  	  R# r   )r`   rU   r  r  rZ   )r   r  r  s   &  r   test_remove_until_empty"TestMutate.test_remove_until_empty!  sO    488}AHHOOAALS]L9 r   c                    V P                   P                  R 4       V P                  V P                   \        R4      4       R# )rg   r   NrU   r  rZ   r   s   &r   test_discard_presentTestMutate.test_discard_present(  s,    3t9-r   c                    V P                   P                  R 4       V P                  V P                   \        R4      4       R# )rL   rq   Nr  r   s   &r   test_discard_absentTestMutate.test_discard_absent,  s,    3u:.r   c                    V P                   P                  4        V P                  \        V P                   4      ^ 4       R# r6   )rU   rn  rZ   r`   r   s   &r   ro  TestMutate.test_clear0  s(    TXX*r   c                   / pV P                   '       d   R WP                   P                  4       &   K0  V P                  \        V4      \        V P                  4      4       V P                   F  pV P                  W!4       K  	  R # r!   )rU   r]  rZ   r`   r  rf   )r   poppedr  s   &  r   r  TestMutate.test_pop4  sY    hhh%)F88<<>"Vc$++&67AMM!$ r   c                    V P                   P                  R4       V P                  V P                   \        V P                  4      4       R # )Nr	   rU   r  rZ   r  r   s   &r   test_update_empty_tuple"TestMutate.test_update_empty_tuple<  s/    3t{{#34r   c                    V P                   P                  R4       V P                  V P                   \        V P                  4      4       R# )rR   NrQ   r  r   s   &r   test_update_unit_tuple_overlap)TestMutate.test_update_unit_tuple_overlap@  s/    3t{{#34r   c                    V P                   P                  R4       V P                  V P                   \        V P                  R.,           4      4       R# )rR   r   N)rR   r   r  r   s   &r   "test_update_unit_tuple_non_overlap-TestMutate.test_update_unit_tuple_non_overlapD  s6    
#3t{{cU':#;<r   )rU   r  N)r   r   r   r   rM   r  r  r  r  r  r  r  r  ro  r  r  r  r  r   r(   r)   s   @r   r  r     sP     $/0(.:./+%55= =r   r  c                   N   a  ] tR tRt o RRRR/tRRRRRR	R	RRRRR/tR
 tRtV tR# )TestSubsetsiJ  <=r   >=r   ==!=<>c                   V P                   pV P                  pR EF/  pW0P                  9   p\        RV,           R,           \	        4       4      pV P                  WT4       V\        P                  9   d;   \        V\        P                  V,          4      pV! V4      pV P                  WT4       \        P                  V,          p\        RV,           R,           \	        4       4      pV P                  WT4       V\        P                  9   g   K  \        V\        P                  V,          4      pV! V4      pV P                  WT4       EK2  	  R# )r  r}   r   N)r  r  r  r  r  r  )
leftrightcasesevallocalsrZ   r  case2methodgetattrreverse)r   r}   r   r  r\   r  methodrcases   &       r   test_issubsetTestSubsets.test_issubsetX  s    IIJJ4Dzz)H#*s*FH5FV.{... K$;$;D$AB  2  ''-E#++VX6FV./// K$;$;E$BC  2% 5r   r	   N)	r   r   r   r   r  r  r  r   r(   r)   s   @r   r  r  J  sG     K TTSSTTG3 3r   r  c                   :    ] tR tRt]! 4       t]! 4       tRtRtRt	R# )TestSubsetEqualEmptyip  z
both emptyr	   Nr  r  r  
r   r   r   r   rU   r  r  r!  r  r   r	   r   r   r  r  p  s    EDEEDEr   r  c                   F    ] tR tRt]! ^^.4      t]! ^^.4      tRtRtRt	R# )TestSubsetEqualNonEmptyix  z
equal pairr	   Nr  r  r	   r   r   r  r  x  s&    AKDAKEDEr   r  c                   @    ] tR tRt]! 4       t]! ^^.4      tRtRtRt	R# )TestSubsetEmptyNonEmptyi  zone empty, one non-emptyr	   Nr  r  r  r  r	   r   r   r
  r
    s     EDAKE&DEr   r
  c                   D    ] tR tRt]! ^.4      t]! ^^.4      tRtRtRt	R# )TestSubsetPartiali  z&one a non-empty proper subset of otherr	   Nr  r  r	   r   r   r  r    s$    HDAKE4DEr   r  c                   B    ] tR tRt]! ^.4      t]! ^.4      tRtRtRt	R# )TestSubsetNonOverlapi  zneither empty, neither containsr  r	   Nr  r	   r   r   r  r    s"    HDHE-DEr   r  c                   t   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V tR# )TestOnlySetsInBinaryOpsi  c                N   V P                  V P                  V P                  8H  R 4       V P                  V P                  V P                  8H  R 4       V P                  V P                  V P                  8g  R4       V P                  V P                  V P                  8g  R4       R# r   )rZ   r$   rU   r   s   &r   
test_eq_ne"TestOnlySetsInBinaryOps.test_eq_ne  sv    txx/7TZZ/7txx/6TZZ/6r   c                  a  S P                  \        V 3R  l4       S P                  \        V 3R l4       S P                  \        V 3R l4       S P                  \        V 3R l4       S P                  \        V 3R l4       S P                  \        V 3R l4       S P                  \        V 3R l4       S P                  \        V 3R l4       R# )	c                  6   < S P                   S P                  8  # r!   rU   r$   r   s   r   <lambda>:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>      TXX

-Br   c                  6   < S P                   S P                  8*  # r!   r  r   s   r   r  r        TXX-Cr   c                  6   < S P                   S P                  8  # r!   r  r   s   r   r  r    r  r   c                  6   < S P                   S P                  8  # r!   r  r   s   r   r  r    r  r   c                  6   < S P                   S P                  8  # r!   r$   rU   r   s   r   r  r        TZZ$((-Br   c                  6   < S P                   S P                  8*  # r!   r   r   s   r   r  r        TZZ488-Cr   c                  6   < S P                   S P                  8  # r!   r   r   s   r   r  r    r!  r   c                  6   < S P                   S P                  8  # r!   r   r   s   r   r  r    r#  r   N)rS   rT   r   s   fr   test_ge_gt_le_lt(TestOnlySetsInBinaryOps.test_ge_gt_le_lt  s    )%BC)%CD)%BC)%CD)%BC)%CD)%BC)%CDr   c                     V ;P                   V P                  ,          un         V P                  R 4       R#   \         d     R# i ; izexpected TypeErrorNrU   r$   r   rT   r   s   &r   test_update_operator,TestOnlySetsInBinaryOps.test_update_operator  <    	,HH

"H II*+  		   #8 AAc                    V P                   '       d(   V P                  P                  V P                  4       R # V P	                  \
        V P                  P                  V P                  4       R # r!   )otherIsIterablerU   r  r$   rS   rT   r   s   &r   r  #TestOnlySetsInBinaryOps.test_update  s@    HHOODJJ'i$**Er   c                L  a  S P                  \        V 3R  l4       S P                  \        V 3R l4       S P                  '       d(   S P                  P	                  S P
                  4       R# S P                  \        S P                  P                  S P
                  4       R# )c                  >   < S P                   S P                  ,          # r!   r  r   s   r   r  4TestOnlySetsInBinaryOps.test_union.<locals>.<lambda>      TXX

-Br   c                  >   < S P                   S P                  ,          # r!   r   r   s   r   r  r4        TZZ$((-Br   N)rS   rT   r0  rU   ru   r$   r   s   fr   r~   "TestOnlySetsInBinaryOps.test_union  sc    )%BC)%BCHHNN4::&iDr   c                     V ;P                   V P                  ,          un         V P                  R 4       R#   \         d     R# i ; ir)  r*  r   s   &r   !test_intersection_update_operator9TestOnlySetsInBinaryOps.test_intersection_update_operator  r-  r.  c                    V P                   '       d(   V P                  P                  V P                  4       R # V P	                  \
        V P                  P                  V P                  4       R # r!   )r0  rU   r  r$   rS   rT   r   s   &r   r  0TestOnlySetsInBinaryOps.test_intersection_update  sH    HH((4i"hh::"jj*r   c                L  a  S P                  \        V 3R  l4       S P                  \        V 3R l4       S P                  '       d(   S P                  P	                  S P
                  4       R# S P                  \        S P                  P                  S P
                  4       R# )c                  >   < S P                   S P                  ,          # r!   r  r   s   r   r  ;TestOnlySetsInBinaryOps.test_intersection.<locals>.<lambda>  r5  r   c                  >   < S P                   S P                  ,          # r!   r   r   s   r   r  r@    r7  r   N)rS   rT   r0  rU   r   r$   r   s   fr   r   )TestOnlySetsInBinaryOps.test_intersection  sg    )%BC)%BCHH!!$**-i)>)>

Kr   c                     V ;P                   V P                  ,          un         V P                  R 4       R#   \         d     R# i ; ir)  r*  r   s   &r   #test_sym_difference_update_operator;TestOnlySetsInBinaryOps.test_sym_difference_update_operator  r-  r.  c                    V P                   '       d(   V P                  P                  V P                  4       R # V P	                  \
        V P                  P                  V P                  4       R # r!   )r0  rU   r-  r$   rS   rT   r   s   &r   test_sym_difference_update2TestOnlySetsInBinaryOps.test_sym_difference_update  sH    HH00<i"hhBB"jj*r   c                L  a  S P                  \        V 3R  l4       S P                  \        V 3R l4       S P                  '       d(   S P                  P	                  S P
                  4       R# S P                  \        S P                  P                  S P
                  4       R# )c                  >   < S P                   S P                  ,          # r!   r  r   s   r   r  =TestOnlySetsInBinaryOps.test_sym_difference.<locals>.<lambda>  r5  r   c                  >   < S P                   S P                  ,          # r!   r   r   s   r   r  rK    r7  r   N)rS   rT   r0  rU   r   r$   r   s   fr   test_sym_difference+TestOnlySetsInBinaryOps.test_sym_difference  sg    )%BC)%BCHH))$**5i)F)F

Sr   c                     V ;P                   V P                  ,          un         V P                  R 4       R#   \         d     R# i ; ir)  r*  r   s   &r   test_difference_update_operator7TestOnlySetsInBinaryOps.test_difference_update_operator  r-  r.  c                    V P                   '       d(   V P                  P                  V P                  4       R # V P	                  \
        V P                  P                  V P                  4       R # r!   )r0  rU   r  r$   rS   rT   r   s   &r   r  .TestOnlySetsInBinaryOps.test_difference_update  sH    HH&&tzz2i"hh88"jj*r   c                L  a  S P                  \        V 3R  l4       S P                  \        V 3R l4       S P                  '       d(   S P                  P	                  S P
                  4       R# S P                  \        S P                  P                  S P
                  4       R# )c                  >   < S P                   S P                  ,
          # r!   r  r   s   r   r  9TestOnlySetsInBinaryOps.test_difference.<locals>.<lambda>  r5  r   c                  >   < S P                   S P                  ,
          # r!   r   r   s   r   r  rV    r7  r   N)rS   rT   r0  rU   r   r$   r   s   fr   r   'TestOnlySetsInBinaryOps.test_difference  sg    )%BC)%BCHH

+i)<)<djjIr   r	   N)r   r   r   r   r  r&  r+  r  r~   r:  r  r   rD  rG  rM  rP  r  r   r   r(   r)   s   @r   r  r    sW     7	E,FE,*L,*T,*J Jr   r  c                   &   a  ] tR tRt o R tRtV tR# )TestOnlySetsNumerici  c                B    \        R4      V n         ^V n        RV n        R# r   FNrW  rU   r$   r0  r   s   &r   rM   TestOnlySetsNumeric.setUp  s    ^
$r   r$   r0  rU   Nr  r)   s   @r   rZ  rZ         % %r   rZ  c                   &   a  ] tR tRt o R tRtV tR# )TestOnlySetsDicti  c                J    \        R4      V n         ^^^^/V n        RV n        R# )r   TNrW  r]  r   s   &r   rM   TestOnlySetsDict.setUp  s$    ^1QZ
#r   r_  Nr  r)   s   @r   rb  rb         $ $r   rb  c                   &   a  ] tR tRt o R tRtV tR# )TestOnlySetsOperatori  c                ^    \        R4      V n         \        P                  V n        RV n        R# r\  )rU   r  r  r$   r0  r   s   &r   rM   TestOnlySetsOperator.setUp  s     ^\\
$r   r_  Nr  r)   s   @r   rg  rg    r`  r   rg  c                   &   a  ] tR tRt o R tRtV tR# )TestOnlySetsTuplei$  c                B    \        R4      V n         RV n        RV n        R# )r   TNrW  r@  r]  r   s   &r   rM   TestOnlySetsTuple.setUp%  s    ^
#r   r_  Nr  r)   s   @r   rk  rk  $  re  r   rk  c                   &   a  ] tR tRt o R tRtV tR# )TestOnlySetsStringi,  c                B    \        R4      V n         RV n        RV n        R# )r   rq   TNrW  r]  r   s   &r   rM   TestOnlySetsString.setUp-  s    ^
#r   r_  Nr  r)   s   @r   ro  ro  ,  re  r   ro  c                   &   a  ] tR tRt o R tRtV tR# )TestOnlySetsGeneratori4  c                R    R  p\        R4      V n         V! 4       V n        RV n        R# )c               3   >   "   \        ^ ^
^4       F  p V x  K	  	  R# 5ir6   )r   )r   s    r   gen(TestOnlySetsGenerator.setUp.<locals>.gen6  s     1b!_ %s   TNrW  r]  )r   rv  s   & r   rM   TestOnlySetsGenerator.setUp5  s%    	 ^U
#r   r_  Nr  r)   s   @r   rs  rs  4  s     $ $r   rs  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestCopyingi?  c                N   V P                   P                  4       p\        V\        R 7      p\        V P                   \        R 7      pV P	                  \        V4      \        V4      4       \        \        V4      4       F"  pV P                  W$,          W4,          J 4       K$  	  R# r  N)rU   r   rY   r.   rZ   r`   r   r   r   r   dup_listset_listr   s   &    r   rs  TestCopying.test_copyA  sm    hhmmo#4($((-XH6s8}%AOOHK8;67 &r   c                X   \         P                  ! V P                  4      p\        V\        R 7      p\        V P                  \        R 7      pV P                  \        V4      \        V4      4       \        \        V4      4       F!  pV P                  W$,          W4,          4       K#  	  R# r|  )r   r   rU   rY   r.   rZ   r`   r   r~  s   &    r   test_deep_copyTestCopying.test_deep_copyI  so    mmDHH%#4($((-XH6s8}%AX[(+6 &r   r	   N)r   r   r   r   rs  r  r   r(   r)   s   @r   rz  rz  ?  s     87 7r   rz  c                   &   a  ] tR tRt o R tRtV tR# )TestCopyingEmptyiT  c                $    \        4       V n         R # r!   rC  r   s   &r   rM   TestCopyingEmpty.setUpU  s    5r   rC  Nr  r)   s   @r   r  r  T  s      r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestCopyingSingletoniZ  c                (    \        R .4      V n         R# )helloNrC  r   s   &r   rM   TestCopyingSingleton.setUp[  s    y>r   rC  Nr  r)   s   @r   r  r  Z  s     " "r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestCopyingTriplei`  c                *    \        . RO4      V n         R# )r  N)r  r   NrC  r   s   &r   rM   TestCopyingTriple.setUpa  s    ()r   rC  Nr  r)   s   @r   r  r  `  s     * *r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestCopyingTupleif  c                (    \        R.4      V n         R# )r   Nr   rP   rC  r   s   &r   rM   TestCopyingTuple.setUpg  s    x=r   rC  Nr  r)   s   @r   r  r  f  s     ! !r   r  c                   &   a  ] tR tRt o R tRtV tR# )TestCopyingNestedil  c                (    \        R.4      V n         R# )r   N)r  )rP  rA  rC  r   s   &r   rM   TestCopyingNested.setUpm  s    ()*r   rC  Nr  r)   s   @r   r  r  l  s     + +r   r  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	TestIdentitiesir  c                F    \        R 4      V n        \        R4      V n        R# )abracadabraalacazamN)rU   rR   r   r   s   &r   rM   TestIdentities.setUps  s    ]#Zr   c                   V P                   V P                  r!V P                  W,
          V8  4       V P                  W!,
          V8  4       V P                  W,          V8  4       V P                  W,          V8  4       V P                  W,          V8  4       V P                  W,          V8  4       V P                  W,          W,          8  4       R # r!   )rR   r   r   r   rR   r   s   &  r   test_binopsVsSubsets#TestIdentities.test_binopsVsSubsetsw  s    vvtvv1	"	"	"	"	"	"&r   c                4   V P                   V P                  r!V P                  W,          W!,          4       V P                  W,          W!,          4       V P                  W,          W!,          4       W8w  d!   V P                  W,
          W!,
          4       R # R # r!   )rR   r   rZ   r   r  s   &  r   test_commutativity!TestIdentities.test_commutativity  sk    vvtvv1ac"ac"ac"6QS) r   c                x   V P                   V P                  r!V P                  W,
          W,          ,          W!,
          ,          W,          4       V P                  W,          W,          ,          W,          4       V P                  WV,
          ,          W,          4       V P                  W,
          V,          W,          4       V P                  W,
          W,          ,          V4       V P                  W!,
          W,          ,          V4       V P                  W,
          W!,
          ,          W,          4       R # r!   )rR   r   rZ   r  s   &  r   test_summationsTestIdentities.test_summations  s    vvtvv1!#ac*AC0!#ac*aC!#&!#q!#&!#a(!#a(!#ac*r   c                   V P                   V P                  \        4       r2pV P                  W,
          V,          V4       V P                  W!,
          V,          V4       V P                  W,          W,          ,          V4       R # r!   )rR   r   rU   rZ   )r   rR   r   r  s   &   r   test_exclusionTestIdentities.test_exclusion  s[    VVTVVSUd!#q$'!#q$'!#d+r   rR   r   N)r   r   r   r   rM   r  r  r  r  r   r(   r)   s   @r   r  r  r  s#     !'*	+, ,r   r  c              #  (   "   V  F  pVx  K	  	  R# 5i)zRegular generatorNr	   seqnr   s   & r   Rr    s      s   c                   0   a  ] tR tRt o RtR tR tRtV tR# )Gi  zSequence using __getitem__c                    Wn         R # r!   r  r   r  s   &&r   r:   
G.__init__  s    	r   c                (    V P                   V,          # r!   r  r   s   &&r   __getitem__G.__getitem__  s    yy|r   r  N)	r   r   r   r   r2   r:   r  r   r(   r)   s   @r   r  r    s       r   r  c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )Ii  z Sequence using iterator protocolc                     Wn         ^ V n        R# r6   r  r  s   &&r   r:   
I.__init__      	r   c                    V # r!   r	   r   s   &r   __iter__
I.__iter__      r   c                    V P                   \        V P                  4      8  d   \        hV P                  V P                   ,          pV ;P                   ^,          un         V# r   r   r`   r  r   r   r  s   & r   __next__
I.__next__  ?    66S^#=%8IIdff!r   r   r  N
r   r   r   r   r2   r:   r  r  r   r(   r)   s   @r   r  r    s     & r   r  c                   0   a  ] tR tRt o RtR tR tRtV tR# )Igi  z9Sequence using iterator protocol defined with a generatorc                     Wn         ^ V n        R# r6   r  r  s   &&r   r:   Ig.__init__  r  r   c              #  <   "   V P                    F  pVx  K	  	  R # 5ir!   r  )r   vals   & r   r  Ig.__iter__  s     99CI s   r  N	r   r   r   r   r2   r:   r  r   r(   r)   s   @r   r  r    s     ? r   r  c                   0   a  ] tR tRt o RtR tR tRtV tR# )Xi  z Missing __getitem__ and __iter__c                     Wn         ^ V n        R# r6   r  r  s   &&r   r:   
X.__init__  r  r   c                    V P                   \        V P                  4      8  d   \        hV P                  V P                   ,          pV ;P                   ^,          un         V# r   r  r  s   & r   r  
X.__next__  r  r   r  N)	r   r   r   r   r2   r:   r  r   r(   r)   s   @r   r  r    s     & r   r  c                   0   a  ] tR tRt o RtR tR tRtV tR# )Ni  zIterator missing __next__()c                     Wn         ^ V n        R# r6   r  r  s   &&r   r:   
N.__init__  r  r   c                    V # r!   r	   r   s   &r   r  
N.__iter__  r  r   r  Nr  r)   s   @r   r  r    s     ! r   r  c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )Ei  zTest propagation of exceptionsc                     Wn         ^ V n        R# r6   r  r  s   &&r   r:   
E.__init__  r  r   c                    V # r!   r	   r   s   &r   r  
E.__iter__  r  r   c                    ^^ ,           R# rO  r	   r   s   &r   r  
E.__next__  s    	Qr   r  Nr  r)   s   @r   r  r    s     $ r   r  c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# )Si  zTest immediate stopc                    R # r!   r	   r  s   &&r   r:   
S.__init__  s    r   c                    V # r!   r	   r   s   &r   r  
S.__iter__  r  r   c                    \         hr!   )r   r   s   &r   r  
S.__next__  s    r   r	   Nr  r)   s   @r   r  r    s      r   r  )chainc                d    \        \        R \        \        \	        V 4      4      4      4      4      # )z Test multiple tiers of iteratorsc                     V # r!   r	   )r}   s   &r   r  L.<locals>.<lambda>  s    ar   )r  r   r  r  r  r  s   &r   Lr    s     Z2ag;011r   c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestVariousIteratorArgsi  c                   \         \        3 F  pR R\        R4      R\        RR^4      3 F  p\        \        \
        \        \        \        3 FE  pV P                  \        V! V! V4      4      \        R7      \        V! V4      \        R7      4       KG  	  V P                  \        V\        V4      4       V P                  \        V\        V4      4       V P                  \         V\#        V4      4       K  	  K  	  R# )123r   r      r}  Ndog333333?)rU   re   r   r  r  r  r  r  r  rZ   rY   r.   rS   rT   r  r  ZeroDivisionErrorr  )r   consrI   gs   &   r   r:  (TestVariousIteratorArgs.test_constructor  s    )$DRtk5d1;MNQAq!,A$$VD1JD%A6!A$TXCYZ -!!)TAaD9!!)TAaD9!!"3TAaDA O %r   c                   \        R 4      pRR\        R4      R	\        RR^4      R3 EF5  pVP                  VP                  VP                  VP
                  VP                  3 F  p\        \        \        \        \        3 Fr  pV! V4      pV! V! V4      4      p\        V\        4      '       d   V P                  We4       KB  V P                  \        V\         R7      \        V\         R7      4       Kt  	  V P#                  \$        V\'        V4      4       V P#                  \$        V\)        V4      4       V P#                  \*        V\-        V4      4       K  	  EK8  	  R# )
novemberr  r   r  r  r  decemberr}  Nr  )rU   r   ru   r   r   r   r   r  r  r  r  r  
isinstanceboolrZ   rY   r.   rS   rT   r  r  r  r  )r   rI   r   methr   r\   r[   s   &      r   test_inline_methods+TestVariousIteratorArgs.test_inline_methods  s	   
OBd[%T!:LjYD!..!,,@V@VXYXdXdeQAq)A#DzH!!D']F!(D11((:((D)A6(X\C]^ * !!)T1Q48!!)T1Q48!!"3T1Q4@ f Zr   c                   R R\        R4      R	\        RR^4      R3 EFQ  pR
 EFF  p\        \        \        \        \
        \        3 F  p\        R4      pVP                  4       p\        WB4      ! \        V! V4      4      4       \        WR4      ! V! V4      4       V P                  \        V\        R7      \        V\        R7      4       K  	  V P                  \        \        \        R4      V4      \!        V4      4       V P                  \        \        \        R4      V4      \#        V4      4       V P                  \$        \        \        R4      V4      \'        V4      4       EKI  	  EKT  	  R# )r  r   r  r  r  r  januaryr}  Nr  )r  r  r  r-  )r   r  r  r  r  r  r  rU   r   r  ry   rZ   rY   r.   rS   rT   r  r  r  r  )r   r   methnamer   rI   r   s   &     r   test_inplace_methods,TestVariousIteratorArgs.test_inplace_methods  s   Bd[%T!:LjYDQQAq!,AIAAA(ag7A(41$$VA4%8&:MN - !!)WS^X-NPQRVPWX!!)WS^X-NPQRVPWX!!"3WS^X5VXYZ^X_`Q Zr   r	   N)	r   r   r   r   r:  r  r  r   r(   r)   s   @r   r  r    s     BAa ar   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )bad_eqi  c                T    \         '       d   \        P                  4        \        hWJ # r!   )be_badset2rn  r  r#   s   &&r   r%   bad_eq.__eq__  s    6JJL##}r   c                    ^ # r   r	   r   s   &r   r   bad_eq.__hash__  r   r   r	   Nr   r   r   r   r%   r   r   r(   r)   s   @r   r  r    s     
 r   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )bad_dict_cleari  c                H    \         '       d   \        P                  4        WJ # r!   )r  dict2rn  r#   s   &&r   r%   bad_dict_clear.__eq__  s    6KKM}r   c                    ^ # r  r	   r   s   &r   r   bad_dict_clear.__hash__!  r   r   r	   Nr  r)   s   @r   r  r    s      r   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestWeirdBugsi$  c                   R s \        4       0p\        ^K4       Uu0 uF  p\        4       kK  	  upsRs V P	                  \
        VP                  \        4       R s \        4       0p\        4       R/sRs VP                  \        4       R# u upi r   )
r  r  r   r  rS   r  r  r  r  r-  )r   set1r   s   &  r   test_8420_set_merge!TestWeirdBugs.test_8420_set_merge%  s}     z"'),)Q),+T[[$? !!4(((/ -s   B
c                *   \        \        ^d4      4      pVP                  4        VP                  \        ^d4      4       \	        V4      pVP                  4        \        \        ^d4      4      pVP                  \        ^d4      4       \        V4       R# )d   N)rU   r   rn  r  r   ry   )r   rI   sirR   s   &   r   test_iter_and_mutate"TestWeirdBugs.test_iter_and_mutate4  s_    c
O			s!W		s	sRr   c                   a  ! V3R  lR4      p\        4       o\        ^
4       Uu0 uF	  q!! 4       kK  	  upo^ 0pVP                  S4       R# u upi )c                   4   <a  ] tR tRt o R tV3R ltRtV tR# ).TestWeirdBugs.test_merge_and_mutate.<locals>.Xi@  c                    \        ^ 4      # r  )rj  r   s   &r   r   7TestWeirdBugs.test_merge_and_mutate.<locals>.X.__hash__A  s    Awr   c                (   < SP                  4        R # F)rn  )r   or$   s   &&r   r%   5TestWeirdBugs.test_merge_and_mutate.<locals>.X.__eq__C  s    r   r	   Nr'   )r*   r$   s   @r   r  r-  @  s      r   r  N)rU   r   r  )r   r  r   rI   r$   s   &   @r   test_merge_and_mutate#TestWeirdBugs.test_merge_and_mutate?  sG    	 	 #Bi(ii(C	 )s   Ar	   N)	r   r   r   r   r$  r)  r4  r   r(   r)   s   @r   r!  r!  $  s     0	 r   r!  c                   8   a  ] tR tRt o RtRtRtR tR tRt	V t
R# )TestOperationsMutatingiM  zRegression test for bpo-46615Nc                   aaaa  ! VVV3R  lR4      oRoV P                  V3R l\        \        ^24      4       4       4      oV P                  V3R l\        \        ^24      4       4       4      oRoSS3# )c                   8   <a  ] tR tRt o VVV3R ltR tRtV tR# )<TestOperationsMutating.make_sets_of_bad_objects.<locals>.BadiT  c                   < S'       g   R # \        ^4      ^ 8X  d   SP                  4        \        ^4      ^ 8X  d   SP                  4        \        \        ^4      4      # r1  )r   rn  r  )r   r$   enabledr#  r  s   &&r   r%   CTestOperationsMutating.make_sets_of_bad_objects.<locals>.Bad.__eq__U  sB     R=A%JJLR=A%JJLIaL))r   c                    \        ^4      # )rP   )r   r   s   &r   r   ETestOperationsMutating.make_sets_of_bad_objects.<locals>.Bad.__hash__]  s     |#r   r	   Nr  )r*   r<  r#  r  s   @r   Badr:  T  s     *$ $r   r@  Fc              3   2   <"   T F  pS! 4       x  K  	  R # 5ir!   r	   r  _r@  s   & r   r  BTestOperationsMutating.make_sets_of_bad_objects.<locals>.<genexpr>a        E0D10Dr  c              3   2   <"   T F  pS! 4       x  K  	  R # 5ir!   r	   rB  s   & r   r  rD  b  rE  r  T)constructor1r   r   constructor2)r   r@  r<  r#  r  s   &@@@@r   make_sets_of_bad_objects/TestOperationsMutating.make_sets_of_bad_objectsS  sa    
	$ 
	$    Eim0D EE   Eim0D EETzr   c                    \        ^d4       F  pV P                  4       w  r4 V! W44       K   	  R#   \         d'   pT P                  R\	        T4      4        Rp?KP  Rp?ii ; i)r'  zchanged size during iterationN)r   rI  r"   rf   rx   )r   functionrC  r#  r  r  s   &&    r   check_set_op_does_not_crash2TestOperationsMutating.check_set_op_does_not_crashg  sX    sA668JDG$    G=s1vFFGs   0A!AA!r	   )r   r   r   r   r2   rG  rH  rI  rM  r   r(   r)   s   @r   r7  r7  M  s#     'LL(G Gr   r7  c                   z   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V tR# )TestBinaryOpsMutatingiq  c                *    V P                  R  4       R# )c                 
    W8H  # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_eq_with_mutation.<locals>.<lambda>t      afr   NrM  r   s   &r   test_eq_with_mutation+TestBinaryOpsMutating.test_eq_with_mutations      (()<=r   c                *    V P                  R  4       R# )c                 
    W8g  # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_ne_with_mutation.<locals>.<lambda>w  rT  r   NrU  r   s   &r   test_ne_with_mutation+TestBinaryOpsMutating.test_ne_with_mutationv  rX  r   c                *    V P                  R  4       R# )c                 
    W8  # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_lt_with_mutation.<locals>.<lambda>z      aer   NrU  r   s   &r   test_lt_with_mutation+TestBinaryOpsMutating.test_lt_with_mutationy      (();<r   c                *    V P                  R  4       R# )c                 
    W8*  # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_le_with_mutation.<locals>.<lambda>}  rT  r   NrU  r   s   &r   test_le_with_mutation+TestBinaryOpsMutating.test_le_with_mutation|  rX  r   c                *    V P                  R  4       R# )c                 
    W8  # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_gt_with_mutation.<locals>.<lambda>  ra  r   NrU  r   s   &r   test_gt_with_mutation+TestBinaryOpsMutating.test_gt_with_mutation  rd  r   c                *    V P                  R  4       R# )c                 
    W8  # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_ge_with_mutation.<locals>.<lambda>  rT  r   NrU  r   s   &r   test_ge_with_mutation+TestBinaryOpsMutating.test_ge_with_mutation  rX  r   c                *    V P                  R  4       R# )c                     W,          # r!   r	   r  s   &&r   r  >TestBinaryOpsMutating.test_and_with_mutation.<locals>.<lambda>      aer   NrU  r   s   &r   test_and_with_mutation,TestBinaryOpsMutating.test_and_with_mutation  rd  r   c                *    V P                  R  4       R# )c                     W,          # r!   r	   r  s   &&r   r  =TestBinaryOpsMutating.test_or_with_mutation.<locals>.<lambda>  rw  r   NrU  r   s   &r   test_or_with_mutation+TestBinaryOpsMutating.test_or_with_mutation  rd  r   c                *    V P                  R  4       R# )c                     W,
          # r!   r	   r  s   &&r   r  >TestBinaryOpsMutating.test_sub_with_mutation.<locals>.<lambda>  rw  r   NrU  r   s   &r   test_sub_with_mutation,TestBinaryOpsMutating.test_sub_with_mutation  rd  r   c                *    V P                  R  4       R# )c                     W,          # r!   r	   r  s   &&r   r  >TestBinaryOpsMutating.test_xor_with_mutation.<locals>.<lambda>  rw  r   NrU  r   s   &r   test_xor_with_mutation,TestBinaryOpsMutating.test_xor_with_mutation  rd  r   c                .    R  pV P                  V4       R# )c                     W,          p R # r!   r	   r  s   &&r   r   8TestBinaryOpsMutating.test_iadd_with_mutation.<locals>.f  	    FAr   NrU  r4  s   & r   test_iadd_with_mutation-TestBinaryOpsMutating.test_iadd_with_mutation      	((+r   c                .    R  pV P                  V4       R# )c                     W,          p R # r!   r	   r  s   &&r   r   7TestBinaryOpsMutating.test_ior_with_mutation.<locals>.f  r  r   NrU  r4  s   & r   test_ior_with_mutation,TestBinaryOpsMutating.test_ior_with_mutation  r  r   c                .    R  pV P                  V4       R# )c                     W,          p R # r!   r	   r  s   &&r   r   8TestBinaryOpsMutating.test_isub_with_mutation.<locals>.f  r  r   NrU  r4  s   & r   test_isub_with_mutation-TestBinaryOpsMutating.test_isub_with_mutation  r  r   c                .    R  pV P                  V4       R# )c                     W,          p R # r!   r	   r  s   &&r   r   8TestBinaryOpsMutating.test_ixor_with_mutation.<locals>.f  r  r   NrU  r4  s   & r   test_ixor_with_mutation-TestBinaryOpsMutating.test_ixor_with_mutation  r  r   c                ~    R  pR pR pV P                  V4       V P                  V4       V P                  V4       R# )c                 *    V  F  pK  	  V F  pK  	  R # r!   r	   rR   r   r}   r   s   &&  r   f1>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f1        r   c                 *    V F  pK  	  V  F  pK  	  R # r!   r	   )rR   r   r   r}   s   &&  r   f2>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f2  r  r   c                 .    \        W4       F  w  r#K  	  R # r!   )zipr  s   &&  r   f3>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f3  s    A	 "r   NrU  )r   r  r  r  s   &   r   test_iteration_with_mutation2TestBinaryOpsMutating.test_iteration_with_mutation  s=    	
	
	 	((,((,((,r   r	   N)r   r   r   r   rV  r\  rb  rh  rm  rr  rx  r}  r  r  r  r  r  r  r  r   r(   r)   s   @r   rP  rP  q  sU     >>=>=>====,
,
,
,
- -r   rP  c                       ] tR tRt]t]tRtR# )TestBinaryOpsMutating_Set_Seti  r	   Nr   r   r   r   rU   rG  rH  r   r	   r   r   r  r        LLr   r  c                       ] tR tRt]t]tRtR# )'TestBinaryOpsMutating_Subclass_Subclassi  r	   Nr   r   r   r   r  rG  rH  r   r	   r   r   r  r        LLr   r  c                       ] tR tRt]t]tRtR# )"TestBinaryOpsMutating_Set_Subclassi  r	   N	r   r   r   r   rU   rG  r  rH  r   r	   r   r   r  r        LLr   r  c                       ] tR tRt]t]tRtR# )"TestBinaryOpsMutating_Subclass_Seti  r	   N	r   r   r   r   r  rG  rU   rH  r   r	   r   r   r  r        LLr   r  c                   b   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V tR# )TestMethodsMutatingi  c                D    V P                  \        P                  4       R # r!   )rM  rU   r   r   s   &r   test_issubset_with_mutation/TestMethodsMutating.test_issubset_with_mutation  s    ((6r   c                D    V P                  \        P                  4       R # r!   )rM  rU   r   r   s   &r   test_issuperset_with_mutation1TestMethodsMutating.test_issuperset_with_mutation      ((8r   c                D    V P                  \        P                  4       R # r!   )rM  rU   r   r   s   &r   test_intersection_with_mutation3TestMethodsMutating.test_intersection_with_mutation  s    (()9)9:r   c                D    V P                  \        P                  4       R # r!   )rM  rU   ru   r   s   &r   test_union_with_mutation,TestMethodsMutating.test_union_with_mutation  s    ((3r   c                D    V P                  \        P                  4       R # r!   )rM  rU   r   r   s   &r   test_difference_with_mutation1TestMethodsMutating.test_difference_with_mutation  r  r   c                D    V P                  \        P                  4       R # r!   )rM  rU   r   r   s   &r   'test_symmetric_difference_with_mutation;TestMethodsMutating.test_symmetric_difference_with_mutation  s    (()A)ABr   c                D    V P                  \        P                  4       R # r!   )rM  rU   r   r   s   &r   test_isdisjoint_with_mutation1TestMethodsMutating.test_isdisjoint_with_mutation  r  r   c                D    V P                  \        P                  4       R # r!   )rM  rU   r  r   s   &r   $test_difference_update_with_mutation8TestMethodsMutating.test_difference_update_with_mutation  s    (()>)>?r   c                D    V P                  \        P                  4       R # r!   )rM  rU   r  r   s   &r   &test_intersection_update_with_mutation:TestMethodsMutating.test_intersection_update_with_mutation  s    (()@)@Ar   c                D    V P                  \        P                  4       R # r!   )rM  rU   r-  r   s   &r   .test_symmetric_difference_update_with_mutationBTestMethodsMutating.test_symmetric_difference_update_with_mutation  s    (()H)HIr   c                D    V P                  \        P                  4       R # r!   )rM  rU   r  r   s   &r   test_update_with_mutation-TestMethodsMutating.test_update_with_mutation  s    ((4r   r	   N)r   r   r   r   r  r  r  r  r  r  r  r  r  r  r  r   r(   r)   s   @r   r  r    sE     79;49C9@BJ5 5r   r  c                       ] tR tRt]t]tRtR# )TestMethodsMutating_Set_Seti  r	   Nr  r	   r   r   r  r    r  r   r  c                       ] tR tRt]t]tRtR# )%TestMethodsMutating_Subclass_Subclassi  r	   Nr  r	   r   r   r  r    r  r   r  c                       ] tR tRt]t]tRtR# ) TestMethodsMutating_Set_Subclassi  r	   Nr  r	   r   r   r  r    r  r   r  c                       ] tR tRt]t]tRtR# ) TestMethodsMutating_Subclass_Seti  r	   Nr  r	   r   r   r  r    r  r   r  c                   2    ] tR tRt]t]P                  tRt	R# )TestMethodsMutating_Set_Dicti  r	   N)
r   r   r   r   rU   rG  rJ   rK   rH  r   r	   r   r   r  r    s    L==Lr   r  c                       ] tR tRt]t]tRtR# )TestMethodsMutating_Set_Listi  r	   N)	r   r   r   r   rU   rG  ry   rH  r   r	   r   r   r  r    s    LLr   r  c              #     "   \        V 4      p  \        \        V 4      .4      p\        V 4       F  pVx  W!,          x  K  	  R#   \         d    \        4       x   R# i ; i5i)z-Generates all subsets of a set or sequence U.N)r   re   r   rA  r   )Ur}   r  s   &  r   rA  rA    sU     QAtAwi !AG%K   ks(   A$5A A$A!A$ A!!A$c                
   \        V 4       Uu. uF  p\        V.4      NK  	  pp\        \        \        V 4      4       UUu. uF&  pT\        V Uu. uF  q1V,          NK  	  up4      3NK(  	  upp4      # u upi u upi u uppi )z!Graph of n-dimensional hypercube.)r   re   rJ   rA  )r3  r}   
singletonsrI   s   &   r   cuber    s{    */(3(Q)QC.(J3"58,.,Q YZ8Z!Z89:,. / / 48 .s   A5A?
A:!A?
:A?
c           	     .   / pV  F  pW,           Fs  pW,           Uu. uF  qDV8w  g   K  \        W$.4      NK  	  ppW,           Uu. uF  qDV8w  g   K  \        W4.4      NK  	  pp\        WV,           4      V\        W#.4      &   Ku  	  K  	  V# u upi u upi )zyGraph, the vertices of which are edges of G,
with two vertices being adjacent iff the corresponding
edges share a vertex.)re   )r  r  r}   r   r   nxnys   &      r   	linegraphr    s     	AA,-D;DqF")QE"DB;,-D;DqF")QE"DB;"+BE"2Ai  
 H <;s   BBBBc                   \        4       pV P                  4        F  w  r#V F  pW,           F  pW%8X  d   K  W V,          9   d   VP                  \        W$V.4      4       K6  W,           F  pWd8X  d   K  W V,          9   d   VP                  \        W$WV.4      4       K6  W,           F=  pWu8X  g   Wt8X  d   K  W V,          9   g   K   VP                  \        W$WVV.4      4       K?  	  K  	  K  	  K  	  K  	  V# )zKReturn a set of faces in G.  Where a face is a set of vertices on that face)rU   itemsr  re   )r  r   r  edgesr  v3v4v5s   &       r   facesr  %  s     	AWWY	Bee82;EE)RRL12ee8$2;EE)RR,<"=>&'ee#%8rx$,#%2;$%EE)RRR4H*I$J	 ', $   & Hr   c                   ,   a  ] tR tRt o R tR tRtV tR# )
TestGraphsi?  c                   \        ^4      p\        V4      pV P                  \        V4      ^4       VP	                  4        F  pV P                  \        V4      ^4       K   	  \        R VP	                  4        4       4      pV P                  W$4       \        V4      pV P                  \        V4      ^4       V F  pV P                  \        V4      ^4       K   	  R# )rP  c              3   4   "   T F  q F  q"x  K  	  K  	  R # 5ir!   r	   )r  r  r  s   &  r   r  'TestGraphs.test_cube.<locals>.<genexpr>H  s     Aze5a5z   N)r  rU   rZ   r`   r  r  )r   r   	vertices1edge	vertices2	cubefacesfaces   &      r   	test_cubeTestGraphs.test_cubeA  s    GF	Y+HHJDSY* AqxxzAA	.!H	Y+DSY* r   c                   \        ^4      p\        V4      pV P                  \        V4      ^4       \	        V4      pVP                  4        F  pV P                  \        V4      ^4       K   	  \	        R VP                  4        4       4      pV P                  W54       \        V4      p\        P                  ! \        4      pV F!  pV\        V4      ;;,          ^,          uu&   K#  	  V P                  V^,          ^4       V P                  V^,          ^4       V F:  p	T	p
V P                  \        V
4      ^4       V
 F  pV P                  W4       K  	  K<  	  R# )rP  c              3   4   "   T F  q F  q"x  K  	  K  	  R # 5ir!   r	   )r  r  r  s   &  r   r  0TestGraphs.test_cuboctahedron.<locals>.<genexpr>]  s     W.DUQVDQVD.Dr  N)r  r  rZ   r`   rU   r  r  r   defaultdictr=   rf   )r   r   cuboctahedronverticesr  othervertices	cubofaces	facesizesr  vertexr  cubeverts   &           r   test_cuboctahedronTestGraphs.test_cuboctahedronP  s    G!!]+R0}%"))+ESZ+ ,Wm.B.B.DWW1-(	++C0	Dc$i A%  1q)1q)#FDSY* h* ! $r   r	   N)r   r   r   r   r	  r  r   r(   r)   s   @r   r  r  ?  s     ++ +r   r  __main__)mcollections.abcr   r   r>  r?  r  r   r  unittestr  r<  randomr   r   testr   test.supportr   	Exceptionr   r   r   r,   r=   r4   r@   TestCaserI  rU   r  r  r  re   rM  rO  rj  rq  rs  ru  r  rw  r  r  r  r  r  r  r  r#  r%  r'  r5  r=  r  r  r  r  r  r
  r  r  r  rZ  rb  rg  rk  ro  rs  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r7  rP  r  r  r  r  r  r  r  r  r  r  r  rA  r  r  r  r  r   mainr	   r   r   <module>r!     s^     	    	    %  (	y 	    
"c "{E {Ez	}!lH-- }!@
	# 	!0g !0HG+L("3"3 G+R		 	6;M 6;r'3 '/x00 /
' ')%= )
 E	f) f)Th&7&7 &L(*;*; &"&h&7&7 &"x'8'8 	)x'8'8 	)	)h&7&7 	))<1B1B )Jx00 J6	H%% 	E4H%% E4RR0H%% R0lF="" F=T#3 #3L;(9(9 k8+<+< k8+<+< X%6%6 ;(9(9 pJ pJh%183D3D %$.0A0A $%2H4E4E %$/1B1B $$0(2C2C $$3X5F5F $7 7*{H$5$5 ";(9(9 "*X%6%6 *!{H$5$5 !+X%6%6 +',X&& ',V
   	 	    2'ah// 'aR  &H%% &R!G !GHD-2 D-N$98;L;L .CXEVEV )>@Q@Q )>@Q@Q 
!50 !5H"5x7H7H ,?ARAR ':H<M<M ':H<M<M !#68I8I !#68I8I 	/
4,+"" ,+b zMMO r   