HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/__pycache__/test_set.cpython-310.pyc
o

�i`�@s�ddlZddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
mZmZddl
Z
ddlZddlZddlZGdd�de�Zdd�ZGd	d
�d
�ZGdd�d�ZGd
d�de�ZGdd�d�ZGdd�deej�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�deej�Z Gdd�de!�Z"Gdd �d e �Z#e�Z$Gd!d"�d"�Z%Gd#d$�d$e%ej�Z&Gd%d&�d&e%ej�Z'Gd'd(�d(e%ej�Z(Gd)d*�d*e%ej�Z)Gd+d,�d,e%ej�Z*Gd-d.�d.e%ej�Z+Gd/d0�d0e%ej�Z,d1d2�Z-d3d4�Z.Gd5d6�d6ej�Z/Gd7d8�d8ej�Z0Gd9d:�d:ej�Z1Gd;d<�d<ej�Z2Gd=d>�d>ej�Z3Gd?d@�d@�Z4GdAdB�dBe4ej�Z5GdCdD�dDe4ej�Z6GdEdF�dFe4ej�Z7GdGdH�dHe4ej�Z8GdIdJ�dJe4ej�Z9GdKdL�dL�Z:GdMdN�dNe:ej�Z;GdOdP�dPe:ej�Z<GdQdR�dRe:ej�Z=GdSdT�dTe:ej�Z>GdUdV�dVe:ej�Z?GdWdX�dXe:ej�Z@GdYdZ�dZ�ZAGd[d\�d\eAej�ZBGd]d^�d^eAej�ZCGd_d`�d`eAej�ZDGdadb�dbeAej�ZEGdcdd�ddeAej�ZFGdedf�dfej�ZGdgdh�ZHGdidj�dj�ZIGdkdl�dl�ZJGdmdn�dn�ZKGdodp�dp�ZLGdqdr�dr�ZMGdsdt�dt�ZNGdudv�dv�ZOddwlmPZPdxdy�ZQGdzd{�d{ej�ZRGd|d}�d}�ZSGd~d�d�ZTGd�d��d�ej�ZUGd�d��d��ZVGd�d��d�eV�ZWGd�d��d�eWej�ZXGd�d��d�eWej�ZYGd�d��d�eWej�ZZGd�d��d�eWej�Z[Gd�d��d�eV�Z\Gd�d��d�e\ej�Z]Gd�d��d�e\ej�Z^Gd�d��d�e\ej�Z_Gd�d��d�e\ej�Z`Gd�d��d�e\ej�ZaGd�d��d�e\ej�Zbd�d��Zcd�d��Zdd�d��Zed�d��ZfGd�d��d�ej�Zgehd�k�r�e�i�dSdS)��N)�support)�warnings_helper)�	randrange�shufflec@�eZdZdS)�PassThruN��__name__�
__module__�__qualname__�rr�*/usr/local/lib/python3.10/test/test_set.pyr�rcc��t��N)rrrrr
�check_pass_thru��rc@�eZdZdd�Zdd�ZdS)�BadCmpcC�dS�N�r��selfrrr
�__hash__�zBadCmp.__hash__cC�t�r)�RuntimeError�r�otherrrr
�__eq__rz
BadCmp.__eq__N�r	r
rrr rrrr
rsrc@seZdZdZdd�ZdS)�ReprWrapperz*Used to test self-referential repr() callscCs
t|j�Sr)�repr�valuerrrr
�__repr__�
zReprWrapper.__repr__N)r	r
r�__doc__r%rrrr
r"sr"c@� eZdZdZdd�Zdd�ZdS)�HashCountingIntzBint-like object that counts the number of times __hash__ is calledcGs
d|_dS�Nr��
hash_count)r�argsrrr
�__init__#r&zHashCountingInt.__init__cCs|jd7_t�|�Sr)r,�intrrrrr
r%s
zHashCountingInt.__hash__N)r	r
rr'r.rrrrr
r)!�r)c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7S)8�TestJointOpscCs2d|_}d|_d|_|�|�|_t�|�|_dS)NZ
simsalabimZ
madagascarZ4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ)�word�	otherword�letters�thetype�s�dict�fromkeys�d)rr2rrr
�setUp,s

zTestJointOps.setUpcCs*|�t|jgd�|jtt�jdd�dS)N�r��a)�assertRaises�	TypeErrorr5�setr.rrrr
�test_new_or_init3�zTestJointOps.test_new_or_initcCsHt|j�}t|j�}|�||�|�t|jt��|�t|jgg�dSr)	�sortedr6r9�assertEqualr>rr5rr?)r�actual�expectedrrr
�test_uniquification7s


z TestJointOps.test_uniquificationcCs|�t|j�t|j��dSr)rD�lenr6r9rrrr
�test_len>szTestJointOps.test_lencCsb|jD]}|�||jv||jv�q|�t|jjgg�|�t|j�g�}|�	|�|j�|�dSr)
r4rDr6r9r>r?�__contains__r5�	frozenset�assertIn)r�cr6rrr
�
test_containsAs

zTestJointOps.test_containscCs�|j�|j�}|jD]}|�||v||jvp||jv�q
|�|j|�|j��|�t|�|j	�|�
t|jjt��|�
t
|jjgg�tttjtttfD]U}|�|�d��|d��td��|�|�d��|d��td��|�|�d��|d��td��|�|�d��|d��td	��|�|�d��|d�|d
��td��qN|��}|�|�tdg�|tdg��|�ddg��dS)
N�abcba�cdc�abcd�efgfe�abcefg�ccb�abc�ef�abcefZfgrr;)r6�unionr3r4rDr9r5r2�type�basetyper>rrr?r@rKr7r8�str�list�tuple)r�urM�C�xrrr
�
test_unionHs
"    (0zTestJointOps.test_unioncCsr|j�|j�}|�|jt|j�B|�|�|jt|j�B|�z|j|jBWn
ty1YdSw|�d�dS)Nz(s|t did not screen-out general iterables)r6rXr3rDr@rKr?�fail�r�irrr
�test_or[��zTestJointOps.test_orcCs�|j�|j�}|jD]}|�||v||jvo||jv�q
|�|j|�|j��|�t|�|j	�|�
t|jjt��t
ttjtttfD]U}|�|�d��|d��t
d��|�|�d��|d��t
d��|�|�d��|d��t
d��|�|�d��|d��t
d��|�|�d��|d	�|d
��t
d��qD|�d�}|��}|jt�kr�|�t|�t|��dS|�t|�t|��dS)NrOrP�ccrR�rT�bcrVZcbcfZbag�b)r6�intersectionr3r4rDr9r5r2rYrZr>rrr@rKr7r8r[r\r]�id�assertNotEqual)rrdrMr_r6�zrrr
�test_intersectionfs"
"    (
zTestJointOps.test_intersectionc	Cs�dd�}dD]7}|�|�}dD]-}tttjtttfD]!}||�}|�|�}|||�}|�	||�|�
|dup9|du�qqqdS)NcSst|��|�S)z&Pure python equivalent of isdisjoint())r@rk)�s1�s2rrr
�f{sz'TestJointOps.test_isdisjoint.<locals>.f)
rhr=�abrUZababacrPrgrRrTrVTF)r5r@rKr7r8r[r\r]�
isdisjointrD�
assertTrue)	rrrZlargrpZrargr_rqrErFrrr
�test_isdisjointzs


���zTestJointOps.test_isdisjointcCsr|j�|j�}|�|jt|j�@|�|�|jt|j�@|�z|j|j@Wn
ty1YdSw|�d�dS)Nz(s&t did not screen-out general iterables)r6rkr3rDr@rKr?rbrcrrr
�test_and�rfzTestJointOps.test_andcCsf|j�|j�}|jD]}|�||v||jvo||jv�q
|�|j|�|j��|�t|�|j	�|�
t|jjt��|�
t
|jjgg�tttjtttfD]b}|�|�d��|d��td��|�|�d��|d��td��|�|�d��|d��td��|�|�d��|d��td��|�|�d���td��|�|�d��|d�|d	��td
��qNdS)NrOrPrsrRrUrTr=rVrjrM)r6�
differencer3r4rDr9r5r2rYrZr>rrr?r@rKr7r8r[r\r]�rrdrMr_rrr
�test_difference�s
"    (�zTestJointOps.test_differencecCsr|j�|j�}|�|jt|j�|�|�|jt|j�|�z|j|jWn
ty1YdSw|�d�dS)Nz(s-t did not screen-out general iterables)r6rxr3rDr@rKr?rbrcrrr
�test_sub�rfzTestJointOps.test_subcCs&|j�|j�}|jD]}|�||v||jv||jvA�q
|�|j|�|j��|�t|�|j	�|�
t|jjt��|�
t
|jjgg�tttjtttfD]B}|�|�d��|d��td��|�|�d��|d��td��|�|�d��|d��td��|�|�d��|d��td	��qNdS)
NrOrP�abdrRrSrTr=rVrW)r6�symmetric_differencer3r4rDr9r5r2rYrZr>rrr?r@rKr7r8r[r\r]ryrrr
�test_symmetric_difference�s
"   "�z&TestJointOps.test_symmetric_differencecCsr|j�|j�}|�|jt|j�A|�|�|jt|j�A|�z|j|jAWn
ty1YdSw|�d�dS)Nz(s^t did not screen-out general iterables)r6r}r3rDr@rKr?rbrcrrr
�test_xor�rfzTestJointOps.test_xorcCs||�|jt|j��|�|jt|j��|�|j|jkd�|�|jt|j��|�|jt|j��|�|j|jkd�dS�NFT)rDr6r@r2rKrmr3rrrr
�
test_equality�szTestJointOps.test_equalitycCs,ttgd��}|�|�}|�t|�d�dS)N)ZabcdefZbcdZbdcbZfedZfedccba�)�maprKr5rDrH)r�tr6rrr
�test_setOfFrozensets�s
z!TestJointOps.test_setOfFrozensetscCs�t|jgd��\}}}|�||k�|�||k�|�||k�|�||k�|�||k�|�||k�|�||k�|�||k�|�||k�|�td��d��|�td��d��|�td��d��|�td��d��dS)N)rsZabcde�defr=rUZcbs)r�r5ruZassertFalser@�issubset�
issuperset)r�p�q�rrrr
�test_sub_and_super�szTestJointOps.test_sub_and_supercCs�ttjd�D]=}t�|j|�}t�|�}|�|j|d|j|f�t|j�tt	fvrDd|j_
t�|j|�}t�|�}|�|jj
|j
�qdS)Nr�%s != %s�
)�range�pickle�HIGHEST_PROTOCOL�dumpsr6�loadsrDrYr@rKr`)rrdr��duprrr
�
test_pickling�s

��zTestJointOps.test_picklingc	Cs�ttjd�D]X}t|j�}|�|j�}t�||�}t�|�}|�|t	j
j�|�|�|�|�t�|�}zt
|�}Wn	tyDYqwt�||�}t�|�}|�|�|�||�|f��qdSr)r�r�r��iterr6r5r�r�ZassertIsInstance�collectionsrU�IteratorrD�next�
StopIteration)r�protoZitorg�datar9�itZdroprrr
�test_iterator_pickling�s"


�
 �z#TestJointOps.test_iterator_picklingcs~G�fdd�d���d�}|�|g�}t�|�}|�t|�t|��|D]}|}q$|�t|�t|��|�|jd|j�dS)Ncs*eZdZdd�Zdd�Zd�fdd�	ZdS)	z*TestJointOps.test_deepcopy.<locals>.TracercS�
||_dSr�r$)rr$rrr
r.r&z3TestJointOps.test_deepcopy.<locals>.Tracer.__init__cSs|jSrr�rrrr
rsz3TestJointOps.test_deepcopy.<locals>.Tracer.__hash__Ncs�|jd�Srr�)r�memo��Tracerrr
�__deepcopy__
�z7TestJointOps.test_deepcopy.<locals>.Tracer.__deepcopy__r)r	r
rr.rr�rr�rr
r�sr�r�r)r5�copy�deepcopyrmrlrDr$)rr�r6r��elemZnewtrr�r
�
test_deepcopys
zTestJointOps.test_deepcopycsNGdd�d��t�fdd�td�D��}|D]}||_||_t|g�|_qdS)Nc@r)zTestJointOps.test_gc.<locals>.ANrrrrr
�Arr�c3��|]}��VqdSrr��.0rd�r�rr
�	<genexpr>��z'TestJointOps.test_gc.<locals>.<genexpr>��)r@r��cycle�sub)rr6r�rr�r
�test_gcs�zTestJointOps.test_gccCsVGdd�d|j�}|�}t�}|�|�|�||�|�|�|�|�|�|�dS)Nc@�eZdZdd�ZdS)z6TestJointOps.test_subclass_with_custom_hash.<locals>.HcSstt|�d@�S)Ni���)r/rlrrrr
r"�z?TestJointOps.test_subclass_with_custom_hash.<locals>.H.__hash__N)r	r
rrrrrr
�H!�r�)r5r@�addrL�remove�discard)rr�r6rrrrr
�test_subclass_with_custom_hashs


z+TestJointOps.test_subclass_with_custom_hashcCs�|�t�g�}|�t|jt�t�g�|�t|jt��t|d�r>|�t|jt��|�t|jt��|�t|jt��dSdS)Nr�)	r5rr>rrJ�hasattrr�r�r��rr6rrr
�test_badcmp,s
�zTestJointOps.test_badcmpcCsdt�}|�|g�}||_|jtkr|�t|�d�dSt|��d�d}|�t|�d||f�dS)Nz
{set(...)}�(rz
%s({%s(...)}))r"r5r$r@rDr#�	partition)r�wr6�namerrr
�test_cyclical_repr7s
zTestJointOps.test_cyclical_reprcCs:d}t�ttt|���}|�tdd�|D��|�|�|�}|�tdd�|D��|�|�|�|�tdd�|D��|�t	|d�rG|�
|�|�tdd�|D��|�t�t|��}|�tdd�|D��|�t�t|��}|�td	d�|D��|�t�t|�d
�}|�tdd�|D��|�|�|t�|d
��dS)Nr�cs��|]}|jVqdSrr+�r�r�rrr
r�Dr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>csr�rr+r�rrr
r�Fr�csr�rr+r�rrr
r�Hr��symmetric_difference_updatecsr�rr+r�rrr
r�Kr�csr�rr+r�rrr
r�Mr�csr�rr+r�rrr
r�Or��{csr�rr+r�rrr
r�Qr�)
r7r8r�r)r�rD�sumr5rxr�r�r@rK)r�nr9r6Zd2Zd3rrr
�test_do_not_rehash_dict_keysAs"



z)TestJointOps.test_do_not_rehash_dict_keyscCsXGdd�dt�}|�}t�|�}t|dg�}t|�|_~~t��|�|�dud�dS)Nc@r)z/TestJointOps.test_container_iterator.<locals>.CNrrrrr
r_Vrr_rzCycle was not collected)	�object�weakref�refr@r�r`�gcZcollectru)rr_�objr��	containerrrr
�test_container_iteratorTs

z$TestJointOps.test_container_iteratorcCst�|t|j�dSr)rZcheck_free_after_iteratingr�r5rrrr
�test_free_after_iterating`�z&TestJointOps.test_free_after_iteratingN)r	r
rr:rArGrIrNrarerorvrwrzr{r~rr�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
r1)s8


r1c@s�eZdZeZeZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Ze� e!ed3�d4�d5d6��Z"d7S)8�TestSetcCsj|��}|�|j�|�|t|j��|�|j�|�|t|j��|�t|j|d�|�t|jd�dS)Nr;r)r5r.r2rDr@r3r>r?r�rrr
�	test_initgszTestSet.test_initcC�0|�td��}|�|�}|�t|�t|��dS�Nr��r5r�rmrl�rr6r�rrr
�test_constructor_identityp�
z!TestSet.test_constructor_identitycCs$tgd��}hd�}|�||�dS)N�rr;r��rr;r��r@rDr�rrr
�test_set_literaluszTestSet.test_set_literalcCs4hd�}|�t|�d�|��}|�t|�t�dS)N>rr)rDrH�poprYr/)rr6Zstored_valuerrr
� test_set_literal_insertion_orderzsz(TestSet.test_set_literal_insertion_ordercs:g��fdd�}|d�|d�|d�h}|��gd��dS)Ncs��|�dSr)�append)r���eventsrr
�record�r�z9TestSet.test_set_literal_evaluation_order.<locals>.recordrr;r�r�)rD)rr�r6rr�r
�!test_set_literal_evaluation_order�sz)TestSet.test_set_literal_evaluation_ordercCs|�tt|j�dSr)r>r?�hashr6rrrr
�	test_hash�r�zTestSet.test_hashcCs0|j��|�|jt��|�t|j�d�dSr*)r6�clearrDr@rHrrrr
�
test_clear�s
zTestSet.test_clearcCsD|j��}|�|j|�|�t|j�t|��|�t|�|j�dSr)r6r�rDrmrlrYrZ�rr�rrr
�	test_copy�s
zTestSet.test_copycCsT|j�d�|�d|j�|j��}|j�d�|�|j|�|�t|jjg�dS)N�Q)r6r�rLr�rDr>r?r�rrr
�test_add�s
zTestSet.test_addcCs�|j�d�|�d|j�|�t|jjd�|�t|jjg�|�t|j�g�}|�	|�|j�|�|�|�|j��|�|�|j�|�|�t|jj|�|j��dS�Nr=r�)
r6r��assertNotInr>�KeyErrorr?r5rKr2rLr�rrr
�test_remove�szTestSet.test_removecCsbdD],}z|j�|�Wnty)}z|jd}|�||�WYd}~qd}~ww|��qdS)N)r��rr)r6r�r�r-rDrb)r�v1�e�v2rrr
�test_remove_keyerror_unpacking�s
��
�z&TestSet.test_remove_keyerror_unpackingcCsv|�ddg�}z|j�|�Wn%ty4}z|�|jd|ud�||jd��WYd}~dSd}~ww|��dS)Nr��rzKeyError should be {0}, not {1})r5r6r�r�rur-�formatrb)r�keyr�rrr
�test_remove_keyerror_set�s����z TestSet.test_remove_keyerror_setcCs�|j�d�|�d|j�|j�d�|�t|jjg�|�t|j�g�}|�|�|j�|�|�|�|j��|�|�|j�|�|�|�|j��dSr�)	r6r�r�r>r?r5rKr2rLr�rrr
�test_discard�szTestSet.test_discardcCs@tt|j��D]}|j��}|�||j�q|�t|jj�dSr)r�rHr6r�r�r>r�)rrdr�rrr
�test_pop�s
zTestSet.test_popc	Cs(|j�|j�}|�|d�|j|jD]	}|�||j�q|�t|jjt��|�t	|jjgg�dD](\}}t
ttj
tttfD]}|�d�}|�|�||��d�|�|t
|��q@q3dD]3}d}t
ttj
tttfD]%}|�d�}|�|�||�||��d�|�|t
|�t
|�Bt
|�B�qkq^dS)N))rPrQ�rRrS)rTrU�rVrWrO)rPrRrTrVZabcdaZahi)r6�updater3rDr2rLr>rrr?r@rKr7r8r[r\r]r5�r�retvalrMr�r�r_r6rrr
�test_update�s(
�
"��zTestSet.test_updatecCs8|jt|j�O_|j|jD]	}|�||j�qdSr)r6r@r3r2rL�rrMrrr
�test_ior�s�zTestSet.test_iorc		Cs.|j�|j�}|�|d�|j|jD]}||jvr'||jvr'|�||j�q|�||j�q|�t|jjt	��|�t
|jjgg�dD]O\}}ttt
jtttfD]A}|�d�}|�|�||��d�|�|t|��d}|�|�}d}|�|�||�||��d�|�|td�t|�@t|�@�qRqEdS)N))rPrM)rRrh)rTri)rVrhrOZcbc)r6�intersection_updater3rDr2rLr�r>rrr?r@rKr7r8r[r\r]r5)	rrrMr�r�r_r6�ssr�rrr
�test_intersection_update�s(

"��z TestSet.test_intersection_updatecCs\|jt|j�M_|j|jD]}||jvr$||jvr$|�||j�q|�||j�qdSr�r6r@r3r2rLr�rrrr
�	test_iand���zTestSet.test_iandcCsr|j�|j�}|�|d�|j|jD]}||jvr'||jvr'|�||j�q|�||j�q|�t|jjt	��|�t
|jjgg�|�t
|jjgg�dD]g\}}tt
tjtttfD]Y}|�d�}|�|�||��d�|�|t|��|�d�}|��|�||�d��|�d�}|�|d��|�||�d��|�d�}|�|d�|d��|�||�d��q\qOdS)N))rPrs)rRrU�rTr=)rVrUrOZ
abcdefghihZabaZcdefghihrPZefghih)r6�difference_updater3rDr2rLr�r>rrr?r�r@rKr7r8r[r\r]r5rrrr
�test_difference_updates2



��zTestSet.test_difference_updatecCs\|jt|j�8_|j|jD]}||jvr$||jvr$|�||j�q|�||j�qdSrr
rrrr
�	test_isub#rzTestSet.test_isubcCs�|j�|j�}|�|d�|j|jD]}||jv||jvAr'|�||j�q|�||j�q|�t|jjt	��|�t
|jjgg�dD](\}}ttt
jtttfD]}|�d�}|�|�||��d�|�|t|��qRqEdS)N))rPr|r�r
rrO)r6r�r3rDr2rLr�r>rrr?r@rKr7r8r[r\r]r5rrrr
� test_symmetric_difference_update+s
��z(TestSet.test_symmetric_difference_updatecCs\|jt|j�N_|j|jD]}||jv||jvAr$|�||j�q|�||j�qdSrr
rrrr
�	test_ixor;rzTestSet.test_ixorcCst|j��}||O}|�||j�||M}|�||j�||8}|�||���|j��}||N}|�||���dSr)r6r�rDr5)rr�rrr
�test_inplace_on_selfCs

zTestSet.test_inplace_on_selfcCsF|�d�}t�|�}|�t|�t|��d}t��|�tt|�dS)NZgallahad)	r5r��proxyrDr[r�
gc_collectr>�ReferenceError)rr6r�rrr
�test_weakrefOs

zTestSet.test_weakrefcCs�Gdd�d�}hd�}|�}||k|�|j�|�}||k|�|j�|�}||k|�|j�|�}||k|�|j�dS)Nc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
z5TestSet.test_rich_compare.<locals>.TestRichSetComparecS�
d|_dS�NTF)�	gt_called�rZsome_setrrr
�__gt__Y�z<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__gt__cSrr)�	lt_calledrrrr
�__lt__\rz<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__lt__cSrr)�	ge_calledrrrr
�__ge___rz<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__ge__cSrr)�	le_calledrrrr
�__le__brz<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__le__N)r	r
rrrr!r#rrrr
�TestRichSetCompareXs
r$r�)rurrr r")rr$ZmysetZmyobjrrr
�test_rich_compareWszTestSet.test_rich_compare�
test_c_apiz*C API test only available in a debug buildcCs|�t���d�dS�NT)rDr@r&rrrr
r&{szTestSet.test_c_apiN)#r	r
rr@r5rZr�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr	rrrrrrrr%�unittestZ
skipUnlessr�r&rrrr
r�cs@	$�r�c@r)�SetSubclassNrrrrr
r)�rr)c@�eZdZeZeZdS)�TestSetSubclassN)r	r
rr)r5r@rZrrrr
r+��r+c@seZdZgdfdd�ZdS)�SetSubclassWithKeywordArgsNcCst�||�dSr)r@r.)r�iterable�newargrrr
r.�r�z#SetSubclassWithKeywordArgs.__init__)r	r
rr.rrrr
r-�sr-c@r�)�TestSetSubclassWithKeywordArgscCstdd�dS)z=SF bug #1486663 -- this used to erroneously raise a TypeErrorr)r/N)r-rrrr
�test_keywords_in_subclass�sz8TestSetSubclassWithKeywordArgs.test_keywords_in_subclassN)r	r
rr1rrrr
r0�sr0c@sLeZdZeZeZdd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Zd
d�ZdS)�
TestFrozenSetcCs.|�|j�}|�|j�|�|t|j��dSr)r5r2r.r3rDr@r�rrr
r��szTestFrozenSet.test_initcCr�r�)r5r�rDrlr�rrr
r��r�z'TestFrozenSet.test_constructor_identitycs~|�t|�d��t|�d���d��fdd�t��D�}t�}td�D]}t|�|�t|�|���q$|�t|�d�dS)NZabcdebZebecda�dcsg|]}t���qSr�rr��r�rr
�
<listcomp>��z+TestFrozenSet.test_hash.<locals>.<listcomp>��r)rDr�r5r�r@rr�rH)r�seq�resultsrdrr5r
r��s�zTestFrozenSet.test_hashcC�$|j��}|�t|j�t|��dSr)r6r�rDrlr�rrr
r���
zTestFrozenSet.test_copycCsrttd��td�dg}|�|�}|�t|��}|�||�|�t|�t|��i}d||<|�||d�dS)Nr�ZabcdefgZapple�*)r\r�r5�reversedrDrmrl)rr9Zkey1Zkey2r9rrr
�test_frozen_as_dictkey�s
z$TestFrozenSet.test_frozen_as_dictkeycCs"|�d�}|�t|�t|��dS)NZabcdcda)r5rDr��rrrrrr
�test_hash_caching�s
zTestFrozenSet.test_hash_cachingc
	s�d}t�}|j}dd�t|�D�}td|�D]�|tt�fdd�|D����q|�t|�d|�dd�}dd	�}td
�D]+}d|}|d�t|fD]}t�fdd
�tt|||���D��}	|�d|	|�qMq?dS)N�
cSsg|]
}|dd|>f�qSr�rr�rrr
r6��z9TestFrozenSet.test_hash_effectiveness.<locals>.<listcomp>r;csg|]
\}}|�@r|�qSrr)r�r��m�rdrr
r6�rCcSs8t�g}t|d�D]}t|�}|�|�q
|d|�Sr)rKr�r�)r��numsrd�numrrr
�zf_range�s
z7TestFrozenSet.test_hash_effectiveness.<locals>.zf_rangecss4�tt|�d�D]}ttt�||��EdHq	dSr)r�rHr�rK�	itertools�combinations)r6rdrrr
�powerset�s��z7TestFrozenSet.test_hash_effectiveness.<locals>.powerset�rcsh|]}|�@�qSrr)r��h)�maskrr
�	<setcomp>�r7z8TestFrozenSet.test_hash_effectiveness.<locals>.<setcomp>r�)	r@r�r�r�rKrDrHr�Z
assertGreater)
rr�Z
hashvaluesZaddhashvalueZ	elemmasksrHrKr�rFr^r)rdrNr
�test_hash_effectiveness�s" $��z%TestFrozenSet.test_hash_effectivenessN)
r	r
rrKr5rZr�r�r�r�r?rArPrrrr
r2�s

r2c@r)�FrozenSetSubclassNrrrrr
rQ�rrQc@s4eZdZeZeZdd�Zdd�Zdd�Z	dd�Z
d	S)
�TestFrozenSetSubclasscCr�r�r�r�rrr
r��r�z/TestFrozenSetSubclass.test_constructor_identitycCr;r)r6r�rmrlr�rrr
r��r<zTestFrozenSetSubclass.test_copycCs"|��}|�|�}|�||�dSr)r5rDr�rrr
�test_nested_empty_constructor�s
z3TestFrozenSetSubclass.test_nested_empty_constructorcCs�|j}t�}|�}|�|g�|d�|d�|�|g�|d�|d�|td��||��|t��||||�||�g}|�tttt|���t|��dS)Nrrhr)r5rKr�rDrHr@r�rl)rZ	Frozensetrr�FZefsrrr
�test_singleton_empty_frozenset�s�"z4TestFrozenSetSubclass.test_singleton_empty_frozensetN)r	r
rrQr5rKrZr�r�rSrUrrrr
rR�srRc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/S)0�TestBasicOpscCs&|jdur|�t|j�|j�dSdSr)r#rDr@rrrr
�	test_reprs
�zTestBasicOps.test_reprcCslt|j�}|�|�d��|�|�d��|dd��d�}|��dd�|jD�}|��|�||�dS)N�{�}r���z, cSsg|]}t|��qSr)r#)r�r$rrr
r6
r7z:TestBasicOps.check_repr_against_values.<locals>.<listcomp>)	r#r@ru�
startswith�endswith�split�sort�valuesrD)r�text�resultZsorted_repr_valuesrrr
�check_repr_against_valuess
z&TestBasicOps.check_repr_against_valuescCs|�t|j�|j�dSr)rDrHr@�lengthrrrr
�test_length�zTestBasicOps.test_lengthcCs|�|j|j�dSr�rDr@rrrr
�test_self_equalityr�zTestBasicOps.test_self_equalitycCs|�|j|j�dSr)rDr@r�rrrr
�test_equivalent_equalityr�z%TestBasicOps.test_equivalent_equalitycCs|�|j��|j�dSr)rDr@r�r�rrrr
r�rezTestBasicOps.test_copycCs|j|jB}|�||j�dSr�r@rDr��rrarrr
�test_self_union�zTestBasicOps.test_self_unioncCs|jtB}|�||j�dSr�r@�	empty_setrDr�rjrrr
�test_empty_union!�
zTestBasicOps.test_empty_unioncCst|jB}|�||j�dSr)rnr@rDr�rjrrr
�test_union_empty%rpzTestBasicOps.test_union_emptycCs|j|j@}|�||j�dSrrirjrrr
�test_self_intersection)rlz#TestBasicOps.test_self_intersectioncCs|jt@}|�|t�dSr�r@rnrDrjrrr
�test_empty_intersection-�
z$TestBasicOps.test_empty_intersectioncCst|j@}|�|t�dSr�rnr@rDrjrrr
�test_intersection_empty1ruz$TestBasicOps.test_intersection_emptycCs"|j�|j�}|�||j�dSr�r@rtrDrjrrr
�test_self_isdisjoint5�z!TestBasicOps.test_self_isdisjointcCs|j�t�}|�|d�dSr')r@rtrnrDrjrrr
�test_empty_isdisjoint9�z"TestBasicOps.test_empty_isdisjointcCst�|j�}|�|d�dSr')rnrtr@rDrjrrr
�test_isdisjoint_empty=r|z"TestBasicOps.test_isdisjoint_emptycCs|j|jA}|�|t�dSr�r@rDrnrjrrr
�test_self_symmetric_differenceAr|z+TestBasicOps.test_self_symmetric_differencecCs|jtA}|�||j�dSrrsrjrrr
�test_empty_symmetric_differenceErpz,TestBasicOps.test_empty_symmetric_differencecCs|j|j}|�|t�dSrr~rjrrr
�test_self_differenceIr|z!TestBasicOps.test_self_differencecCs|jt}|�||j�dSrrmrjrrr
�test_empty_differenceMrpz"TestBasicOps.test_empty_differencecCst|j}|�|t�dSrrvrjrrr
�test_empty_difference_revQruz&TestBasicOps.test_empty_difference_revcCs>|jD]	}|�||j�qt|j�}|�|��t|j��dSr)r@rLr_r�rD�__length_hint__rH)r�vZsetiterrrr
�test_iterationUs

zTestBasicOps.test_iterationcCsJttjd�D]}t�|j|�}t�|�}|�|j|d|j|f�qdS)Nrr�)r�r�r�r�r@r�rD)rr�r�r�rrr
r�[s

��zTestBasicOps.test_picklingcCsr|�t��t��d�Wd�n1swY|�t��t��d�Wd�dS1s2wYdS)Nr�)r>r?r@rxrrrrr
�test_issue_37219bs�"�zTestBasicOps.test_issue_37219N)r	r
rrWrbrdrgrhr�rkrorqrrrtrwryr{r}rr�r�r�r�r�r�r�rrrr
rVs0rVc@r�)�TestBasicOpsEmptycCs4d|_g|_t|j�|_t|j�|_d|_d|_dS)Nz	empty setrzset()��caser_r@r�rcr#rrrr
r:ks
zTestBasicOpsEmpty.setUpN�r	r
rr:rrrr
r�jr�r�c@�$eZdZdd�Zdd�Zdd�ZdS)�TestBasicOpsSingletoncC�6d|_dg|_t|j�|_t|j�|_d|_d|_dS)Nzunit set (number)r�rz{3}r�rrrr
r:v�
zTestBasicOpsSingleton.setUpcC�|�d|j�dSr��rLr@rrrr
�test_in~�zTestBasicOpsSingleton.test_incCr��Nr;�r�r@rrrr
�test_not_in�r�z!TestBasicOpsSingleton.test_not_inN�r	r
rr:r�r�rrrr
r�u�r�c@r�)�TestBasicOpsTuplecCr�)Nzunit set (tuple)�r�zerorz
{(0, 'zero')}r�rrrr
r:�r�zTestBasicOpsTuple.setUpcCr�)Nr�r�rrrr
r��r�zTestBasicOpsTuple.test_incCr�)N�	r�rrrr
r��r�zTestBasicOpsTuple.test_not_inNr�rrrr
r��r�r�c@r�)�TestBasicOpsTriplecCs<d|_ddtjg|_t|j�|_t|j�|_d|_d|_dS)Nz
triple setrr�r�)r��operatorr�r_r@r�rcr#rrrr
r:�s
zTestBasicOpsTriple.setUpNr�rrrr
r��r�r�c@r)�TestBasicOpsStringcC�2d|_gd�|_t|j�|_t|j�|_d|_dS)Nz
string set�r=rjrMr��r�r_r@r�rcrrrr
r:��


zTestBasicOpsString.setUpcC�|��dSr�rbrrrr
rW��zTestBasicOpsString.test_reprN�r	r
rr:rWrrrr
r���r�c@r)�TestBasicOpsBytescCr�)Nz	bytes set)�a�b�cr�r�rrrr
r:�r�zTestBasicOpsBytes.setUpcCr�rr�rrrr
rW�r�zTestBasicOpsBytes.test_reprNr�rrrr
r��r�r�c@r�)�TestBasicOpsMixedStringBytescCsRt��|_|j��t�dt�d|_gd�|_t	|j�|_	t	|j�|_
d|_dS)N�ignorezstring and bytes set)r=rjr�r�r�)rZcheck_warnings�_warning_filters�	__enter__�warnings�simplefilter�BytesWarningr�r_r@r�rcrrrr
r:�s



z"TestBasicOpsMixedStringBytes.setUpcCs|j�ddd�dSr)r��__exit__rrrr
�tearDown�r�z%TestBasicOpsMixedStringBytes.tearDowncCr�rr�rrrr
rW�r�z&TestBasicOpsMixedStringBytes.test_reprN)r	r
rr:r�rWrrrr
r��s
r�ccrr)r?rrrr
�baditer�rr�ccs�dVdSr'rrrrr
�gooditer�s�
r�c@�(eZdZdZdd�Zdd�Zdd�ZdS)	�TestExceptionPropagationz?SF 628246:  Set constructor should not trap iterator TypeErrorscCs|�ttt��dSr)r>r?r@r�rrrr
�test_instanceWithException�r�z3TestExceptionPropagation.test_instanceWithExceptioncCsFtgd��td�tdddd��ttd��td�tt��dS)Nr�rr;r�)ZoneZtwoZthreerU)r@r�r�rrrr
�test_instancesWithoutException�sz7TestExceptionPropagation.test_instancesWithoutExceptioncCsJtgd��}z
|D]}|�dg�q	Wn
tyYdSw|�d�dS)Nr�r�z0no exception when changing size during iteration)r@rrrb)rr6rdrrr
�test_changingSizeWhileIterating�s��z8TestExceptionPropagation.test_changingSizeWhileIteratingN)r	r
rr'r�r�r�rrrr
r��s
	r�c@r�)�
TestSetOfSetscCs\tdg�}t|g�}|��}|�t|�t�|�|�|�|�|�|t��|�|�dSr)rKr@r�rDrYr�r�r�)r�innerZouter�elementrrr
�test_constructor�s



zTestSetOfSets.test_constructorN)r	r
rr�rrrr
r��r�r�c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%S)&�
TestBinaryOpscC�td�|_dS�N�r;r���r@rrrr
r:�r�zTestBinaryOps.setUpcCs|�|jtdddd���dS)Nrr��r�rfrrrr
�test_eqszTestBinaryOps.test_eqcCs$|jtdg�B}|�|td��dS�Nr;r�r�rjrrr
�test_union_subsetszTestBinaryOps.test_union_subsetcCs*|jtgd��B}|�|tgd���dS�N�r;r�r��r�rjrrr
�test_union_superset	rBz!TestBinaryOps.test_union_supersetcCs*|jtgd��B}|�|tgd���dS�N�r�r�r�)r;r�r�r�r�r�rjrrr
�test_union_overlap
rBz TestBinaryOps.test_union_overlapcCs(|jtdg�B}|�|tgd���dS�Nr�r�r�rjrrr
�test_union_non_overlap�z$TestBinaryOps.test_union_non_overlapcCs"|jtd�@}|�|td��dS�N�r;r�r�rjrrr
�test_intersection_subsetrzz&TestBinaryOps.test_intersection_subsetcCs*|jtgd��@}|�|tgd���dS�Nr�r�r�rjrrr
�test_intersection_supersetrBz(TestBinaryOps.test_intersection_supersetcCs(|jtgd��@}|�|tdg��dS�Nr�r�r�rjrrr
�test_intersection_overlap�z'TestBinaryOps.test_intersection_overlapcCs |jtdg�@}|�|t�dS�Nr�r~rjrrr
�test_intersection_non_overlap!�z+TestBinaryOps.test_intersection_non_overlapcCs |j�td��}|�|d�dS)Nr�Frxrjrrr
�test_isdisjoint_subset%r�z$TestBinaryOps.test_isdisjoint_subsetcC�$|j�tgd���}|�|d�dS)Nr�Frxrjrrr
�test_isdisjoint_superset)�z&TestBinaryOps.test_isdisjoint_supersetcCr�)Nr�Frxrjrrr
�test_isdisjoint_overlap-r�z%TestBinaryOps.test_isdisjoint_overlapcCs"|j�tdg��}|�|d�dS)Nr�Trxrjrrr
�test_isdisjoint_non_overlap1sz)TestBinaryOps.test_isdisjoint_non_overlapcC�$|jtd�A}|�|tdg��dS�Nr�r�r�rjrrr
�test_sym_difference_subset5�z(TestBinaryOps.test_sym_difference_subsetcCr��Nr�r�r�rjrrr
�test_sym_difference_superset9r�z*TestBinaryOps.test_sym_difference_supersetcCs&|jtd�A}|�|tgd���dS�Nr�)r;r�r�r�r�rjrrr
�test_sym_difference_overlap=sz)TestBinaryOps.test_sym_difference_overlapcCs(|jtdg�A}|�|tgd���dSr�r�rjrrr
�test_sym_difference_non_overlapAr�z-TestBinaryOps.test_sym_difference_non_overlapN)r	r
rr:r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
r��s&r�c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+S),�
TestUpdateOpscCr�r�r�rrrr
r:Hr�zTestUpdateOps.setUpcCs*|jtdg�O_|�|jtd��dSr�r�rrrr
r�KszTestUpdateOps.test_union_subsetcCs0|jtgd��O_|�|jtgd���dSr�r�rrrr
r�O�z!TestUpdateOps.test_union_supersetcCs0|jtgd��O_|�|jtgd���dSr�r�rrrr
r�Sr�z TestUpdateOps.test_union_overlapcCs.|jtdg�O_|�|jtgd���dSr�r�rrrr
r�W�z$TestUpdateOps.test_union_non_overlapcC�.|j�tgd���|�|jtgd���dSr�)r@rrDrrrr
�test_union_method_call[r�z$TestUpdateOps.test_union_method_callcCs(|jtd�M_|�|jtd��dSr�r�rrrr
r�_r�z&TestUpdateOps.test_intersection_subsetcCs0|jtgd��M_|�|jtgd���dSr�r�rrrr
r�cr�z(TestUpdateOps.test_intersection_supersetcCs.|jtgd��M_|�|jtdg��dSr�r�rrrr
r�gsz'TestUpdateOps.test_intersection_overlapcCs&|jtdg�M_|�|jt�dSr�r~rrrr
r�ksz+TestUpdateOps.test_intersection_non_overlapcCs,|j�tgd���|�|jtdg��dSr�)r@rrDrrrr
�test_intersection_method_callosz+TestUpdateOps.test_intersection_method_callcC�*|jtd�N_|�|jtdg��dSr�r�rrrr
r�srBz(TestUpdateOps.test_sym_difference_subsetcCr�r�r�rrrr
r�wrBz*TestUpdateOps.test_sym_difference_supersetcCs,|jtd�N_|�|jtgd���dSr�r�rrrr
r�{�z)TestUpdateOps.test_sym_difference_overlapcCs.|jtdg�N_|�|jtgd���dSr�r�rrrr
r�r�z-TestUpdateOps.test_sym_difference_non_overlapcCr�r�)r@r�rDrrrr
�test_sym_difference_method_call�r�z-TestUpdateOps.test_sym_difference_method_callcCs*|jtd�8_|�|jtdg��dSr�r�rrrr
�test_difference_subset�rBz$TestUpdateOps.test_difference_subsetcCs(|jtd�8_|�|jtg��dSr�r�rrrr
�test_difference_superset�r�z&TestUpdateOps.test_difference_supersetcCs,|jtd�8_|�|jtddg��dS�Nr�r;r�r�rrrr
�test_difference_overlap�r�z%TestUpdateOps.test_difference_overlapcCs.|jtdg�8_|�|jtgd���dS)Nr�r�r�rrrr
�test_difference_non_overlap�r�z)TestUpdateOps.test_difference_non_overlapcCs.|j�tgd���|�|jtddg��dSr�)r@rrDrrrr
�test_difference_method_call�r�z)TestUpdateOps.test_difference_method_callN)r	r
rr:r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
r�Gs,r�c@�|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�
TestMutatecCsgd�|_t|j�|_dS)Nr�)r_r@rrrr
r:�ruzTestMutate.setUpcC�"|j�d�|�|jtd��dS)NrMrU�r@r�rDrrrr
�test_add_present��zTestMutate.test_add_presentcCr)Nr9rQrrrrr
�test_add_absent�rzTestMutate.test_add_absentcCsJt�}d}|jD]}|�|�|d7}|�t|�|�q|�||j�dS)Nrr)r@r_r�rDrH)r�tmp�expected_lenr�rrr
�test_add_until_full�s

zTestMutate.test_add_until_fullcCr)NrjZac)r@r�rDrrrr
�test_remove_present�rzTestMutate.test_remove_presentcCs2z|j�d�|�d�WdStyYdSw)Nr9z7Removing missing element should have raised LookupError)r@r�rb�LookupErrorrrrr
�test_remove_absent�s�zTestMutate.test_remove_absentcCs@t|j�}|jD]}|j�|�|d8}|�t|j�|�qdSr)rHr@r_r�rD)rrr�rrr
�test_remove_until_empty�s

�z"TestMutate.test_remove_until_emptycCr)NrMrs�r@r�rDrrrr
�test_discard_present�rzTestMutate.test_discard_presentcCr)Nr9rUrrrrr
�test_discard_absent�rzTestMutate.test_discard_absentcCs |j��|�t|j�d�dSr*)r@r�rDrHrrrr
r��s
zTestMutate.test_clearcCsPi}|jrd||j��<|js|�t|�t|j��|jD]}|�||�qdSr)r@r�rDrHr_rL)rZpoppedr�rrr
r��s�
�zTestMutate.test_popcC�$|j�d�|�|jt|j��dS)Nr�r@rrDr_rrrr
�test_update_empty_tuple��z"TestMutate.test_update_empty_tuplecCr)Nr<rrrrr
�test_update_unit_tuple_overlap�rz)TestMutate.test_update_unit_tuple_overlapcCs*|j�d�|�|jt|jdg��dS)N)r=rnrnrrrrr
�"test_update_unit_tuple_non_overlap�sz-TestMutate.test_update_unit_tuple_non_overlapN)r	r
rr:rrrrr
rr
rr�r�rrrrrrr
r��s	r�c@s0eZdZddd�Zdddddd	d
�Zdd�Zd
S)�TestSubsetsr�r�)�<=�>=�==�!=�>�<rr)rrrrrrcCs�|j}|j}dD]Z}||jv}td|dt��}|�||�|tjvr6t|tj|�}||�}|�||�tj	|}td|dt��}|�||�|tjvrbt|tj|�}||�}|�||�qdS)N)rrrrrrr`�y)
�left�right�cases�eval�localsrDr�case2method�getattr�reverse)rr`rr�rFra�methodZrcaserrr
�
test_issubset�s&



��zTestSubsets.test_issubsetN)r	r
rr"r$r&rrrr
r�s��rc@s eZdZe�Ze�ZdZdZdS)�TestSubsetEqualEmptyz
both empty�rrrN�r	r
rr@rrr�rrrrr
r'
s
r'c@s,eZdZeddg�Zeddg�ZdZdZdS)�TestSubsetEqualNonEmptyrr;z
equal pairr(Nr)rrrr
r*s
r*c@s&eZdZe�Zeddg�ZdZdZdS)�TestSubsetEmptyNonEmptyrr;zone empty, one non-empty�rrrNr)rrrr
r+s
r+c@s*eZdZedg�Zeddg�ZdZdZdS)�TestSubsetPartialrr;z&one a non-empty proper subset of otherr,Nr)rrrr
r-%s

r-c@s(eZdZedg�Zedg�ZdZdZdS)�TestSubsetNonOverlaprr;zneither empty, neither containsrNr)rrrr
r.-s


r.c@r�)�TestOnlySetsInBinaryOpscCsT|�|j|jkd�|�|j|jkd�|�|j|jkd�|�|j|jkd�dSr�)rDrr@rrrr
�
test_eq_ne7sz"TestOnlySetsInBinaryOps.test_eq_necs���t�fdd����t�fdd����t�fdd����t�fdd����t�fdd����t�fdd����t�fdd����t�fd	d��dS)
Nc��j�jkSr�r@rrrrr
�<lambda>?�z:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>c��j�jkSrr2rrrr
r3@r4c��j�jkSrr2rrrr
r3Ar4c��j�jkSrr2rrrr
r3Br4cr1r�rr@rrrr
r3Dr4cr5rr8rrrr
r3Er4cr6rr8rrrr
r3Fr4cr7rr8rrrr
r3Gr4)r>r?rrrr
�test_ge_gt_le_lt>sz(TestOnlySetsInBinaryOps.test_ge_gt_le_ltcCs8z
|j|jO_Wn
tyYdSw|�d�dS�Nzexpected TypeError�r@rr?rbrrrr
�test_update_operatorI��z,TestOnlySetsInBinaryOps.test_update_operatorcC�0|jr|j�|j�dS|�t|jj|j�dSr)�otherIsIterabler@rrr>r?rrrr
rQsz#TestOnlySetsInBinaryOps.test_updatec�X��t�fdd����t�fdd���jr �j��j�dS��t�jj�j�dS)Nc��j�jBSrr2rrrr
r3Xr4z4TestOnlySetsInBinaryOps.test_union.<locals>.<lambda>crArr8rrrr
r3Yr4)r>r?r?r@rXrrrrr
raW�
z"TestOnlySetsInBinaryOps.test_unioncCs8z
|j|jM_Wn
tyYdSw|�d�dSr:r;rrrr
�!test_intersection_update_operator_r=z9TestOnlySetsInBinaryOps.test_intersection_update_operatorcCr>r)r?r@rrr>r?rrrr
r	g��z0TestOnlySetsInBinaryOps.test_intersection_updatecr@)Nc��j�j@Srr2rrrr
r3pr4z;TestOnlySetsInBinaryOps.test_intersection.<locals>.<lambda>crErr8rrrr
r3qr4)r>r?r?r@rkrrrrr
roorBz)TestOnlySetsInBinaryOps.test_intersectioncCs8z
|j|jN_Wn
tyYdSw|�d�dSr:r;rrrr
�#test_sym_difference_update_operatorwr=z;TestOnlySetsInBinaryOps.test_sym_difference_update_operatorcCr>r)r?r@r�rr>r?rrrr
�test_sym_difference_updaterDz2TestOnlySetsInBinaryOps.test_sym_difference_updatecr@)Nc��j�jASrr2rrrr
r3�r4z=TestOnlySetsInBinaryOps.test_sym_difference.<locals>.<lambda>crHrr8rrrr
r3�r4)r>r?r?r@r}rrrrr
�test_sym_difference�rBz+TestOnlySetsInBinaryOps.test_sym_differencecCs8z
|j|j8_Wn
tyYdSw|�d�dSr:r;rrrr
�test_difference_update_operator�r=z7TestOnlySetsInBinaryOps.test_difference_update_operatorcCr>r)r?r@rrr>r?rrrr
r�rDz.TestOnlySetsInBinaryOps.test_difference_updatecr@)Nc��j�jSrr2rrrr
r3�r4z9TestOnlySetsInBinaryOps.test_difference.<locals>.<lambda>crKrr8rrrr
r3�r4)r>r?r?r@rxrrrrr
rz�rBz'TestOnlySetsInBinaryOps.test_differenceN)r	r
rr0r9r<rrarCr	rorFrGrIrJrrzrrrr
r/5sr/c@r�)�TestOnlySetsNumericcC�td�|_d|_d|_dS)Nr��F�r@rr?rrrr
r:��

zTestOnlySetsNumeric.setUpNr�rrrr
rL�r�rLc@r�)�TestOnlySetsDictcCs td�|_ddd�|_d|_dS)Nr�r;r�)rr�TrOrrrr
r:�s

zTestOnlySetsDict.setUpNr�rrrr
rQ�r�rQc@r�)�TestOnlySetsOperatorcCstd�|_tj|_d|_dS)Nr�F)r@r�r�rr?rrrr
r:�s

zTestOnlySetsOperator.setUpNr�rrrr
rR�r�rRc@r�)�TestOnlySetsTuplecCrM)Nr�r�TrOrrrr
r:�rPzTestOnlySetsTuple.setUpNr�rrrr
rS�r�rSc@r�)�TestOnlySetsStringcCrM)Nr�rUTrOrrrr
r:�rPzTestOnlySetsString.setUpNr�rrrr
rT�r�rTc@r�)�TestOnlySetsGeneratorcCs$dd�}td�|_|�|_d|_dS)Ncss�tddd�D]}|VqdS)Nrr�r;)r�rErrr
�gen�s��z(TestOnlySetsGenerator.setUp.<locals>.genr�TrO)rrVrrr
r:�s

zTestOnlySetsGenerator.setUpNr�rrrr
rU�r�rUc@r)�TestCopyingcCsd|j��}t|td�}t|jtd�}|�t|�t|��tt|��D]
}|�||||u�q"dS�N�r�)r@r�rCr#rDrHr�ru�rr�Zdup_listZset_listrdrrr
r��s
�zTestCopying.test_copycCsdt�|j�}t|td�}t|jtd�}|�t|�t|��tt|��D]}|�||||�q#dSrX)r�r�r@rCr#rDrHr�rZrrr
�test_deep_copy�s�zTestCopying.test_deep_copyN)r	r
rr�r[rrrr
rW�srWc@r�)�TestCopyingEmptycCst�|_dSrr�rrrr
r:�r�zTestCopyingEmpty.setUpNr�rrrr
r\�r�r\c@r�)�TestCopyingSingletoncC�tdg�|_dS)NZhellor�rrrr
r:�r�zTestCopyingSingleton.setUpNr�rrrr
r]�r�r]c@r�)�TestCopyingTriplecCstgd��|_dS)N)r�rNr�rrrr
r:�r�zTestCopyingTriple.setUpNr�rrrr
r_�r�r_c@r�)�TestCopyingTuplecCr^)N�rr;r�rrrr
r:r�zTestCopyingTuple.setUpNr�rrrr
r`r�r`c@r�)�TestCopyingNestedcCr^)N)ra)r�r�r�rrrr
r:
r�zTestCopyingNested.setUpNr�rrrr
rb	r�rbc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�TestIdentitiescCstd�|_td�|_dS)NZabracadabraZalacazam)r@r=rjrrrr
r:s
zTestIdentities.setUpcCs�|j|j}}|�|||k�|�|||k�|�||@|k�|�||@|k�|�||B|k�|�||B|k�|�||A||Bk�dSr)r=rjru�rr=rjrrr
�test_binopsVsSubsetssz#TestIdentities.test_binopsVsSubsetscCsn|j|j}}|�||@||@�|�||B||B�|�||A||A�||kr5|�||||�dSdSr)r=rjrDrmrdrrr
�test_commutativitys�z!TestIdentities.test_commutativitycCs�|j|j}}|�||||@B||B||B�|�||@||AB||B�|�|||B||B�|�|||B||B�|�||||@B|�|�||||@B|�|�||||B||A�dSr)r=rjrDrdrrr
�test_summations&s$ zTestIdentities.test_summationscCsZ|j|jt�}}}|�|||@|�|�|||@|�|�||@||A@|�dSr)r=rjr@rD)rr=rjr�rrr
�test_exclusion1szTestIdentities.test_exclusionN)r	r
rr:rerfrgrhrrrr
rcs
rcccs�|D]}|VqdS)zRegular generatorNr��seqnrdrrr
�R:s��rkc@r()�GzSequence using __getitem__cCr�r�rj�rrjrrr
r.Ar&z
G.__init__cCs
|j|Srrmrcrrr
�__getitem__Cr&z
G.__getitem__N)r	r
rr'r.rorrrr
rl?r0rlc@r�)	�Iz Sequence using iterator protocolcC�||_d|_dSr*rirnrrr
r.H�
z
I.__init__cC�|Srrrrrr
�__iter__Krz
I.__iter__cC�2|jt|j�kr
t�|j|j}|jd7_|Sr�rdrHrjr��rr�rrr
�__next__M�z
I.__next__N�r	r
rr'r.rtrxrrrr
rpF�
rpc@r()�Igz9Sequence using iterator protocol defined with a generatorcCrqr*rirnrrr
r.UrrzIg.__init__ccs�|jD]}|VqdSrrm)r�valrrr
rtXs�
�zIg.__iter__N�r	r
rr'r.rtrrrr
r|S�r|c@r()�Xz Missing __getitem__ and __iter__cCrqr*rirnrrr
r.^rrz
X.__init__cCrurrvrwrrr
rxaryz
X.__next__N)r	r
rr'r.rxrrrr
r�\rr�c@r()�NzIterator missing __next__()cCrqr*rirnrrr
r.irrz
N.__init__cCrsrrrrrr
rtlrz
N.__iter__Nr~rrrr
r�grr�c@r�)	�EzTest propagation of exceptionscCrqr*rirnrrr
r.qrrz
E.__init__cCrsrrrrrr
rttrz
E.__iter__cCsdddS)Nr�rrrrrr
rxvr�z
E.__next__Nrzrrrr
r�or{r�c@r�)	�SzTest immediate stopcCsdSrrrnrrr
r.{rz
S.__init__cCrsrrrrrr
rt}rz
S.__iter__cCrr)r�rrrr
rxrz
S.__next__Nrzrrrr
r�ys
r�)�chaincCsttdd�ttt|�����S)z Test multiple tiers of iteratorscSrsrr�r`rrr
r3�szL.<locals>.<lambda>)r�r�rkr|rlrmrrr
�L�sr�c@r�)�TestVariousIteratorArgsc
Cs�ttfD]L}ddtd�dtddd�fD]<}ttttttfD]}|�	t
|||��td�t
||�td��q|�t
|t|��|�t
|t|��|�t|t|��qqdS)	N�123rhr��Zdog333333�?���r�rY)r@rKr�rlrpr|r�r�rkrDrCr#r>r?r�r��ZeroDivisionErrorr�)rZconsr6�grrr
r��s*��z(TestVariousIteratorArgs.test_constructorc
Cs�td�}ddtd�dtddd�d	fD]Z}|j|j|j|j|jfD]K}ttt	t
tfD]&}||�}|||��}t|t
�rA|�||�q)|�t|td
�t|td
��q)|�t|t|��|�t|t|��|�t|t|��q qdS)NZnovemberr�rhr�r�r�r�r��decemberrY)r@r�rXrkrxr}rtrlrpr|r�rk�
isinstance�boolrDrCr#r>r?r�r�r�r�)rr6r��methr�rFrErrr
�test_inline_methods�s 
��z+TestVariousIteratorArgs.test_inline_methodsc
Cs�ddtd�dtddd�dfD]f}d	D]a}ttttttfD],}td
�}|��}t	||�t
||���t	||�||��|�t|t
d�t|t
d��q|�tt	td
�|�t|��|�tt	td
�|�t|��|�tt	td
�|�t|��qqdS)Nr�rhr�r�r�r�r�r�)rrrr�ZjanuaryrY)r�rlrpr|r�r�rkr@r�r#r\rDrCr#r>r?r�r�r�r�)rr�Zmethnamer�r6r�rrr
�test_inplace_methods�s ��z,TestVariousIteratorArgs.test_inplace_methodsN)r	r
rr�r�r�rrrr
r��s	r�c@r)�bad_eqcCstrt��t�||uSr)�be_bad�set2r�r�rrrr
r �sz
bad_eq.__eq__cCrr*rrrrr
r�rzbad_eq.__hash__N�r	r
rr rrrrr
r��sr�c@r)�bad_dict_clearcCstrt��||uSr)r��dict2r�rrrr
r �szbad_dict_clear.__eq__cCrr*rrrrr
r�rzbad_dict_clear.__hash__Nr�rrrr
r��sr�c@r�)�
TestWeirdBugscCsZdat�h}dd�td�D�ada|�t|jt�dat�h}t�diada|�	t�dS)NFcSsh|]}t��qSr)r�r�rrr
rO��z4TestWeirdBugs.test_8420_set_merge.<locals>.<setcomp>�KT)
r�r�r�r�r>r�rr�r�r�)r�set1rrr
�test_8420_set_merge�s
z!TestWeirdBugs.test_8420_set_mergecCsXttd��}|��|�td��t|�}|��ttd��}|�td��t|�dS)Nr3)r@r�r�rr�r\)rr6�sir=rrr
�test_iter_and_mutate�sz"TestWeirdBugs.test_iter_and_mutatecsBG�fdd�d��t���fdd�td�D��dh}|���dS)Ncs eZdZdd�Z�fdd�ZdS)z.TestWeirdBugs.test_merge_and_mutate.<locals>.XcS�td�Sr*)r�rrrr
r��z7TestWeirdBugs.test_merge_and_mutate.<locals>.X.__hash__cs���dS)NF)r�)r�o�rrr
r �sz5TestWeirdBugs.test_merge_and_mutate.<locals>.X.__eq__Nr!rr�rr
r��sr�csh|]}���qSrrr�)r�rr
rO�r�z6TestWeirdBugs.test_merge_and_mutate.<locals>.<setcomp>r�r)r@r�rr�r)r�rr
�test_merge_and_mutate�s
z#TestWeirdBugs.test_merge_and_mutateN)r	r
rr�r�r�rrrr
r��sr�c@s(eZdZdZdZdZdd�Zdd�ZdS)�TestOperationsMutatingzRegression test for bpo-46615NcsfG���fdd�d��d�|��fdd�ttd��D���|��fdd�ttd��D���d���fS)	Ncs$eZdZ���fdd�Zdd�ZdS)z<TestOperationsMutating.make_sets_of_bad_objects.<locals>.Badcs<�sdStd�dkr���td�dkr���ttd��S)NF�rr;)rr�r�r��enabledr�r�rr
r �szCTestOperationsMutating.make_sets_of_bad_objects.<locals>.Bad.__eq__cSr�r�r4rrrr
r�r�zETestOperationsMutating.make_sets_of_bad_objects.<locals>.Bad.__hash__Nr�rr�rr
�Bad�sr�Fc3r�rr�r��_�r�rr
r��r�zBTestOperationsMutating.make_sets_of_bad_objects.<locals>.<genexpr>�2c3r�rrr�r�rr
r��r�T)�constructor1r�r�constructor2rr)r�r�r�r�r
�make_sets_of_bad_objects�s  z/TestOperationsMutating.make_sets_of_bad_objectscCs`td�D])}|��\}}z|||�Wqty-}z|�dt|��WYd}~qd}~wwdS)Nr3zchanged size during iteration)r�r�rrLr[)r�functionr�r�r�r�rrr
�check_set_op_does_not_crashs���z2TestOperationsMutating.check_set_op_does_not_crash)r	r
rr'r�r�r�r�rrrr
r��sr�c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�ZdS) �TestBinaryOpsMutatingcC�|�dd��dS)NcSs||kSrr�r=rjrrr
r3�z=TestBinaryOpsMutating.test_eq_with_mutation.<locals>.<lambda>�r�rrrr
�test_eq_with_mutationr�z+TestBinaryOpsMutating.test_eq_with_mutationcCr�)NcSs||kSrrr�rrr
r3r�z=TestBinaryOpsMutating.test_ne_with_mutation.<locals>.<lambda>r�rrrr
�test_ne_with_mutationr�z+TestBinaryOpsMutating.test_ne_with_mutationcCr�)NcSs||kSrrr�rrr
r3r�z=TestBinaryOpsMutating.test_lt_with_mutation.<locals>.<lambda>r�rrrr
�test_lt_with_mutationr�z+TestBinaryOpsMutating.test_lt_with_mutationcCr�)NcSs||kSrrr�rrr
r3r�z=TestBinaryOpsMutating.test_le_with_mutation.<locals>.<lambda>r�rrrr
�test_le_with_mutationr�z+TestBinaryOpsMutating.test_le_with_mutationcCr�)NcSs||kSrrr�rrr
r3r�z=TestBinaryOpsMutating.test_gt_with_mutation.<locals>.<lambda>r�rrrr
�test_gt_with_mutationr�z+TestBinaryOpsMutating.test_gt_with_mutationcCr�)NcSs||kSrrr�rrr
r3 r�z=TestBinaryOpsMutating.test_ge_with_mutation.<locals>.<lambda>r�rrrr
�test_ge_with_mutationr�z+TestBinaryOpsMutating.test_ge_with_mutationcCr�)NcSs||@Srrr�rrr
r3#r�z>TestBinaryOpsMutating.test_and_with_mutation.<locals>.<lambda>r�rrrr
�test_and_with_mutation"r�z,TestBinaryOpsMutating.test_and_with_mutationcCr�)NcSs||BSrrr�rrr
r3&r�z=TestBinaryOpsMutating.test_or_with_mutation.<locals>.<lambda>r�rrrr
�test_or_with_mutation%r�z+TestBinaryOpsMutating.test_or_with_mutationcCr�)NcSs||Srrr�rrr
r3)r�z>TestBinaryOpsMutating.test_sub_with_mutation.<locals>.<lambda>r�rrrr
�test_sub_with_mutation(r�z,TestBinaryOpsMutating.test_sub_with_mutationcCr�)NcSs||ASrrr�rrr
r3,r�z>TestBinaryOpsMutating.test_xor_with_mutation.<locals>.<lambda>r�rrrr
�test_xor_with_mutation+r�z,TestBinaryOpsMutating.test_xor_with_mutationcC�dd�}|�|�dS)NcSs||M}dSrrr�rrr
rr/r�z8TestBinaryOpsMutating.test_iadd_with_mutation.<locals>.fr�r@rrr
�test_iadd_with_mutation.�z-TestBinaryOpsMutating.test_iadd_with_mutationcCr�)NcSs||O}dSrrr�rrr
rr4r�z7TestBinaryOpsMutating.test_ior_with_mutation.<locals>.fr�r@rrr
�test_ior_with_mutation3r�z,TestBinaryOpsMutating.test_ior_with_mutationcCr�)NcSs||8}dSrrr�rrr
rr9r�z8TestBinaryOpsMutating.test_isub_with_mutation.<locals>.fr�r@rrr
�test_isub_with_mutation8r�z-TestBinaryOpsMutating.test_isub_with_mutationcCr�)NcSs||N}dSrrr�rrr
rr>r�z8TestBinaryOpsMutating.test_ixor_with_mutation.<locals>.fr�r@rrr
�test_ixor_with_mutation=r�z-TestBinaryOpsMutating.test_ixor_with_mutationcCs:dd�}dd�}dd�}|�|�|�|�|�|�dS)NcSs|D]}q|D]}qdSrr�r=rjr`rrrr
�f1C�
�z>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f1cSs|D]}q|D]}qdSrr)r=rjrr`rrr
�f2Hr�z>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f2cSst||�D]\}}qdSr)�zipr�rrr
�f3Ms�z>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f3r�)rr�r�r�rrr
�test_iteration_with_mutationBs

z2TestBinaryOpsMutating.test_iteration_with_mutationN)r	r
rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
r�s r�c@�eZdZeZeZdS)�TestBinaryOpsMutating_Set_SetN�r	r
rr@r�r�rrrr
r�Ur,r�c@r�)�'TestBinaryOpsMutating_Subclass_SubclassN�r	r
rr)r�r�rrrr
r�Yr,r�c@r*)�"TestBinaryOpsMutating_Set_SubclassN�r	r
rr@r�r)r�rrrr
r�]r,r�c@r*)�"TestBinaryOpsMutating_Subclass_SetN�r	r
rr)r�r@r�rrrr
r�ar,r�c@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�TestMethodsMutatingcC�|�tj�dSr)r�r@r�rrrr
�test_issubset_with_mutationhr�z/TestMethodsMutating.test_issubset_with_mutationcCr�r)r�r@r�rrrr
�test_issuperset_with_mutationkr�z1TestMethodsMutating.test_issuperset_with_mutationcCr�r)r�r@rkrrrr
�test_intersection_with_mutationnr�z3TestMethodsMutating.test_intersection_with_mutationcCr�r)r�r@rXrrrr
�test_union_with_mutationqr�z,TestMethodsMutating.test_union_with_mutationcCr�r)r�r@rxrrrr
�test_difference_with_mutationtr�z1TestMethodsMutating.test_difference_with_mutationcCr�r)r�r@r}rrrr
�'test_symmetric_difference_with_mutationwr�z;TestMethodsMutating.test_symmetric_difference_with_mutationcCr�r)r�r@rtrrrr
�test_isdisjoint_with_mutationzr�z1TestMethodsMutating.test_isdisjoint_with_mutationcCr�r)r�r@rrrrr
�$test_difference_update_with_mutation}r�z8TestMethodsMutating.test_difference_update_with_mutationcCr�r)r�r@rrrrr
�&test_intersection_update_with_mutation�r�z:TestMethodsMutating.test_intersection_update_with_mutationcCr�r)r�r@r�rrrr
�.test_symmetric_difference_update_with_mutation�r�zBTestMethodsMutating.test_symmetric_difference_update_with_mutationcCr�r)r�r@rrrrr
�test_update_with_mutation�r�z-TestMethodsMutating.test_update_with_mutationN)r	r
rr�r�r�r�r�r�r�r�r�r�r�rrrr
r�fsr�c@r�)�TestMethodsMutating_Set_SetNr�rrrr
r��r,r�c@r�)�%TestMethodsMutating_Subclass_SubclassNr�rrrr
r��r,r�c@r*)� TestMethodsMutating_Set_SubclassNr�rrrr
r��r,r�c@r*)� TestMethodsMutating_Subclass_SetNr�rrrr
r��r,r�c@seZdZeZejZdS)�TestMethodsMutating_Set_DictN)r	r
rr@r�r7r8r�rrrr
r��s
r�c@r*)�TestMethodsMutating_Set_ListN)r	r
rr@r�r\r�rrrr
r��r,r�ccsZ�t|�}ztt|�g�}t|�D]
}|V||BVqWdSty,t�VYdSw)z-Generates all subsets of a set or sequence U.N)r�rKr�rKr�)�Ur`r�rrr
rK�s���rKcs0dd�t|�D��t�fdd�tt|��D��S)z!Graph of n-dimensional hypercube.cSsg|]}t|g��qSr�rK)r�r`rrr
r6�szcube.<locals>.<listcomp>cs&g|]��t�fdd��D��f�qS)csg|]}�|A�qSrr)r�r6r�rr
r6�r7z#cube.<locals>.<listcomp>.<listcomp>r�)r��Z
singletonsr�r
r6�s�)r�r7rKr5rr�r
�cube�s
�r�cshi}|D]-�|�D]&���fdd�|�D�}��fdd�|�D�}t||�|t��g�<q
q|S)z�Graph, the vertices of which are edges of G,
    with two vertices being adjacent iff the corresponding
    edges share a vertex.cs g|]}|�krt�|g��qSrr��r�rn�r`rrr
r6�� zlinegraph.<locals>.<listcomp>cs g|]}|�krt�|g��qSrr�r�r�rr
r6�r�r�)rlr�Znx�nyrr�r
�	linegraph�s�r�c
Cs�t�}|��D]f\}}|D]_}||D]X}||krq|||vr+|�t|||g��q||D];}||kr6q/|||vrH|�t||||g��q/||D]}||ksV||krWqL|||vri|�t|||||g��qLq/qq
q|S)zKReturn a set of faces in G.  Where a face is a set of vertices on that face)r@�itemsr�rK)rlrrr��edgesr�Zv3Zv4Zv5rrr
�faces�s0�����r�c@r)�
TestGraphscCs�td�}t|�}|�t|�d�|��D]
}|�t|�d�qtdd�|��D��}|�||�t|�}|�t|�d�|D]
}|�t|�d�q>dS)Nr�r�cs��|]
}|D]}|VqqdSrr)r�r�r�rrr
r����z'TestGraphs.test_cube.<locals>.<genexpr>r�r�)r�r@rDrHr_r�)rr�Z	vertices1�edgeZ	vertices2Z	cubefaces�facerrr
�	test_cube�s�zTestGraphs.test_cubecCs�td�}t|�}|�t|�d�t|�}|��D]
}|�t|�d�qtdd�|��D��}|�||�t|�}t�t	�}|D]}|t|�d7<q?|�|dd�|�|dd�|D]}	|	}
|�t|
�d	�|
D]}|�
||�qlq^dS)
Nr��r�csr�rr)r�r�r�rrr
r��r�z0TestGraphs.test_cuboctahedron.<locals>.<genexpr>rr�r�r;)r�r�rDrHr@r_r�r��defaultdictr/rL)rr�Z
cuboctahedronZverticesr�Z
otherverticesZ	cubofacesZ	facesizesr�Zvertexr�Zcubevertrrr
�test_cuboctahedron�s*
��zTestGraphs.test_cuboctahedronN)r	r
rr�rrrrr
r��sr��__main__)jr(�testrZtest.supportrr�r�r�r�r��randomrrr�r��collections.abcrI�	Exceptionrrrr"r/r)r1ZTestCaser�r@r)r+r-r0r2rKrQrRrnrVr�r�r�r�r�r�r�r�r�r�r�r�r�r�rr'r*r+r-r.r/rLrQrRrSrTrUrWr\r]r_r`rbrcrkrlrpr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rKr�r�r�r�r	�mainrrrr
�<module>s�<Ij


IVJ&t+
	
	)	)$G$
1�