Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_set.cpython-312.opt-1.pyc

�

'Μg<���
�ddlZddlmZddlmZddlZddlZddlZddlZddl	Z	ddl
mZmZddl
Z
ddlZddlZddlZGd�de�Zd�ZGd�d	�ZGd
�d�ZGd�d
e�ZGd�d�ZGd�deej2�ZGd�de�ZGd�de�ZGd�deej2�ZGd�de�Z Gd�de�Z!Gd�de�Z"Gd�dej2�Z#Gd �d!e�Z$Gd"�d#e#�Z%e�Z&Gd$�d%�Z'Gd&�d'e'ej2�Z(Gd(�d)e'ej2�Z)Gd*�d+e'ej2�Z*Gd,�d-e'ej2�Z+Gd.�d/e'ej2�Z,Gd0�d1e'ej2�Z-Gd2�d3e'ej2�Z.d4�Z/d5�Z0Gd6�d7ej2�Z1Gd8�d9ej2�Z2Gd:�d;ej2�Z3Gd<�d=ej2�Z4Gd>�d?ej2�Z5Gd@�dA�Z6GdB�dCe6ej2�Z7GdD�dEe6ej2�Z8GdF�dGe6ej2�Z9GdH�dIe6ej2�Z:GdJ�dKe6ej2�Z;GdL�dM�Z<GdN�dOe<ej2�Z=GdP�dQe<ej2�Z>GdR�dSe<ej2�Z?GdT�dUe<ej2�Z@GdV�dWe<ej2�ZAGdX�dYe<ej2�ZBGdZ�d[�ZCGd\�d]eCej2�ZDGd^�d_eCej2�ZEGd`�daeCej2�ZFGdb�dceCej2�ZGGdd�deeCej2�ZHGdf�dgej2�ZIdh�ZJGdi�dj�ZKGdk�dl�ZLGdm�dn�ZMGdo�dp�ZNGdq�dr�ZOGds�dt�ZPGdu�dv�ZQddwlmRZRdx�ZSGdy�dzej2�ZTGd{�d|�ZUGd}�d~�ZVGd�d�ej2�ZWGd��d��ZXGd��d�eX�ZYGd��d�eYej2�ZZGd��d�eYej2�Z[Gd��d�eYej2�Z\Gd��d�eYej2�Z]Gd��d�eX�Z^Gd��d�e^ej2�Z_Gd��d�e^ej2�Z`Gd��d�e^ej2�ZaGd��d�e^ej2�ZbGd��d�e^ej2�ZcGd��d�e^ej2�Zdd��Zed��Zfd��Zgd��ZhGd��d�ej2�Ziejd�k(rej��yy)��N)�support)�warnings_helper)�	randrange�shufflec��eZdZy)�PassThruN��__name__�
__module__�__qualname__���*/usr/local/lib/python3.12/test/test_set.pyrr���rrc#�K�t��w�N)rr
rr�check_pass_thrurs����
�N���	c��eZdZd�Zd�Zy)�BadCmpc��y�N�r
��selfs r�__hash__zBadCmp.__hash__���rc��t�r)�RuntimeError�r�others  r�__eq__z
BadCmp.__eq__s���rN�r
rrrr"r
rrrrs���rrc��eZdZdZd�Zy)�ReprWrapperz*Used to test self-referential repr() callsc�,�t|j�Sr)�repr�valuers r�__repr__zReprWrapper.__repr__s���D�J�J��rN)r
rr�__doc__r)r
rrr%r%s
��0� rr%c��eZdZdZd�Zd�Zy)�HashCountingIntzBint-like object that counts the number of times __hash__ is calledc��d|_y�Nr��
hash_count)r�argss  r�__init__zHashCountingInt.__init__#s	����rc�V�|xjdz
c_tj|�Sr)r0�intrrs rrzHashCountingInt.__hash__%s�����1����|�|�D�!�!rN)r
rrr*r2rr
rrr,r,!s��H��"rr,c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�TestJointOpsc��dx|_}d|_d|_|j|�|_t
j
|�|_y)N�
simsalabim�
madagascar�4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ)�word�	otherword�letters�thetype�s�dict�fromkeys�d)rr;s  r�setUpzTestJointOps.setUp,s<��'�'��	�D�%���M������d�#������t�$��rc��|jt|jgd�|jtt�jd��y)N�r��a)�assertRaises�	TypeErrorr>�setr2rs r�test_new_or_initzTestJointOps.test_new_or_init3s5�����)�T�\�\�2�q�9����)�S�U�^�^�q��9rc��t|j�}t|j�}|j||�|j	t
|jt��|j	t|jgg�yr)	�sortedr?rB�assertEqualrHrr>rrI)r�actual�expecteds   r�test_uniquificationz TestJointOps.test_uniquification7s]���������$�&�&�>�������*����(�D�L�L�/�2C�D����)�T�\�\�B�4�8rc�t�|jt|j�t|j��yr)rN�lenr?rBrs r�test_lenzTestJointOps.test_len>s"������T�V�V��c�$�&�&�k�2rc�r�|jD],}|j||jv||jv��.|j	t
|jjgg�|jt|j�g�}|j|j|j�|�yr)
r=rNr?rBrHrI�__contains__r>�	frozenset�assertIn)r�cr?s   r�
test_containszTestJointOps.test_containsAs������A����Q�$�&�&�[�!�t�v�v�+�6�����)�T�V�V�%8�%8�2�$�?��L�L�)�D�L�L�1�2�3���
�
�d�l�l�4�<�<�0�!�4rc	���|jj|j�}|jD]2}|j	||v||j
vxs||jv��4|j	|j|j
|j��|j	t|�|j�|jt|jjt��|jt|jjgg�ttt j"t$t&t(fD�]E}|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td	��|j	|j
d�j|d�|d
��td����H|j
�}|j	|jtdg�|tdg��|j
ddg��y)
N�abcba�cdc�abcd�efgfe�abcefg�ccb�abc�ef�abcef�fgrrE)r?�unionr<r=rNrBr>r;�type�basetyperHrrrIrJrWr@rA�str�list�tuple)r�urY�C�xs     r�
test_unionzTestJointOps.test_unionHs���F�F�L�L����(�����A����Q�!�V�Q�$�&�&�[�%G�A����4G�H�����������d�i�i�!8�9�����a��$�-�-�0����(�D�F�F�L�L�/�2C�D����)�T�V�V�\�\�B�4�8��i�����T�5�@�A����T�\�\�'�2�8�8��5��B�C��K�P����T�\�\�'�2�8�8��7��D�c�(�m�T����T�\�\�'�2�8�8��5��B�C��J�O����T�\�\�'�2�8�8��4��A�3�w�<�P����T�\�\�'�2�8�8��4��!�D�'�J�C�PX�M�Z�A�
�L�L�N���������a�S��1�c�1�#�h�7����q�!�f�9M�Nrc��|jj|j�}|j|jt	|j�z|�|j|jt|j�z|�	|j|jz|j
d�y#t$rYywxYw)Nz(s|t did not screen-out general iterables)r?rfr<rNrJrW�failrI�r�is  r�test_orzTestJointOps.test_or[s����F�F�L�L����(��������#�d�n�n�"5�5�q�9�������)�D�N�N�";�;�Q�?�	B��F�F�T�^�^�#�
�I�I�@�A���	��	���B6�6	C�Cc	���|jj|j�}|jD]2}|j	||v||j
vxr||jv��4|j	|j|j
|j��|j	t|�|j�|jt|jjt��tttj t"t$t&fD�]E}|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d	�|d
��td����H|j
d�}|j�}|jt�k(r%|j	t)|�t)|��y|j+t)|�t)|��y)Nr\r]�ccr_�ra�bcrc�cbcf�bag�b)r?�intersectionr<r=rNrBr>r;rgrhrHrrrJrWr@rArirjrk�id�assertNotEqual)rrsrYrmr?�zs      r�test_intersectionzTestJointOps.test_intersectionfs���F�F������/�����A����Q�!�V�Q�$�&�&�[�%H�Q�$�.�.�5H�I�����������d�i�i�!8�9�����a��$�-�-�0����(�D�F�F�$7�$7��9J�K��i�����T�5�@�A����T�\�\�'�2�?�?��%��I�3�t�9�U����T�\�\�'�2�?�?��'�
�K�S�QS�W�U����T�\�\�'�2�?�?��%��I�3�t�9�U����T�\�\�'�2�?�?��$��H�#�b�'�R����T�\�\�'�2�?�?��&�	�1�U�8�T�VY�Z]�V^�_�A�
�L�L��!��
�N�N����<�<�9�;�&����R��U�B�q�E�*�����1��r�!�u�-rc�@�d�}dD]�}|j|�}dD]~}tttjt
ttfD]O}||�}|j|�}|||�}|j||�|j|duxs|du��Q����y)Nc�8�t|�j|�S)z&Pure python equivalent of isdisjoint())rJr})�s1�s2s  r�fz'TestJointOps.test_isdisjoint.<locals>.f{s���2�w�+�+�B�/�/�/r)
rxrG�abrb�ababacr]rwr_rarcTF)r>rJrWr@rArirjrk�
isdisjointrN�
assertTrue)	rr��largr��rargrmr�rOrPs	         r�test_isdisjointzTestJointOps.test_isdisjointzs���	0�V�D����d�#�B�Y���i�����T�5�H�A��4��B��]�]�2�.�F� ��R�y�H��$�$�V�X�6��O�O�F�d�N�$E�f��o�F�I�Z�Vrc��|jj|j�}|j|jt	|j�z|�|j|jt|j�z|�	|j|jz|j
d�y#t$rYywxYw)Nz(s&t did not screen-out general iterables)r?r}r<rNrJrWrqrIrrs  r�test_andzTestJointOps.test_and�s����F�F������/��������#�d�n�n�"5�5�q�9�������)�D�N�N�";�;�Q�?�	B��F�F�T�^�^�#�
�I�I�@�A���	��	�ruc	��|jj|j�}|jD]2}|j	||v||j
vxr||jv��4|j	|j|j
|j��|j	t|�|j�|jt|jjt��|jt|jjgg�ttt j"t$t&t(fD�]}}|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j�td��|j	|j
d�j|d�|d	��td
�����y)Nr\r]r�r_rbrarGrcr|rY)r?�
differencer<r=rNrBr>r;rgrhrHrrrIrJrWr@rArirjrk�rrsrYrms    r�test_differencezTestJointOps.test_difference�s����F�F���d�n�n�-�����A����Q�!�V�Q�$�&�&�[�%L�Q�d�n�n�5L�M�����������d�i�i�!8�9�����a��$�-�-�0����(�D�F�F�$5�$5��7H�I����)�T�V�V�%6�%6���=��i�����T�5�@�A����T�\�\�'�2�=�=�a��h�G��T��S����T�\�\�'�2�=�=�a��j�I�3�u�:�V����T�\�\�'�2�=�=�a��h�G��S��R����T�\�\�'�2�=�=�a��g�F��E�
�S����T�\�\�'�2�=�=�?��U��L����T�\�\�'�2�=�=�a��f�a��f�M�s�SV�x�X�
Arc��|jj|j�}|j|jt	|j�z
|�|j|jt|j�z
|�	|j|jz
|j
d�y#t$rYywxYw)Nz(s-t did not screen-out general iterables)r?r�r<rNrJrWrqrIrrs  r�test_subzTestJointOps.test_sub�s����F�F���d�n�n�-��������#�d�n�n�"5�5�q�9�������)�D�N�N�";�;�Q�?�	B��F�F�T�^�^�#�
�I�I�@�A���	��	�ruc��|jj|j�}|jD]1}|j	||v||j
v||jvz��3|j	|j|j
|j��|j	t|�|j�|jt|jjt��|jt|jjgg�ttt j"t$t&t(fD]�}|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td��|j	|j
d�j|d��td	����y)
Nr\r]�abdr_r`rarGrcrd)r?�symmetric_differencer<r=rNrBr>r;rgrhrHrrrIrJrWr@rArirjrkr�s    r�test_symmetric_differencez&TestJointOps.test_symmetric_difference�s����F�F�'�'����7�����A����Q�!�V�a�4�6�6�k�a�4�>�>�6I�%J�K�����������d�i�i�!8�9�����a��$�-�-�0����(�D�F�F�$?�$?��AR�S����)�T�V�V�%@�%@�2�$�G��i�����T�5�@�A����T�\�\�'�2�G�G��%��Q�SV�W\�S]�^����T�\�\�'�2�G�G��'�
�S�UX�Ya�Ub�c����T�\�\�'�2�G�G��%��Q�SV�WZ�S[�\����T�\�\�'�2�G�G��$��P�RU�V]�R^�_�	Arc��|jj|j�}|j|jt	|j�z|�|j|jt|j�z|�	|j|jz|j
d�y#t$rYywxYw)Nz(s^t did not screen-out general iterables)r?r�r<rNrJrWrqrIrrs  r�test_xorzTestJointOps.test_xor�s����F�F�'�'����7��������#�d�n�n�"5�5�q�9�������)�D�N�N�";�;�Q�?�	B��F�F�T�^�^�#�
�I�I�@�A���	��	�ruc� �|j|jt|j��|j|jt	|j��|j|j|jk(d�|j|jt|j��|j|jt	|j��|j|j|jk7d�y�NFT)rNr?rJr;rWrr<rs r�
test_equalityzTestJointOps.test_equality�s����������T�Y�Y��0��������4�9�9�!5�6�������4�9�9�,�e�4����D�F�F�C����$7�8����D�F�F�I�d�n�n�$=�>�������4�9�9�,�d�3rc��ttgd��}|j|�}|jt	|�d�y)N)�abcdef�bcd�bdcb�fed�fedccba�)�maprWr>rNrS)r�tr?s   r�test_setOfFrozensetsz!TestJointOps.test_setOfFrozensets�s0���	�F�G���L�L��O������Q���#rc���t|jgd��\}}}|j||k�|j||k�|j||k�|j||kD�|j||k\�|j||k�|j||k�|j||kD�|j||k\�|jt	d�jd��|jt	d�j
d��|jt	d�jd��|jt	d�j
d��y)N)r��abcde�defrGrb�cbs)r�r>r��assertFalserJ�issubset�
issuperset)r�p�q�rs    r�test_sub_and_superzTestJointOps.test_sub_and_super�s!���d�l�l�$:�;���1�a�����A�������Q�������Q�������A�������Q�������Q�������a�� �����Q�������a�� �����C��)�)�%�0�1�����E�
�-�-�c�2�3�����S��*�*�5�1�2�����U��.�.�s�3�4rc��ttjdz�D�]h}t|j�t
tfvr$dg|j_dg|j_tj|j|�}tj|�}|j|j||j�d|���t|j�t
tfvs��|j|jj|j�|j|jj|j�|jt|jd��|j`|j`��ky)Nrrnr�� != �y)�range�pickle�HIGHEST_PROTOCOLrgr?rJrWrnr��dumps�loadsrNr��hasattr)rrsr��dups    r�
test_picklingzTestJointOps.test_pickling�s���v�.�.��2�3�A��D�F�F�|�C��#3�3��5������5��������T�V�V�Q�'�A��,�,�q�/�C����T�V�V�S�����*D�E��D�F�F�|�C��#3�3�� � ������3�5�5�1�� � ������3�5�5�1�� � ������!5�6��F�F�H�d�f�f�h�4rc��ttjdz�D�])}t|j�}|j|j�}tj||�}tj|�}|j|tjj�|j|j|�|�tj|�}	t|�}tj||�}tj|�}|j|j|�||j|f�z
���,y#t$rY��:wxYwr)r�r�r��iterr?r>r�r��assertIsInstance�collectionsrb�IteratorrN�next�
StopIteration)r�proto�itorg�datarB�it�drops       r�test_iterator_picklingz#TestJointOps.test_iterator_pickling�s���6�2�2�Q�6�7�E�����L�E��<�<����'�D����U�E�*�A����a��B�
�!�!�"�k�o�o�&>�&>�?����T�\�\�"�-�t�4����a��B�
��B�x�����R��'�A����a��B����T�\�\�"�-�t�d�l�l�D�7�6K�/K�L�%8��!�
��
�s�E�	E�Ec�p��G�fd�d���d�}|j|g�}tj|�}|jt	|�t	|��|D]}|}�|jt	|�t	��|j|jdz|j�y)Nc�&��eZdZd�Zd�Zd�fd�	Zy)�*TestJointOps.test_deepcopy.<locals>.Tracerc��||_yr�r()rr(s  rr2z3TestJointOps.test_deepcopy.<locals>.Tracer.__init__	s	��"��
rc��|jSrr�rs rrz3TestJointOps.test_deepcopy.<locals>.Tracer.__hash__s���z�z�!rNc�.���|jdz�Srr�)r�memo�Tracers  �r�__deepcopy__z7TestJointOps.test_deepcopy.<locals>.Tracer.__deepcopy__
s����d�j�j�1�n�-�-rr)r
rrr2rr�)r�s�rr�r�s���
#�
"�
.rr��
r)r>�copy�deepcopyrr~rNr()rr�r?r��elem�newtr�s      @r�
test_deepcopyzTestJointOps.test_deepcopys����	.�	.�
�2�J���L�L�!�����m�m�A������B�q�E�2�c�7�+��D��D�����B�q�E�2�d�8�,�������1��d�j�j�1rc���Gd�d��t�fd�td�D��}|D]!}||_||_t|g�|_�#y)Nc��eZdZy)�TestJointOps.test_gc.<locals>.ANr	r
rr�Ar����rr�c3�,�K�|]}�����
y�wrr
)�.0rsr�s  �r�	<genexpr>z'TestJointOps.test_gc.<locals>.<genexpr>s�����)�[����[�����)rJr��cycle�sub)rr?r�r�s   @r�test_gczTestJointOps.test_gcsF���	�	��)�U�4�[�)�)���D��D�J��D�H��D�6�{�D�H�rc��Gd�d|j�}|�}t�}|j|�|j||�|j	|�|j|�|j|�y)Nc��eZdZd�Zy)�6TestJointOps.test_subclass_with_custom_hash.<locals>.Hc�0�tt|�dz�S)Ni���)r4r~rs rrz?TestJointOps.test_subclass_with_custom_hash.<locals>.H.__hash__%s���2�d�8�j�0�1�1rN)r
rrrr
rr�Hr�$s��
2rr�)r>rJ�addrX�remove�discard)rr�r?r�s    r�test_subclass_with_custom_hashz+TestJointOps.test_subclass_with_custom_hash"s\��	2����	2��#��

�%��	���a���
�
�a���	�����	���a��	�	�	�!�rc��|jt�g�}|jt|jt�t�g�|jt|jt��t|d�r||jt|jt��|jt|jt��|jt|jt��yy)Nr�)	r>rrHrrVr�r�r�r��rr?s  r�test_badcmpzTestJointOps.test_badcmp/s����L�L�&�(��$�����,����v�x���6J�K����,������A��1�e�����l�A�E�E�6�8�<����l�A�I�I�v�x�@����l�A�H�H�f�h�?�rc�$�t�}|j|g�}||_|jtk(r|j	t|�d�yt|�j
d�d}|j	t|�|�d|�d��y)Nz
{set(...)}�(rz({z(...)}))r%r>r(rJrNr'�	partition)r�wr?�names    r�test_cyclical_reprzTestJointOps.test_cyclical_repr:sr���M���L�L�!��������<�<�3�����T�!�W�l�3���7�$�$�S�)�!�,�D����T�!�W��t�&D�Erc��d}tjttt	|���}|jt
d�|D��|�|j|�}|jt
d�|D��|�|j|�|jt
d�|D��|�t|d�r|j|�|jt
d�|D��|�tjt|��}|jt
d�|D��|�tjt|��}|jt
d�|D��|�tjt|�d	�}|jt
d
�|D��|�|j|tj|d	��y)Nr�c3�4K�|]}|j���y�wrr/�r�r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>G�����;���T�_�_����c3�4K�|]}|j���y�wrr/r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>Ir�r�c3�4K�|]}|j���y�wrr/r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>Kr�r��symmetric_difference_updatec3�4K�|]}|j���y�wrr/r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>Nr�r�c3�4K�|]}|j���y�wrr/r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>Pr�r�c3�4K�|]}|j���y�wrr/r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>Rr�r��{c3�4K�|]}|j���y�wrr/r�s  rr�z<TestJointOps.test_do_not_rehash_dict_keys.<locals>.<genexpr>Tr�r�)
r@rAr�r,r�rN�sumr>r�r�rrJrW)r�nrBr?�d2�d3s      r�test_do_not_rehash_dict_keysz)TestJointOps.test_do_not_rehash_dict_keysDsa�����M�M�#�o�u�Q�x�8�9������;��;�;�Q�?��L�L��O������;��;�;�Q�?�	���Q������;��;�;�Q�?��1�3�4�
�)�)�!�,�����;��;�;�Q�?�
�]�]�3�q�6�
"������;��;�;�Q�?�
�]�]�9�Q�<�
(������;��;�;�Q�?�
�]�]�9�Q�<��
-������;��;�;�Q�?�����T�]�]�1�c�2�3rc���Gd�dt�}|�}tj|�}t|dg�}t	|�|_~~t
j�|j|�dud�y)Nc��eZdZy)�/TestJointOps.test_container_iterator.<locals>.CNr	r
rrrmrYr�rrmrzCycle was not collected)	�object�weakref�refrJr�rn�gc�collectr�)rrm�objr�	containers     r�test_container_iteratorz$TestJointOps.test_container_iteratorWs^��	��	��c���k�k�#�����a��M�	��Y������
�
�
��������
�'@�Arc�N�tj|t|j�yr)r�check_free_after_iteratingr�r>rs r�test_free_after_iteratingz&TestJointOps.test_free_after_iteratingcs���*�*�4��t�|�|�DrN)r
rrrCrKrQrTrZrortr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr
rrr6r6)s���%�:�9�3�5�O�&	B�.�(G�	B�Y� 	B�`�	B�4�$�
5� '�M�*2�"#��	@�F�4�&
B�Err6c���eZdZeZeZd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zej@e!ed�d�d��Z"y)�TestSetc��|j�}|j|j�|j|t	|j��|j|j
�|j|t	|j
��|j
t|j|d�|j
t|jd�y)NrEr)r>r2r;rNrJr<rHrIr�s  r�	test_initzTestSet.test_initjs����L�L�N��	�
�
�4�9�9������C��	�	�N�+�	�
�
�4�>�>�"�����C����/�0����)�Q�Z�Z��A�6����)�Q�Z�Z��3rc��|jtd��}|j|�}|jt|�t|��y�Nr��r>r�rr~�rr?r�s   r�test_constructor_identityz!TestSet.test_constructor_identitys�9���L�L��q��"���L�L��O�����B�q�E�2�a�5�)rc�J�tgd��}hd�}|j||�y)N�rrEr��rrEr��rJrNr"s   r�test_set_literalzTestSet.test_set_literalxs ����L��������A�rc��hd�}|jt|�d�|j�}|jt|�t�y)N>rr)rNrS�poprgr4)rr?�stored_values   r� test_set_literal_insertion_orderz(TestSet.test_set_literal_insertion_order}s;��������Q���#��u�u�w������l�+�S�1rc�j��g��fd�}|d�|d�|d�h}|j�gd��y)Nc�(���j|�yr)�append)r�eventss �r�recordz9TestSet.test_set_literal_evaluation_order.<locals>.record�s����M�M�#�rrrEr�r&)rN)rr2r?r1s   @r�!test_set_literal_evaluation_orderz)TestSet.test_set_literal_evaluation_order�s5�����	�
�A�Y��q�	�6�!�9�-�������+rc�N�|jtt|j�yr)rHrI�hashr?rs r�	test_hashzTestSet.test_hash�s�����)�T�4�6�6�2rc���|jj�|j|jt��|jt	|j�d�yr.)r?�clearrNrJrSrs r�
test_clearzTestSet.test_clear�s=����������������'�����T�V�V��a�(rc��|jj�}|j|j|�|jt	|j�t	|��|jt|�|j�yr)r?r�rNrr~rgrh�rr�s  r�	test_copyzTestSet.test_copy�sY���f�f�k�k�m���������%����B�t�v�v�J��3��0�����c��D�M�M�2rc�j�|jjd�|jd|j�|jj�}|jjd�|j	|j|�|jt|jjg�y)N�Q)r?r�rXr�rNrHrIr;s  r�test_addzTestSet.test_add�so�����
�
�3���
�
�c�4�6�6�"��f�f�k�k�m�����
�
�3���������%����)�T�V�V�Z�Z��4rc���|jjd�|jd|j�|jt|jjd�|jt
|jjg�|j
t|j�g�}|j|j
|j�|�|j|j
|j��|j|j
|j�|�|jt|jj|j
|j��y�NrGr>)
r?r��assertNotInrH�KeyErrorrIr>rWr;rXr�s  r�test_removezTestSet.test_remove�s������
�
�c������d�f�f�%����(�D�F�F�M�M�3�7����)�T�V�V�]�]�B�7��L�L�)�D�I�I�.�/�0���
�
�d�l�l�4�9�9�-�q�1�	������d�i�i�(�)�������d�i�i�0�!�4����(�D�F�F�M�M�4�<�<��	�	�3J�Krc���dD].}	|jj|�|j��0y#t$r+}|jd}|j||�Yd}~�ad}~wwxYw)N)r>)rr)r?r�rqrCr1rN)r�v1�e�v2s    r�test_remove_keyerror_unpackingz&TestSet.test_remove_keyerror_unpacking�s^���B�
����
�
�b�!�
�	�	�����
)��V�V�A�Y��� � ��R�(�(��
)�s�5�	A)�!A$�$A)c	�*�|jddg�}	|jj|�|j�y#t$rH}|j|jd|udj||jd��Yd}~yd}~wwxYw)Nr��rzKeyError should be {0}, not {1})r>r?r�rqrCr�r1�format)r�keyrGs   r�test_remove_keyerror_setz TestSet.test_remove_keyerror_set�s����l�l�A�q�6�"��	��F�F�M�M�#��
�I�I�K���	N��O�O�A�F�F�1�I��,�:�A�A�#�BC�&�&��)�M�
N�
N��	N�s�A�	B�
>B
�
Bc��|jjd�|jd|j�|jjd�|jt|jjg�|jt
|j�g�}|j|j|j�|�|j|j|j��|j|j|j�|�|j|j|j��yrA)	r?r�rBrHrIr>rWr;rXr�s  r�test_discardzTestSet.test_discard�s��������s������d�f�f�%������s�����)�T�V�V�^�^�R�8��L�L�)�D�I�I�.�/�0���
�
�d�l�l�4�9�9�-�q�1�	�	�	�$�,�,�t�y�y�)�*�������d�i�i�0�!�4�	�	�	�$�,�,�t�y�y�)�*rc�
�tt|j��D]8}|jj�}|j	||j��:|jt|jj�yr)r�rSr?r+rBrHrC)rrsr�s   r�test_popzTestSet.test_pop�sV���s�4�6�6�{�#�A��6�6�:�:�<�D����T�4�6�6�*�$�	
���(�D�F�F�J�J�/rc
��|jj|j�}|j|d�|j|jzD]}|j||j�� |j
t|jjt��|j
t|jjgg�dD]�\}}tttjttt fD]U}|j#d�}|j|j||��d�|j|t|���W��dD]�}d}tttjttt fD]t}|j#d�}|j|j||�||��d�|j|t|�t|�zt|�z��v��y)N))r]r^�r_r`)rarb�rcrdr\)r]r_rarc�abcda�ahi)r?�updater<rNr;rXrHrrrIrJrWr@rArirjrkr>�r�retvalrYr�r�rmr?s       r�test_updatezTestSet.test_update�sv�������t�~�~�.�������&��)�)�d�n�n�,�A��M�M�!�T�V�V�$�-����(�D�F�F�M�M�?�3D�E����)�T�V�V�]�]�R�D�9�[�D�A�q��)�T�]�]�C��u�D���L�L��)��� � ����!�A�$���6�� � ��C��F�+�E�\�
8�A��A��)�T�]�]�C��u�D���L�L��)��� � ����!�A�$��!��!5�t�<�� � ��C��F�S��V�O�c�!�f�$<�=�E�8rc���|xjt|j�zc_|j|jzD]}|j	||j�� yr)r?rJr<r;rX�rrYs  r�test_iorzTestSet.test_ior�sB�����#�d�n�n�%�%���)�)�d�n�n�,�A��M�M�!�T�V�V�$�-rc
��|jj|j�}|j|d�|j|jzD]W}||jvr+||jvr|j||j��<|j
||j��Y|jt|jjt��|jt|jjgg�dD]�\}}tttjtt t"fD]�}|j%d�}|j|j||��d�|j|t|��d}|j%|�}d}|j|j||�||��d�|j|td�t|�zt|�z�����y)N))r]rY)r_rx)rary)rcrxr\�cbc)r?�intersection_updater<rNr;rXrBrHrrrIrJrWr@rArirjrkr>)	rrZrYr�r�rmr?�ssr�s	         r�test_intersection_updatez TestSet.test_intersection_update�s������+�+�D�N�N�;�������&��)�)�d�n�n�,�A��D�N�N�"�q�D�I�I�~��
�
�a����(�� � ��D�F�F�+�	-�
	
���(�D�F�F�$>�$>��@Q�R����)�T�V�V�%?�%?�"��F�L�D�A�q��)�T�]�]�C��u�D���L�L��)��� � ��!6�!6�q��t�!<�d�C�� � ��C��F�+����L�L��$����� � ��!6�!6�q��t�Q�q�T�!B�D�I�� � ��C��L��Q��$7��A��$>�?�E�Mrc�:�|xjt|j�zc_|j|jzD]W}||jvr+||jvr|j	||j��<|j||j��Yyr�r?rJr<r;rXrBr]s  r�	test_iandzTestSet.test_iandsl�����#�d�n�n�%�%���)�)�d�n�n�,�A��D�N�N�"�q�D�I�I�~��
�
�a����(�� � ��D�F�F�+�	-rc	�D�|jj|j�}|j|d�|j|jzD]W}||jvr+||jvr|j||j��<|j
||j��Y|jt|jjt��|jt|jjgg�|jt|jjgg�dD�]e\}}tttjt t"t$fD�]1}|j'd�}|j|j||��d�|j|t|��|j'd�}|j�|j||j'd��|j'd�}|j|d��|j||j'd��|j'd�}|j|d�|d��|j||j'd����4��hy)N))r]r�)r_rb�rarG)rcrbr\�
abcdefghih�aba�cdefghihr]�efghih)r?�difference_updater<rNr;rXrBrHrrrIrrJrWr@rArirjrkr>rYs       r�test_difference_updatezTestSet.test_difference_update	s������)�)�$�.�.�9�������&��)�)�d�n�n�,�A��D�I�I�~�!�4�>�>�"9��
�
�a����(�� � ��D�F�F�+�	-�
	
���(�D�F�F�$<�$<�o�>O�P����)�T�V�V�%=�%=��t�D����)�T�V�V�%G�%G�"��N�R�D�A�q��)�T�]�]�C��u�D���L�L��)��� � ��!4�!4�Q�q�T�!:�D�A�� � ��C��F�+��L�L��.���#�#�%�� � ��D�L�L��$>�?��L�L��.���#�#�A�e�H�-�� � ��D�L�L��$<�=��L�L��.���#�#�A�e�H�a��h�7�� � ��D�L�L��$:�;�E�Src�:�|xjt|j�zc_|j|jzD]W}||jvr+||jvr|j	||j��<|j||j��Yyrrer]s  r�	test_isubzTestSet.test_isub&sl�����#�d�n�n�%�%���)�)�d�n�n�,�A��D�I�I�~�!�4�>�>�"9��
�
�a����(�� � ��D�F�F�+�	-rc	�0�|jj|j�}|j|d�|j|jzD]X}||jv||jvzr|j||j��=|j
||j��Z|jt|jjt��|jt|jjgg�dD]�\}}tttjtt t"fD]U}|j%d�}|j|j||��d�|j|t|���W��y)N))r]r�rTrhrUr\)r?rr<rNr;rXrBrHrrrIrJrWr@rArirjrkr>rYs       r� test_symmetric_difference_updatez(TestSet.test_symmetric_difference_update.s+�����3�3�D�N�N�C�������&��)�)�d�n�n�,�A��T�Y�Y��1����#6�7��
�
�a����(�� � ��D�F�F�+�	-�
	
���(�D�F�F�$F�$F��HY�Z����)�T�V�V�%G�%G�"��N�X�D�A�q��)�T�]�]�C��u�D���L�L��)��� � ��!>�!>�q��t�!D�d�K�� � ��C��F�+�E�Yrc�<�|xjt|j�zc_|j|jzD]X}||jv||jvzr|j	||j��=|j||j��Zyrrer]s  r�	test_ixorzTestSet.test_ixor>so�����#�d�n�n�%�%���)�)�d�n�n�,�A��T�Y�Y��1����#6�7��
�
�a����(�� � ��D�F�F�+�	-rc��|jj�}||z}|j||j�||z}|j||j�||z}|j||j��|jj�}||z}|j||j��yr)r?r�rNr>)rr�s  r�test_inplace_on_selfzTestSet.test_inplace_on_selfFs����F�F�K�K�M��	�Q�������D�F�F�#�	�Q�������D�F�F�#�	�Q�������D�L�L�N�+��F�F�K�K�M��	�Q�������D�L�L�N�+rc��|jd�}tj|�}|jt	|�t	|��d}tj�|jtt|�y)N�gallahad)	r>r�proxyrNrir�
gc_collectrH�ReferenceError)rr?r�s   r�test_weakrefzTestSet.test_weakrefRsY���L�L��$���M�M�!�������Q���Q��(����������.�#�q�1rc�X�Gd�d�}hd�}|�}||k|j|j�|�}||kD|j|j�|�}||k|j|j�|�}||k\|j|j�y)Nc�$�eZdZd�Zd�Zd�Zd�Zy)�5TestSet.test_rich_compare.<locals>.TestRichSetComparec��d|_y�NTF)�	gt_called�r�some_sets  r�__gt__z<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__gt__\���!%���rc��d|_yr�)�	lt_calledr�s  r�__lt__z<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__lt___r�rc��d|_yr�)�	ge_calledr�s  r�__ge__z<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__ge__br�rc��d|_yr�)�	le_calledr�s  r�__le__z<TestSet.test_rich_compare.<locals>.TestRichSetCompare.__le__er�rN)r
rrr�r�r�r�r
rr�TestRichSetComparer[s��
�
�
�
rr�r')r�r�r�r�r�)rr��myset�myobjs    r�test_rich_comparezTestSet.test_rich_compareZs���	�	�"��"�$��
��
�������(�"�$��
��
�������(�"�$��
���������(�"�$��
���������(r�
test_c_apiz*C API test only available in a debug buildc�T�|jt�j�d�y�NT)rNrJr�rs rr�zTestSet.test_c_api~s��	
�����)�)�+�T�2rN)#r
rrrJr>rhrr#r)r-r3r6r9r<r?rDrIrNrPrRr[r^rcrfrnrprrrtrvr|r��unittest�
skipUnlessr�r�r
rrrrfs����G��H�4�*�
�
2�,�3�)�
3�5�	L�	�	�	+�0�>�&%�
@�*,�<�:,�,� ,�
,�2�")�H�X�����l�3�E�G�3�G�3rrc��eZdZy)�SetSubclassNr	r
rrr�r��rrr�c��eZdZeZeZd�Zy)�TestSetSubclassc�0�Gd�dt�}|ddg�}|jt|�|�|jt|�ddh�|j	t
�5|d��ddd�Gd�dt�}|ddgd	�
�}|jt|�|�|jt|�ddh�|j|jd	�Gd�dt�}|ddg�}|jt|�|�|jt|�ddh�|j|j�|j	t
�5|ddgd	�
�ddd�y#1swY��xYw#1swYyxYw)
Nc��eZdZy)�;TestSetSubclass.test_keywords_in_subclass.<locals>.subclassNr	r
rr�subclassr��r�rr�rrEr
��sequencec� ��eZdZd�fd�	Z�xZS)�ETestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_initc�2��t�|�|�||_yr)�superr2�newarg)r�argr��	__class__s   �rr2zNTestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_init.__init__�s����� ��%�$��rr)r
rrr2�
__classcell__�r�s@r�subclass_with_initr��s
���
%�
%rr�r��r�c� ��eZdZd�fd�	Z�xZS)�DTestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_newc�6��t�|�||�}||_|Sr�r��__new__r���clsr�r�rr�s    �rr�zLTestSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_new.__new__������w��s�C�0��$����rr�r
rrr�r�r�s@r�subclass_with_newr���
���
�
rr�)rJ�assertIsrgrNrHrIr��assertIsNone�rr�rlr�r�s     r�test_keywords_in_subclassz)TestSetSubclass.test_keywords_in_subclass�sM��	�s�	��a��V����
�
�d�1�g�x�(�����Q��!�Q��(�
�
�
�y�
)��b�!�*�	%��	%�
��1�v�a�0���
�
�d�1�g�1�2�����Q��!�Q��(�������1�%�	��	�

�q�!�f�%���
�
�d�1�g�0�1�����Q��!�Q��(����!�(�(�#�
�
�
�y�
)��q�!�f�Q�/�*�
)�-*�
)��,*�
)�s�'
E?�)
F�?F	�FN)r
rrr�r>rJrhr�r
rrr�r��s���G��H�0rr�c�>�eZdZeZeZd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zy)	�
TestFrozenSetc��|j|j�}|j|j�|j	|t|j��yr)r>r;r2r<rNrJr�s  rrzTestFrozenSet.test_init�s<���L�L����#��	�
�
�4�>�>�"�����C��	�	�N�+rc��|jtd��}|j|�}|jt|�t|��yr )r>r�rNr~r"s   rr#z'TestFrozenSet.test_constructor_identity�s9���L�L��q��"���L�L��O������A���1��&rc��|jt|jd��t|jd���d}t|�D�cgc]
}t	|���}}t�}td�D]6}t
|�|jt|j|����8|jt|�d�ycc}w)N�abcdeb�ebecda�d��r)	rNr5r>r�rrJrr�rS)rr	rs�seq�resultss     rr6zTestFrozenSet.test_hash�s�������d�l�l�8�4�5��d�l�l�8�4�5�	7�
��%*�1�X�.�X��y��|�X��.��%���s��A��C�L��K�K��T�\�\�#�.�/�0��	
����W��q�)��/s�Cc��|jj�}|jt|j�t|��yr)r?r�rNr~r;s  rr<zTestFrozenSet.test_copy�s-���f�f�k�k�m������D�F�F��R��W�-rc�F�ttd��td�zdgz}|j|�}|jt|��}|j	||�|jt
|�t
|��i}d||<|j	||d�y)Nr��abcdefg�apple�*)rjr�r>�reversedrNrr~)rr��key1�key2rBs     r�test_frozen_as_dictkeyz$TestFrozenSet.test_frozen_as_dictkey�s����5��9�o��Y��/�7�)�;���|�|�C� ���|�|�H�S�M�*������t�$����B�t�H�b��h�/�����$������4��"�%rc�n�|jd�}|jt|�t|��y)N�abcdcda)r>rNr5�rr�s  r�test_hash_cachingzTestFrozenSet.test_hash_caching�s(���L�L��#������a��$�q�'�*rc
�L�d}t�}|j}t|�D�cgc]}|dzd|zf��}}td|z�D]5}|tt	|D��cgc]
\}}||zs�|��c}}����7|jt
|�d|z�d�}d�}	td�D]d}d|z}
|
dz
}t|fD]M}t
tt|	||���D�
chc]}
|
|z��	c}
�}|jd|z|
��O�fycc}wcc}}wcc}
w)N�
rrEc��t�g}t|dz
�D]}t|�}|j|�� |d|Sr)rWr�r0)r	�numsrs�nums    r�zf_rangez7TestFrozenSet.test_hash_effectiveness.<locals>.zf_range�s?���K�=�D��1�Q�3�Z����o�����C� � ����8�Orc3�K�tt|�dz�D].}ttt	j
||��Ed{����0y7��wr)r�rSr�rW�	itertools�combinations)r?rss  r�powersetz7TestFrozenSet.test_hash_effectiveness.<locals>.powerset�s<�����3�q�6�!�8�_���y�)�*@�*@��A�*F�G�G�G�%�G�s�AA�A�A�rK)	rJr�r�r5rWrNrSr��
assertGreater)rr	�
hashvalues�addhashvaluers�	elemmasksrG�mr�r�r��maskr��hrls               r�test_hash_effectivenessz%TestFrozenSet.test_hash_effectiveness�s�����U�
�!�~�~��*/��(�3�(�Q�a��c�1�a�4�[�(�	�3��q�!�t��A���i�y�(H�y�t�q�!�A�a�C��y�(H�I�J�K������Z��!�Q�$�/�	�	H��r��A��Q��A��q�5�D���)���3�t�X�d�1�g�5F�+G�H�+G�a��T��+G�H�I���"�"�1�Q�3��*�*���#4��(H��&Is�D�
D�)D�)D!N)
r
rrrWr>rhrr#r6r<r�r�r�r
rrr�r��s/���G��H�,�
'�
*�.�&�+�+rr�c��eZdZy)�FrozenSetSubclassNr	r
rrr�r��rrr�c�2�eZdZeZeZd�Zd�Zd�Z	d�Z
d�Zy)�TestFrozenSetSubclassc���Gd�dt�}|ddg�}|jt|�|�|jt	|�ddh�|jt�5|d��ddd�Gd�dt�}|ddgd	�
�}|jt|�|�|jt	|�ddh�|j|jd	�Gd�dt�}|ddgd	�
�}|jt|�|�|jt	|�ddh�|j|jd	�y#1swY��xYw)
Nc��eZdZy)�ATestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclassNr	r
rrr�r��r�rr�rrEr
r�c��eZdZdd�Zy)�KTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_initNc��||_yrr�)rr�r�s   rr2zTTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_init.__init__s	��$��rr)r
rrr2r
rrr�r�s��
%rr�r�r�c� ��eZdZd�fd�	Z�xZS)�JTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_newc�6��t�|�||�}||_|Srr�r�s    �rr�zRTestFrozenSetSubclass.test_keywords_in_subclass.<locals>.subclass_with_new.__new__r�rrr�r�s@rr�r�r�rr�)rWr�rgrNrJrHrIr�r�s     rr�z/TestFrozenSetSubclass.test_keywords_in_subclass�s$��	�y�	��a��V����
�
�d�1�g�x�(�����Q��!�Q��(�
�
�
�y�
)��b�!�*�	%��	%�
��1�v�a�0���
�
�d�1�g�1�2�����Q��!�Q��(�������1�%�	�	�	�

�q�!�f�Q�/���
�
�d�1�g�0�1�����Q��!�Q��(�������1�%�'*�
)�s�'
E�E!c��|jtd��}|j|�}|jt|�t|��yr r!r"s   rr#z/TestFrozenSetSubclass.test_constructor_identityr$rc��|jj�}|jt|j�t|��yr)r?r�rr~r;s  rr<zTestFrozenSetSubclass.test_copys-���f�f�k�k�m�����B�t�v�v�J��3��0rc�j�|j�}|j|�}|j||�yr)r>rNr"s   r�test_nested_empty_constructorz3TestFrozenSetSubclass.test_nested_empty_constructors*���L�L�N���L�L��O������A�rc��|j}t�}|�}|�|g�|d�|d�|�|g�|d�|d�|td��||��|t��||||�||�g}|jt	tt
t|���t	|��y)Nr
rxr)r>rWr�rNrSrJr�r~)r�	Frozensetr��F�efss     r�test_singleton_empty_frozensetz4TestFrozenSetSubclass.test_singleton_empty_frozenset#s����L�L�	��K���K���{�I�b�M�9�R�=�)�B�-��{�I�b�M�9�R�=�)�B�-���q��"�I�i�k�$:����%�q�!�Y�q�\�9�Q�<�I��
	
����S��R���.�/��S��:rN)r
rrr�r>rWrhr�r#r<r�r�r
rrr�r��s%���G��H�&�6*�
1��
	;rr�c��eZdZdZy)�SetSubclassWithSlots�rnr��__dict__N�r
rr�	__slots__r
rrr�r�/���&�Irr�c�@�eZdZeZejZejZy)�TestSetSubclassWithSlotsN)r
rrr�r>r6rCr�r
rrrr2s��"�G����E� �.�.�Mrrc��eZdZdZy)�FrozenSetSubclassWithSlotsrNrr
rrrr7rrrc��eZdZeZy)�TestFrozenSetSubclassWithSlotsN)r
rrrr>r
rrr
r
:s��(�Grr
c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�TestBasicOpsc�|�|j�0|jt|j�|j�yyr)r'rNrJrs r�	test_reprzTestBasicOps.test_reprEs-���9�9� ����T�$�(�(�^�T�Y�Y�7�!rc��t|j�}|j|jd��|j|j	d��|ddjd�}|j
�|jD�cgc]
}t|���}}|j
�|j||�ycc}w)N�{�}r���z, )	r'rJr��
startswith�endswith�split�sort�valuesrN)r�text�resultr(�sorted_repr_valuess     r�check_repr_against_valuesz&TestBasicOps.check_repr_against_valuesIs����D�H�H�~���������,�-�����
�
�c�*�+��a���!�!�$�'�����
�7;�{�{�C�{�e�d�5�k�{��C����!�����!3�4��Ds�B?c�b�|jt|j�|j�yr)rNrSrJ�lengthrs r�test_lengthzTestBasicOps.test_lengthTs������T�X�X�����4rc�P�|j|j|j�yr�rNrJrs r�test_self_equalityzTestBasicOps.test_self_equalityW���������4�8�8�,rc�P�|j|j|j�yr)rNrJr�rs r�test_equivalent_equalityz%TestBasicOps.test_equivalent_equalityZr"rc�l�|j|jj�|j�yr)rNrJr�r�rs rr<zTestBasicOps.test_copy]s �����������$�(�(�3rc�n�|j|jz}|j||j�yr�rJrNr��rrs  r�test_self_unionzTestBasicOps.test_self_union`�(�����D�H�H�$���������*rc�b�|jtz}|j||j�yr�rJ�	empty_setrNr�r(s  r�test_empty_unionzTestBasicOps.test_empty_uniond�$�����I�%���������*rc�b�t|jz}|j||j�yr)r-rJrNr�r(s  r�test_union_emptyzTestBasicOps.test_union_emptyhs$���T�X�X�%���������*rc�n�|j|jz}|j||j�yrr'r(s  r�test_self_intersectionz#TestBasicOps.test_self_intersectionlr*rc�V�|jtz}|j|t�yr�rJr-rNr(s  r�test_empty_intersectionz$TestBasicOps.test_empty_intersectionps �����I�%�������+rc�V�t|jz}|j|t�yr�r-rJrNr(s  r�test_intersection_emptyz$TestBasicOps.test_intersection_emptyt� ���T�X�X�%�������+rc��|jj|j�}|j||j�yr�rJr�rNr(s  r�test_self_isdisjointz!TestBasicOps.test_self_isdisjointxs0�����$�$�T�X�X�.������T�X�X��.rc�f�|jjt�}|j|d�yr�)rJr�r-rNr(s  r�test_empty_isdisjointz"TestBasicOps.test_empty_isdisjoint|s&�����$�$�Y�/�������&rc�f�tj|j�}|j|d�yr�)r-r�rJrNr(s  r�test_isdisjoint_emptyz"TestBasicOps.test_isdisjoint_empty�s&���%�%�d�h�h�/�������&rc�b�|j|jz}|j|t�yr�rJrNr-r(s  r�test_self_symmetric_differencez+TestBasicOps.test_self_symmetric_difference��$�����D�H�H�$�������+rc�b�|jtz}|j||j�yrr5r(s  r�test_empty_symmetric_differencez,TestBasicOps.test_empty_symmetric_difference�r/rc�b�|j|jz
}|j|t�yrrCr(s  r�test_self_differencez!TestBasicOps.test_self_difference�rErc�b�|jtz
}|j||j�yrr,r(s  r�test_empty_differencez"TestBasicOps.test_empty_difference�r/rc�V�t|jz
}|j|t�yrr8r(s  r�test_empty_difference_revz&TestBasicOps.test_empty_difference_rev�r:rc���|jD]}|j||j�� t|j�}|j	|j�t
|j��yr)rJrXrr�rN�__length_hint__rS)r�v�setiters   r�test_iterationzTestBasicOps.test_iteration�sP�����A��M�M�!�T�[�[�)���t�x�x�.������0�0�2�C����M�Brc��ttjdz�D]c}tj|j|�}tj
|�}|j
|j||j�d|����ey)Nrr�)r�r�r�r�rJr�rN)rr�r�r�s    rr�zTestBasicOps.test_pickling�s_���6�2�2�Q�6�7�E����T�X�X�u�-�A��<�<��?�D����T�X�X�t�+/�8�8�T�:�
<�8rc��|jt�5t�jd�ddd�|jt�5t�j	d�ddd�y#1swY�AxYw#1swYyxYw)Nr)rHrIrJr�rmrs r�test_issue_37219zTestBasicOps.test_issue_37219�s[��
�
�
�y�
)��E���S�!�*�
�
�
�y�
)��E�#�#�C�(�*�
)�*�
)��
)�
)�s�A0�
A<�0A9�<BN)r
rrrrrr!r$r<r)r.r1r3r6r9r=r?rArDrGrIrKrMrRr�rUr
rrrrCsv��8�	5�5�-�-�4�+�+�+�+�,�,�/�'�'�,�+�,�+�,�C�<�)rrc��eZdZd�Zy)�TestBasicOpsEmptyc��d|_g|_t|j�|_t|j�|_d|_d|_y)Nz	empty setrzset()��caserrJr�rr'rs rrCzTestBasicOpsEmpty.setUp�s>��!��	�����$�+�+�&����$�+�+�&��������	rN�r
rrrCr
rrrWrW�s��rrWc��eZdZd�Zd�Zd�Zy)�TestBasicOpsSingletonc��d|_dg|_t|j�|_t|j�|_d|_d|_y)Nzunit set (number)r�rz{3}rYrs rrCzTestBasicOpsSingleton.setUp�s@��)��	��c����$�+�+�&����$�+�+�&��������	rc�<�|jd|j�yr �rXrJrs r�test_inzTestBasicOpsSingleton.test_in�s���
�
�a����"rc�<�|jd|j�y�NrE�rBrJrs r�test_not_inz!TestBasicOpsSingleton.test_not_in��������D�H�H�%rN�r
rrrCrarer
rrr]r]�s���#�&rr]c��eZdZd�Zd�Zd�Zy)�TestBasicOpsTuplec��d|_dg|_t|j�|_t|j�|_d|_d|_y)Nzunit set (tuple)�r�zerorz
{(0, 'zero')}rYrs rrCzTestBasicOpsTuple.setUp�s@��(��	�"�m����$�+�+�&����$�+�+�&������%��	rc�<�|jd|j�y)Nrkr`rs rrazTestBasicOpsTuple.test_in�s���
�
�k�4�8�8�,rc�<�|jd|j�y)N�	rdrs rrezTestBasicOpsTuple.test_not_in�rfrNrgr
rrriri�s��&�-�&rric��eZdZd�Zy)�TestBasicOpsTriplec���d|_ddtjg|_t	|j�|_t	|j�|_d|_d|_y)Nz
triple setrrlr�)rZ�operatorr�rrJr�rr'rs rrCzTestBasicOpsTriple.setUp�sI��"��	��&�(�,�,�/����$�+�+�&����$�+�+�&��������	rNr[r
rrrqrq�s��rrqc��eZdZd�Zd�Zy)�TestBasicOpsStringc��d|_gd�|_t|j�|_t|j�|_d|_y)Nz
string set�rGr|rYr��rZrrJr�rrs rrCzTestBasicOpsString.setUp�s7��"��	�%����$�+�+�&����$�+�+�&�����rc�$�|j�yr�rrs rrzTestBasicOpsString.test_repr�����&�&�(rN�r
rrrCrr
rrruru�����)rruc��eZdZd�Zd�Zy)�TestBasicOpsBytesc��d|_gd�|_t|j�|_t|j�|_d|_y)Nz	bytes set)�a�b�cr�rxrs rrCzTestBasicOpsBytes.setUp�s7��!��	�(����$�+�+�&����$�+�+�&�����rc�$�|j�yrrzrs rrzTestBasicOpsBytes.test_repr�r{rNr|r
rrrr�r}rrc��eZdZd�Zd�Zy)�TestBasicOpsMixedStringBytesc��|jtj��tjdt
�d|_gd�|_t|j�|_t|j�|_	d|_
y)N�ignorezstring and bytes set)rGr|r�r�rK)�enterContextr�check_warnings�warnings�simplefilter�BytesWarningrZrrJr�rrs rrCz"TestBasicOpsMixedStringBytes.setUps^�����/�8�8�:�;����h��5�,��	�,����$�+�+�&����$�+�+�&�����rc�$�|j�yrrzrs rrz&TestBasicOpsMixedStringBytes.test_repr	r{rNr|r
rrr�r��s���)rr�c#�K�t��wr)rIr
rr�baditerr�s����
�O�rc#�K�d��y�wr�r
r
rr�gooditerr�s����
�J�s�c�"�eZdZdZd�Zd�Zd�Zy)�TestExceptionPropagationz?SF 628246:  Set constructor should not trap iterator TypeErrorsc�J�|jttt��yr)rHrIrJr�rs r�test_instanceWithExceptionz3TestExceptionPropagation.test_instanceWithExceptions�����)�S�'�)�4rc��tgd��td�tdddd��ttd��td�tt��y)Nr&rrEr�)�one�two�threerb)rJr�r�rs r�test_instancesWithoutExceptionz7TestExceptionPropagation.test_instancesWithoutExceptions:���G���G���1�A�q�)�*��E�!�H�
��E�
��H�J�rc��tgd��}	|D]}|jdg��	|jd�y#t$rYywxYw)Nr&rKz0no exception when changing size during iteration)rJrXrqr)rr?rss   r�test_changingSizeWhileIteratingz8TestExceptionPropagation.test_changingSizeWhileIterating$sK����L��	J������!��
��

�I�I�H�I���	��	�s�;�	A�AN)r
rrr*r�r�r�r
rrr�r�s��I�5��Jrr�c��eZdZd�Zy)�
TestSetOfSetsc�,�tdg�}t|g�}|j�}|jt	|�t�|j|�|j
|�|j|t��|j|�yr)rWrJr+rNrgr�r�r�)r�inner�outer�elements    r�test_constructorzTestSetOfSets.test_constructor1sm���1�#����U�G����)�)�+������g��	�2�
�	�	�%��
���U��������&�
�
�
�e�rN)r
rrr�r
rrr�r�0s��rr�c�x�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zy)�
TestBinaryOpsc�$�td�|_y�N�rErK��rJrs rrCzTestBinaryOps.setUp>�
���y�>��rc	�V�|j|jtdddd���y)Nrr��r�r rs r�test_eqzTestBinaryOps.test_eqAs!��������3�!�a�!�}�#5�6rc�l�|jtdg�z}|j|td��y�NrEr�r(r(s  r�test_union_subsetzTestBinaryOps.test_union_subsetDs*�����C���H�$�������Y��0rc�r�|jtgd��z}|j|tgd���y�N�rErKr��r(r(s  r�test_union_supersetz!TestBinaryOps.test_union_supersetHs*�����C��-�-�������\�!2�3rc�r�|jtgd��z}|j|tgd���y�N�r�rKr�)rEr�rKr�r�r(r(s  r�test_union_overlapz TestBinaryOps.test_union_overlapLs)�����C�	�N�*�������_�!5�6rc�p�|jtdg�z}|j|tgd���y�Nr�r�r(r(s  r�test_union_non_overlapz$TestBinaryOps.test_union_non_overlapP�+�����C���H�$�������\�!2�3rc�j�|jtd�z}|j|td��y�N�rErKr(r(s  r�test_intersection_subsetz&TestBinaryOps.test_intersection_subsetTs(�����C��K�'�������V��-rc�r�|jtgd��z}|j|tgd���y�Nr�r�r(r(s  r�test_intersection_supersetz(TestBinaryOps.test_intersection_supersetXs)�����C��-�-�������Y��0rc�p�|jtgd��z}|j|tdg��y�Nr�rKr(r(s  r�test_intersection_overlapz'TestBinaryOps.test_intersection_overlap\s*�����C�	�N�*�������a�S��*rc�b�|jtdg�z}|j|t�y�Nr�rCr(s  r�test_intersection_non_overlapz+TestBinaryOps.test_intersection_non_overlap`s&�����C���H�$�������+rc�p�|jjtd��}|j|d�y)Nr�Fr<r(s  r�test_isdisjoint_subsetz$TestBinaryOps.test_isdisjoint_subsetds*�����$�$�S��[�1�������'rc�t�|jjtgd���}|j|d�y)Nr�Fr<r(s  r�test_isdisjoint_supersetz&TestBinaryOps.test_isdisjoint_superseths+�����$�$�S��%6�7�������'rc�t�|jjtgd���}|j|d�y)Nr�Fr<r(s  r�test_isdisjoint_overlapz%TestBinaryOps.test_isdisjoint_overlapls*�����$�$�S��^�4�������'rc�r�|jjtdg��}|j|d�y)Nr�Tr<r(s  r�test_isdisjoint_non_overlapz)TestBinaryOps.test_isdisjoint_non_overlapps,�����$�$�S�!��X�.�������&rc�l�|jtd�z}|j|tdg��y�Nr�r�r(r(s  r�test_sym_difference_subsetz(TestBinaryOps.test_sym_difference_subsetts*�����C��K�'�������a�S��*rc�l�|jtd�z}|j|tdg��y�Nr�r�r(r(s  r�test_sym_difference_supersetz*TestBinaryOps.test_sym_difference_supersetxs+�����C��-�-�������a�S��*rc�n�|jtd�z}|j|tgd���y�Nr�)rEr�r�r�r(r(s  r�test_sym_difference_overlapz)TestBinaryOps.test_sym_difference_overlap|s)�����C�	�N�*�������\�!2�3rc�p�|jtdg�z}|j|tgd���yr�r(r(s  r�test_sym_difference_non_overlapz-TestBinaryOps.test_sym_difference_non_overlap�r�rN)r
rrrCr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r
rrr�r�=s\��"�7�1�4�7�4�.�1�+�,�(�(�(�'�+�+�4�4rr�c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�
TestUpdateOpsc�$�td�|_yr�r�rs rrCzTestUpdateOps.setUp�r�rc��|xjtdg�zc_|j|jtd��yr�r(rs rr�zTestUpdateOps.test_union_subset�s.�����C���H���������3�y�>�2rc��|xjtgd��zc_|j|jtgd���yr�r(rs rr�z!TestUpdateOps.test_union_superset�s.�����C��%�%��������3�|�#4�5rc��|xjtgd��zc_|j|jtgd���yr�r(rs rr�z TestUpdateOps.test_union_overlap�s-�����C�	�N�"��������3��#7�8rc��|xjtdg�zc_|j|jtgd���yr�r(rs rr�z$TestUpdateOps.test_union_non_overlap��/�����C���H���������3�|�#4�5rc��|jjtgd���|j|jtgd���yr�)rJrXrNrs r�test_union_method_callz$TestUpdateOps.test_union_method_call�s/��������I��'�������3��#7�8rc��|xjtd�zc_|j|jtd��yr�r(rs rr�z&TestUpdateOps.test_intersection_subset�s,�����C��K���������3�v�;�/rc��|xjtgd��zc_|j|jtgd���yr�r(rs rr�z(TestUpdateOps.test_intersection_superset�s-�����C��%�%��������3�y�>�2rc��|xjtgd��zc_|j|jtdg��yr�r(rs rr�z'TestUpdateOps.test_intersection_overlap�s.�����C�	�N�"��������3��s�8�,rc��|xjtdg�zc_|j|jt�yr�rCrs rr�z+TestUpdateOps.test_intersection_non_overlap�s*�����C���H���������9�-rc��|jjtgd���|j|jtdg��yr�)rJrarNrs r�test_intersection_method_callz+TestUpdateOps.test_intersection_method_call�s2�����$�$�S��^�4�������3��s�8�,rc��|xjtd�zc_|j|jtdg��yr�r(rs rr�z(TestUpdateOps.test_sym_difference_subset��.�����C��K���������3��s�8�,rc��|xjtd�zc_|j|jtdg��yr�r(rs rr�z*TestUpdateOps.test_sym_difference_superset�s/�����C��%�%��������3��s�8�,rc��|xjtd�zc_|j|jtgd���yr�r(rs rr�z)TestUpdateOps.test_sym_difference_overlap�s-�����C�	�N�"��������3�|�#4�5rc��|xjtdg�zc_|j|jtgd���yr�r(rs rr�z-TestUpdateOps.test_sym_difference_non_overlap�r�rc��|jjtgd���|j|jtgd���yr�)rJrrNrs r�test_sym_difference_method_callz-TestUpdateOps.test_sym_difference_method_call�s1�����,�,�S��^�<�������3�|�#4�5rc��|xjtd�zc_|j|jtdg��yr�r(rs r�test_difference_subsetz$TestUpdateOps.test_difference_subset�r�rc��|xjtd�zc_|j|jtg��yr�r(rs r�test_difference_supersetz&TestUpdateOps.test_difference_superset�s-�����C��%�%��������3�r�7�+rc��|xjtd�zc_|j|jtddg��y�Nr�rEr�r(rs r�test_difference_overlapz%TestUpdateOps.test_difference_overlap�s0�����C�	�N�"��������3��1�v�;�/rc��|xjtdg�zc_|j|jtgd���y)Nr�r�r(rs r�test_difference_non_overlapz)TestUpdateOps.test_difference_non_overlap�s.�����C���H���������3�y�>�2rc��|jjtgd���|j|jtddg��yr�)rJrmrNrs r�test_difference_method_callz)TestUpdateOps.test_difference_method_call�s4�����"�"�3�y�>�2�������3��1�v�;�/rN)r
rrrCr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rrr�r��sk��"�3�6�9�6�9�0�3�-�.�-�-�-�6�6�6�-�,�0�3�0rr�c�`�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�
TestMutatec�J�gd�|_t|j�|_y)Nrw)rrJrs rrCzTestMutate.setUp�s��%����t�{�{�#��rc��|jjd�|j|jtd��y)NrYrb�rJr�rNrs r�test_add_presentzTestMutate.test_add_present�s*�������S��������3�u�:�.rc��|jjd�|j|jtd��y)NrBr^rrs r�test_add_absentzTestMutate.test_add_absent�s*�������S��������3�v�;�/rc���t�}d}|jD]3}|j|�|dz
}|jt	|�|��5|j||j�y)Nrr)rJrr�rNrS)r�tmp�expected_lenrPs    r�test_add_until_fullzTestMutate.test_add_until_full�s[���e�������A��G�G�A�J��A��L����S��X�|�4��	
����d�h�h�'rc��|jjd�|j|jtd��y)Nr|�ac)rJr�rNrs r�test_remove_presentzTestMutate.test_remove_present�s*���������������3�t�9�-rc�|�	|jjd�|jd�y#t$rYywxYw)NrBz7Removing missing element should have raised LookupError)rJr�rq�LookupErrorrs r�test_remove_absentzTestMutate.test_remove_absent�s6��	��H�H�O�O�C� ��I�I�O�P���	��	�s�,/�	;�;c���t|j�}|jD]G}|jj|�|dz}|j	t|j�|��Iyr)rSrJrr�rN)rrrPs   r�test_remove_until_emptyz"TestMutate.test_remove_until_empty�sO���4�8�8�}�����A��H�H�O�O�A���A��L����S����]�L�9�rc��|jjd�|j|jtd��y)NrYr��rJr�rNrs r�test_discard_presentzTestMutate.test_discard_presents,���������������3�t�9�-rc��|jjd�|j|jtd��y)NrBrbrrs r�test_discard_absentzTestMutate.test_discard_absents,���������������3�u�:�.rc��|jj�|jt|j�d�yr.)rJr8rNrSrs rr9zTestMutate.test_clears(������������T�X�X���*rc��i}|jr*d||jj�<|jr�*|jt|�t|j��|jD]}|j||��yr)rJr+rNrSrrX)r�poppedrPs   rrRzTestMutate.test_popsd�����h�h�%)�F�4�8�8�<�<�>�"��h�h�����V��c�$�+�+�&6�7����A��M�M�!�V�$�rc��|jjd�|j|jt|j��y)Nr
�rJrXrNrrs r�test_update_empty_tuplez"TestMutate.test_update_empty_tuples/���������������3�t�{�{�#3�4rc��|jjd�|j|jt|j��y)NrFrrs r�test_update_unit_tuple_overlapz)TestMutate.test_update_unit_tuple_overlaps/���������������3�t�{�{�#3�4rc��|jjd�|j|jt|jdgz��y)N)rGr�r�rrs r�"test_update_unit_tuple_non_overlapz-TestMutate.test_update_unit_tuple_non_overlap s6�������
�#�������3�t�{�{�c�U�':�#;�<rN)r
rrrCrr	r
rrrrrr9rRr r"r$r
rrrr�sH��$�/�0�(�.��:�.�/�+�%�5�5�=rrc�.�eZdZddd�Zdddddd	d
�Zd�Zy)
�TestSubsetsr�r�)�<=�>=�==�!=�>�<r(r')r)r*r,r+r'r(c�^�|j}|j}dD�]}||jv}td|zdzt	��}|j||�|tjvr7t|tj|�}||�}|j||�tj|}td|zdzt	��}|j||�|tjvs��t|tj|�}||�}|j||���y)N)r*r)r,r'r+r(rnr�)
�left�right�cases�eval�localsrNr&�case2method�getattr�reverse)rrnr�rZrPr�method�rcases        r�
test_issubsetzTestSubsets.test_issubset4s���I�I���J�J��4�D��t�z�z�)�H��#��*�s�*�F�H�5�F����V�X�.��{�.�.�.� ��K�$;�$;�D�$A�B������� � ���2� �'�'��-�E��#��+��+�V�X�6�F����V�X�.���/�/�/� ��K�$;�$;�E�$B�C������� � ���2�%5rN)r
rrr3r5r8r
rrr&r&&s/��#�%��K��������G�3rr&c�0�eZdZe�Ze�ZdZdZy)�TestSubsetEqualEmptyz
both empty�r)r'r(N�r
rrrJr.r/r�r0r
rrr:r:Ls���E�D��E�E��D��Err:c�<�eZdZeddg�Zeddg�ZdZdZy)�TestSubsetEqualNonEmptyrrEz
equal pairr;Nr<r
rrr>r>Ts&����A��K�D���A��K�E��D��Err>c�6�eZdZe�Zeddg�ZdZdZy)�TestSubsetEmptyNonEmptyrrEzone empty, one non-empty�r*r,r'Nr<r
rrr@r@\s ���E�D���A��K�E�&�D��Err@c�:�eZdZedg�Zeddg�ZdZdZy)�TestSubsetPartialrrEz&one a non-empty proper subset of otherrANr<r
rrrCrCds$�����H�D���A��K�E�4�D��ErrCc�8�eZdZedg�Zedg�ZdZdZy)�TestSubsetNonOverlaprrEzneither empty, neither containsr*Nr<r
rrrErEls"�����H�D����H�E�-�D��ErrEc�`�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�TestOnlySetsInBinaryOpsc�L�|j|j|jk(d�|j|j|jk(d�|j|j|jk7d�|j|j|jk7d�yr�)rNr!rJrs r�
test_eq_nez"TestOnlySetsInBinaryOps.test_eq_nevsv��������t�x�x�/��7�������T�Z�Z�/��7�������t�x�x�/��6�������T�Z�Z�/��6rc����jt�fd���jt�fd���jt�fd���jt�fd���jt�fd���jt�fd���jt�fd���jt�fd��y)	Nc�6���j�jkSr�rJr!rs�r�<lambda>z:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>~����T�X�X��
�
�-Brc�6���j�jkSrrLrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>����T�X�X����-Crc�6���j�jkDSrrLrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>�rNrc�6���j�jk\SrrLrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>�rPrc�6���j�jkSr�r!rJrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>�����T�Z�Z�$�(�(�-Brc�6���j�jkSrrTrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>�����T�Z�Z�4�8�8�-Crc�6���j�jkDSrrTrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>�rUrc�6���j�jk\SrrTrs�rrMz:TestOnlySetsInBinaryOps.test_ge_gt_le_lt.<locals>.<lambda>�rWr)rHrIrs`r�test_ge_gt_le_ltz(TestOnlySetsInBinaryOps.test_ge_gt_le_lt}s�������)�%B�C����)�%C�D����)�%B�C����)�%C�D����)�%B�C����)�%C�D����)�%B�C����)�%C�Drc��	|xj|jzc_|jd�y#t$rYywxYw�Nzexpected TypeError�rJr!rqrIrs r�test_update_operatorz,TestOnlySetsInBinaryOps.test_update_operator��<��	,��H�H��
�
�"�H�
�I�I�*�+���	��	���3�	?�?c���|jr&|jj|j�y|j	t
|jj|j�yr)�otherIsIterablerJrXr!rHrIrs rr[z#TestOnlySetsInBinaryOps.test_update�s=������H�H�O�O�D�J�J�'����i������$�*�*�Erc�8���jt�fd���jt�fd���jr&�jj	�j
�y�jt�jj�j
�y)Nc�6���j�jzSrrLrs�rrMz4TestOnlySetsInBinaryOps.test_union.<locals>.<lambda>�rNrc�6���j�jzSrrTrs�rrMz4TestOnlySetsInBinaryOps.test_union.<locals>.<lambda>�rUr)rHrIrbrJrfr!rs`rroz"TestOnlySetsInBinaryOps.test_union�s`������)�%B�C����)�%B�C�����H�H�N�N�4�:�:�&����i���������Drc��	|xj|jzc_|jd�y#t$rYywxYwr\r]rs r�!test_intersection_update_operatorz9TestOnlySetsInBinaryOps.test_intersection_update_operator�r_r`c���|jr&|jj|j�y|j	t
|jj|j�yr)rbrJrar!rHrIrs rrcz0TestOnlySetsInBinaryOps.test_intersection_update�sE������H�H�(�(����4����i�"�h�h�:�:�"�j�j�
*rc�8���jt�fd���jt�fd���jr&�jj	�j
�y�jt�jj�j
�y)Nc�6���j�jzSrrLrs�rrMz;TestOnlySetsInBinaryOps.test_intersection.<locals>.<lambda>�rNrc�6���j�jzSrrTrs�rrMz;TestOnlySetsInBinaryOps.test_intersection.<locals>.<lambda>�rUr)rHrIrbrJr}r!rs`rr�z)TestOnlySetsInBinaryOps.test_intersection�sd������)�%B�C����)�%B�C�����H�H�!�!�$�*�*�-����i����)>�)>��
�
�Krc��	|xj|jzc_|jd�y#t$rYywxYwr\r]rs r�#test_sym_difference_update_operatorz;TestOnlySetsInBinaryOps.test_sym_difference_update_operator�r_r`c���|jr&|jj|j�y|j	t
|jj|j�yr)rbrJrr!rHrIrs r�test_sym_difference_updatez2TestOnlySetsInBinaryOps.test_sym_difference_update�sE������H�H�0�0����<����i�"�h�h�B�B�"�j�j�
*rc�8���jt�fd���jt�fd���jr&�jj	�j
�y�jt�jj�j
�y)Nc�6���j�jzSrrLrs�rrMz=TestOnlySetsInBinaryOps.test_sym_difference.<locals>.<lambda>�rNrc�6���j�jzSrrTrs�rrMz=TestOnlySetsInBinaryOps.test_sym_difference.<locals>.<lambda>�rUr)rHrIrbrJr�r!rs`r�test_sym_differencez+TestOnlySetsInBinaryOps.test_sym_difference�sd������)�%B�C����)�%B�C�����H�H�)�)�$�*�*�5����i����)F�)F��
�
�Src��	|xj|jzc_|jd�y#t$rYywxYwr\r]rs r�test_difference_update_operatorz7TestOnlySetsInBinaryOps.test_difference_update_operator�r_r`c���|jr&|jj|j�y|j	t
|jj|j�yr)rbrJrmr!rHrIrs rrnz.TestOnlySetsInBinaryOps.test_difference_update�sE������H�H�&�&�t�z�z�2����i�"�h�h�8�8�"�j�j�
*rc�8���jt�fd���jt�fd���jr&�jj	�j
�y�jt�jj�j
�y)Nc�6���j�jz
SrrLrs�rrMz9TestOnlySetsInBinaryOps.test_difference.<locals>.<lambda>�rNrc�6���j�jz
SrrTrs�rrMz9TestOnlySetsInBinaryOps.test_difference.<locals>.<lambda>�rUr)rHrIrbrJr�r!rs`rr�z'TestOnlySetsInBinaryOps.test_difference�sd������)�%B�C����)�%B�C�����H�H����
�
�+����i����)<�)<�d�j�j�IrN)r
rrrIrZr^r[rorgrcr�rmrorsrurnr�r
rrrGrGtsN��7�	E�,�F�E�,�*�L�,�*�T�,�*�JrrGc��eZdZd�Zy)�TestOnlySetsNumericc�@�td�|_d|_d|_y)Nr&�F�rJr!rbrs rrCzTestOnlySetsNumeric.setUp�s����^�����
�$��rNr[r
rrr{r{����%rr{c��eZdZd�Zy)�TestOnlySetsDictc�F�td�|_ddd�|_d|_y)Nr&rErK)rr�Tr~rs rrCzTestOnlySetsDict.setUp�s ����^����Q�Z��
�#��rNr[r
rrr�r�����$rr�c��eZdZd�Zy)�TestOnlySetsOperatorc�\�td�|_tj|_d|_y)Nr&F)rJrsr�r!rbrs rrCzTestOnlySetsOperator.setUp�s ����^����\�\��
�$��rNr[r
rrr�r��rrr�c��eZdZd�Zy)�TestOnlySetsTuplec�@�td�|_d|_d|_y)Nr&r�Tr~rs rrCzTestOnlySetsTuple.setUps����^�����
�#��rNr[r
rrr�r�r�rr�c��eZdZd�Zy)�TestOnlySetsStringc�@�td�|_d|_d|_y)Nr&rbTr~rs rrCzTestOnlySetsString.setUp	s����^�����
�#��rNr[r
rrr�r�r�rr�c��eZdZd�Zy)�TestOnlySetsGeneratorc�P�d�}td�|_|�|_d|_y)Nc3�8K�tddd�D]}|���y�w)Nrr�rE)r�)rss r�genz(TestOnlySetsGenerator.setUp.<locals>.gens�����1�b�!�_����%�s�r&Tr~)rr�s  rrCzTestOnlySetsGenerator.setUps%��	���^����U��
�#��rNr[r
rrr�r�s��$rr�c��eZdZd�Zd�Zy)�TestCopyingc�<�|jj�}t|t��}t|jt��}|j	t|�t|��t
t|��D]}|j||||u��y�N�rM)rJr�rMr'rNrSr�r��rr��dup_list�set_listrss     rr<zTestCopying.test_copysq���h�h�m�m�o���#�4�(���$�(�(��-������X���H�
�6��s�8�}�%�A��O�O�H�Q�K�8�A�;�6�7�&rc�D�tj|j�}t|t��}t|jt��}|jt
|�t
|��tt
|��D]}|j||||��yr�)r�r�rJrMr'rNrSr�r�s     r�test_deep_copyzTestCopying.test_deep_copy%ss���m�m�D�H�H�%���#�4�(���$�(�(��-������X���H�
�6��s�8�}�%�A����X�a�[�(�1�+�6�&rN)r
rrr<r�r
rrr�r�s��8�7rr�c��eZdZd�Zy)�TestCopyingEmptyc�"�t�|_yrr�rs rrCzTestCopyingEmpty.setUp1s���5��rNr[r
rrr�r�0s��rr�c��eZdZd�Zy)�TestCopyingSingletonc�&�tdg�|_y)N�hellor�rs rrCzTestCopyingSingleton.setUp7s����y�>��rNr[r
rrr�r�6s��"rr�c��eZdZd�Zy)�TestCopyingTriplec�(�tgd��|_y)N)rlrNr�rs rrCzTestCopyingTriple.setUp=s���(�)��rNr[r
rrr�r�<s��*rr�c��eZdZd�Zy)�TestCopyingTuplec�&�tdg�|_y)N�rrEr�rs rrCzTestCopyingTuple.setUpCs����x�=��rNr[r
rrr�r�Bs��!rr�c��eZdZd�Zy)�TestCopyingNestedc�&�tdg�|_y)N)r�)r�rKr�rs rrCzTestCopyingNested.setUpIs���(�)�*��rNr[r
rrr�r�Hs��+rr�c�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�TestIdentitiesc�D�td�|_td�|_y)N�abracadabra�alacazam)rJrGr|rs rrCzTestIdentities.setUpOs���]�#����Z���rc�|�|j|j}}|j||z
|k�|j||z
|k�|j||z|k�|j||z|k�|j||z|kD�|j||z|kD�|j||z||zk�yr)rGr|r��rrGr|s   r�test_binopsVsSubsetsz#TestIdentities.test_binopsVsSubsetsSs����v�v�t�v�v�1������A���	�"�����A���	�"�����A���	�"�����A���	�"�����A���	�"�����A���	�"�����A���A��
�&rc��|j|j}}|j||z||z�|j||z||z�|j||z||z�||k7r|j||z
||z
�yyr)rGr|rNrr�s   r�test_commutativityz!TestIdentities.test_commutativity]s���v�v�t�v�v�1������1��a��c�"�����1��a��c�"�����1��a��c�"���6�����!��Q�q�S�)�rc���|j|j}}|j||z
||zz||z
z||z�|j||z||zz||z�|j|||z
z||z�|j||z
|z||z�|j||z
||zz|�|j||z
||zz|�|j||z
||z
z||z�yr)rGr|rNr�s   r�test_summationszTestIdentities.test_summationses����v�v�t�v�v�1�����!�A�#��!���a��c�*�A�a�C�0����!�A�#��!���a��c�*�����A�a�C��!�A�#�&����!�A�#�q��!�A�#�&����!�A�#��!���a�(����!�A�#��!���a�(����!�A�#��!���a��c�*rc���|j|jt�}}}|j||z
|z|�|j||z
|z|�|j||z||zz|�yr)rGr|rJrN)rrGr|rls    r�test_exclusionzTestIdentities.test_exclusionpse���V�V�T�V�V�S�U�d�1�����!�A�#�q��$�'����!�A�#�q��$�'����!�A�#��!���d�+rN)r
rrrCr�r�r�r�r
rrr�r�Ns��!�'�*�	+�,rr�c#�"K�|D]}|���y�w)zRegular generatorNr
��seqnrss  r�Rr�ys����
�����s�
c��eZdZdZd�Zd�Zy)�GzSequence using __getitem__c��||_yr�r��rr�s  rr2z
G.__init__�s	����	rc� �|j|Srr�rrs  r�__getitem__z
G.__getitem__�s���y�y��|�rN)r
rrr*r2r�r
rrr�r�~s�� ��rr�c�"�eZdZdZd�Zd�Zd�Zy)�Iz Sequence using iterator protocolc� �||_d|_yr.r�r�s  rr2z
I.__init__������	���rc��|Srr
rs r�__iter__z
I.__iter__�����rc��|jt|j�k\rt�|j|j}|xjdz
c_|Sr�rsrSr�r��rrPs  r�__next__z
I.__next__��?���6�6�S����^�#�=�%8��I�I�d�f�f������!����rN�r
rrr*r2r�r�r
rrr�r��s��&���rr�c��eZdZdZd�Zd�Zy)�Igz9Sequence using iterator protocol defined with a generatorc� �||_d|_yr.r�r�s  rr2zIg.__init__�r�rc#�6K�|jD]}|���y�wrr�)r�vals  rr�zIg.__iter__�s�����9�9�C��I��s�N�r
rrr*r2r�r
rrr�r��s��?��rr�c��eZdZdZd�Zd�Zy)�Xz Missing __getitem__ and __iter__c� �||_d|_yr.r�r�s  rr2z
X.__init__�r�rc��|jt|j�k\rt�|j|j}|xjdz
c_|Srr�r�s  rr�z
X.__next__�r�rN)r
rrr*r2r�r
rrr�r��s��&��rr�c��eZdZdZd�Zd�Zy)�NzIterator missing __next__()c� �||_d|_yr.r�r�s  rr2z
N.__init__�r�rc��|Srr
rs rr�z
N.__iter__�r�rNr�r
rrr�r��s��!��rr�c�"�eZdZdZd�Zd�Zd�Zy)�EzTest propagation of exceptionsc� �||_d|_yr.r�r�s  rr2z
E.__init__�r�rc��|Srr
rs rr�z
E.__iter__�r�rc��ddzy)Nr�rr
rs rr�z
E.__next__�s	��	�Q�rNr�r
rrr�r��s��$���rr�c�"�eZdZdZd�Zd�Zd�Zy)�SzTest immediate stopc��yrr
r�s  rr2z
S.__init__�s��rc��|Srr
rs rr�z
S.__iter__�r�rc��t�r)r�rs rr�z
S.__next__�s���rNr�r
rrr�r��s���
��rr�)�chainc�d�ttd�ttt	|�����S)z Test multiple tiers of iteratorsc��|Srr
)rns rrMzL.<locals>.<lambda>�s��ar)r�r�r�r�r�r�s r�Lr��s ����Z��2�a��g�;��0�1�1rc��eZdZd�Zd�Zd�Zy)�TestVariousIteratorArgsc���ttfD]�}ddtd�dtddd�fD]�}ttt
tttfD]D}|jt|||��t��t||�t����F|jt|t|��|jt|t|��|jt |t#|������y)	N�123rxr���dog333333�?���r�r�)rJrWr�r�r�r�r�r�r�rNrMr'rHrIr�r��ZeroDivisionErrorr�)r�consr?�gs    rr�z(TestVariousIteratorArgs.test_constructor�s����)�$�D��R��t��k�5��d�1�;M�N���Q��A�q�!�,�A��$�$�V�D��1��J�D�%A�6�!�A�$�TX�CY�Z�-��!�!�)�T�A�a�D�9��!�!�)�T�A�a�D�9��!�!�"3�T�A�a�D�A�O�%rc
��td�}ddtd�dtddd�d	fD�]*}|j|j|j|j
|jfD]�}tttttfD]k}||�}|||��}t|t�r|j||��<|jt|t �
�t|t �
���m|j#t$|t'|��|j#t$|t)|��|j#t*|t-|������-y)N�novemberr�rxr�r�r�r�r��decemberr�)rJr�rfr}r�r�r�r�r�r�r�r��
isinstance�boolrNrMr'rHrIr�r�r�r�)rr?r��methr�rPrOs       r�test_inline_methodsz+TestVariousIteratorArgs.test_inline_methods�s���
�O���B��d��[�%��T�!�:L�j�Y�D����!�.�.�!�,�,��@V�@V�XY�Xd�Xd�e���Q��A�q�)�A�#�D�z�H�!�!�D�'�]�F�!�(�D�1��(�(���:��(�(���D�)A�6�(�X\�C]�^�
*��!�!�)�T�1�Q�4�8��!�!�)�T�1�Q�4�8��!�!�"3�T�1�Q�4�@�f�Zrc
���ddtd�dtddd�dfD�]N}d	D�]E}ttttt
tfD]�}td
�}|j�}t||�t||���t||�||��|jt|t��t|t�����|jtttd
�|�t!|��|jtttd
�|�t#|��|jt$ttd
�|�t'|����H��Qy)Nr�rxr�r�r�r�r�r�)rXrarmr�januaryr�)r�r�r�r�r�r�r�rJr�r4rjrNrMr'rHrIr�r�r�r�)rr��methnamer�r?r�s      r�test_inplace_methodsz,TestVariousIteratorArgs.test_inplace_methods�s���B��d��[�%��T�!�:L�j�Y�D�Q���Q��A�q�!�,�A��I��A�����A�(�G�A�x�(��a��g��7�(�G�A�x�(��4��1��$�$�V�A�4�%8�&���:M�N�-��!�!�)�W�S��^�X�-N�PQ�RV�PW�X��!�!�)�W�S��^�X�-N�PQ�RV�PW�X��!�!�"3�W�S��^�X�5V�XY�Z^�X_�`�Q�ZrN)r
rrr�rrr
rrr�r��s��B�
A�
arr�c��eZdZd�Zd�Zy)�bad_eqc�J�trtj�t�||uSr)�be_bad�set2r8r�r s  rr"z
bad_eq.__eq__�s����J�J�L�#�#��u�}�rc��yr.r
rs rrzbad_eq.__hash__�rrN�r
rrr"rr
rrrr�s���
rrc��eZdZd�Zd�Zy)�bad_dict_clearc�>�trtj�||uSr)r�dict2r8r s  rr"zbad_dict_clear.__eq__�s����K�K�M��u�}�rc��yr.r
rs rrzbad_dict_clear.__hash__�rrNrr
rrr
r
�s���rr
c��eZdZd�Zd�Zd�Zy)�
TestWeirdBugsc��dat�h}td�D�chc]}t���c}ada|j	t
|jt�dat�h}t�diada|jt�ycc}w)NF�KT)
rrr�r	rHr�rXr
rr)r�set1rss   r�test_8420_set_mergez!TestWeirdBugs.test_8420_set_merges}������z��"'��)�,�)�Q���)�,�������+�T�[�[�$�?���� �!���!�4�(�����(�(��/��-s�Bc�(�ttd��}|j�|jtd��t	|�}|j�ttd��}|jtd��t|�y)Nr�)rJr�r8rXr�rj)rr?�sirGs    r�test_iter_and_mutatez"TestWeirdBugs.test_iter_and_mutates_����c�
�O��	���	�	����s���
�!�W��	���	���s����	����s����R�rc���G�fd�d�}t��td�D�chc]	}|���c}�dh}|j��ycc}w)Nc���eZdZd�Z�fd�Zy)�.TestWeirdBugs.test_merge_and_mutate.<locals>.Xc��td�Sr.)r5rs rrz7TestWeirdBugs.test_merge_and_mutate.<locals>.X.__hash__s���A�w�rc�&���j�y)NF)r8)r�or!s  �rr"z5TestWeirdBugs.test_merge_and_mutate.<locals>.X.__eq__s������
�rNr#)r!s�rr�rs
���
�
rr�r�r)rJr�rX)rr�rsr?r!s    @r�test_merge_and_mutatez#TestWeirdBugs.test_merge_and_mutatesG���	�	����#�B�i�(�i����i�(��
�C��	������)s�AN)r
rrrrr r
rrrrs��
0�	�rrc�$�eZdZdZdZdZd�Zd�Zy)�TestOperationsMutatingzRegression test for bpo-46615Nc�������G���fd�d��d�|j�fd�ttd��D���|j�fd�ttd��D���d���fS)Nc�"��eZdZ���fd�Zd�Zy)�<TestOperationsMutating.make_sets_of_bad_objects.<locals>.Badc����sytd�dk(r�j�td�dk(r�j�ttd��S)NF�rrE)rr8r�)rr!�enabledrr	s  ���rr"zCTestOperationsMutating.make_sets_of_bad_objects.<locals>.Bad.__eq__1sB���� ��R�=�A�%��J�J�L��R�=�A�%��J�J�L��I�a�L�)�)rc��td�Src)rrs rrzETestOperationsMutating.make_sets_of_bad_objects.<locals>.Bad.__hash__9s�� ��|�#rNr)r(rr	s���r�Badr%0s
���
*�
$rr*Fc3�,�K�|]}�����
y�wrr
�r��_r*s  �rr�zBTestOperationsMutating.make_sets_of_bad_objects.<locals>.<genexpr>=������ E�0D�1���0D�r��2c3�,�K�|]}�����
y�wrr
r,s  �rr�zBTestOperationsMutating.make_sets_of_bad_objects.<locals>.<genexpr>>r.r�T)�constructor1r�r�constructor2)rr*r(rr	s @@@@r�make_sets_of_bad_objectsz/TestOperationsMutating.make_sets_of_bad_objects/sa���
	$�
	$���� � � E��i��m�0D� E�E��� � � E��i��m�0D� E�E�����T�z�rc��td�D]}|j�\}}	|||��!y#t$r%}|jdt	|��Yd}~�Ld}~wwxYw)Nr�zchanged size during iteration)r�r3rrXri)r�functionr-rr	rGs      r�check_set_op_does_not_crashz2TestOperationsMutating.check_set_op_does_not_crashCs\���s��A��6�6�8�J�D�$�
G���t�$��� �
G��
�
�=�s�1�v�F�F��
G�s�	/�	A�A�A)r
rrr*r1r2r3r6r
rrr"r")s��'��L��L��(Grr"c�f�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zy)�TestBinaryOpsMutatingc�(�|jd��y)Nc��||k(Srr
�rGr|s  rrMz=TestBinaryOpsMutating.test_eq_with_mutation.<locals>.<lambda>P���a�1�fr�r6rs r�test_eq_with_mutationz+TestBinaryOpsMutating.test_eq_with_mutationO����(�(�)<�=rc�(�|jd��y)Nc��||k7Srr
r;s  rrMz=TestBinaryOpsMutating.test_ne_with_mutation.<locals>.<lambda>Sr<rr=rs r�test_ne_with_mutationz+TestBinaryOpsMutating.test_ne_with_mutationRr?rc�(�|jd��y)Nc��||kSrr
r;s  rrMz=TestBinaryOpsMutating.test_lt_with_mutation.<locals>.<lambda>V���a�!�err=rs r�test_lt_with_mutationz+TestBinaryOpsMutating.test_lt_with_mutationU����(�(�);�<rc�(�|jd��y)Nc��||kSrr
r;s  rrMz=TestBinaryOpsMutating.test_le_with_mutation.<locals>.<lambda>Yr<rr=rs r�test_le_with_mutationz+TestBinaryOpsMutating.test_le_with_mutationXr?rc�(�|jd��y)Nc��||kDSrr
r;s  rrMz=TestBinaryOpsMutating.test_gt_with_mutation.<locals>.<lambda>\rErr=rs r�test_gt_with_mutationz+TestBinaryOpsMutating.test_gt_with_mutation[rGrc�(�|jd��y)Nc��||k\Srr
r;s  rrMz=TestBinaryOpsMutating.test_ge_with_mutation.<locals>.<lambda>_r<rr=rs r�test_ge_with_mutationz+TestBinaryOpsMutating.test_ge_with_mutation^r?rc�(�|jd��y)Nc��||zSrr
r;s  rrMz>TestBinaryOpsMutating.test_and_with_mutation.<locals>.<lambda>brErr=rs r�test_and_with_mutationz,TestBinaryOpsMutating.test_and_with_mutationarGrc�(�|jd��y)Nc��||zSrr
r;s  rrMz=TestBinaryOpsMutating.test_or_with_mutation.<locals>.<lambda>erErr=rs r�test_or_with_mutationz+TestBinaryOpsMutating.test_or_with_mutationdrGrc�(�|jd��y)Nc��||z
Srr
r;s  rrMz>TestBinaryOpsMutating.test_sub_with_mutation.<locals>.<lambda>hrErr=rs r�test_sub_with_mutationz,TestBinaryOpsMutating.test_sub_with_mutationgrGrc�(�|jd��y)Nc��||zSrr
r;s  rrMz>TestBinaryOpsMutating.test_xor_with_mutation.<locals>.<lambda>krErr=rs r�test_xor_with_mutationz,TestBinaryOpsMutating.test_xor_with_mutationjrGrc�,�d�}|j|�y)Nc��||z}yrr
r;s  rr�z8TestBinaryOpsMutating.test_iadd_with_mutation.<locals>.fn���
��F�Arr=r�s  r�test_iadd_with_mutationz-TestBinaryOpsMutating.test_iadd_with_mutationm���	��(�(��+rc�,�d�}|j|�y)Nc��||z}yrr
r;s  rr�z7TestBinaryOpsMutating.test_ior_with_mutation.<locals>.fsr_rr=r�s  r�test_ior_with_mutationz,TestBinaryOpsMutating.test_ior_with_mutationrrarc�,�d�}|j|�y)Nc��||z}yrr
r;s  rr�z8TestBinaryOpsMutating.test_isub_with_mutation.<locals>.fxr_rr=r�s  r�test_isub_with_mutationz-TestBinaryOpsMutating.test_isub_with_mutationwrarc�,�d�}|j|�y)Nc��||z}yrr
r;s  rr�z8TestBinaryOpsMutating.test_ixor_with_mutation.<locals>.f}r_rr=r�s  r�test_ixor_with_mutationz-TestBinaryOpsMutating.test_ixor_with_mutation|rarc�|�d�}d�}d�}|j|�|j|�|j|�y)Nc� �|D]}�|D]}�yrr
�rGr|rnr�s    r�f1z>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f1�����������rc� �|D]}�|D]}�yrr
)rGr|r�rns    r�f2z>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f2�rorc�,�t||�D]\}}�yr)�ziprms    r�f3z>TestBinaryOpsMutating.test_iteration_with_mutation.<locals>.f3�s���A�q�	���1��"rr=)rrnrqrts    r�test_iteration_with_mutationz2TestBinaryOpsMutating.test_iteration_with_mutation�s=��	�
	�
	�	
�(�(��,��(�(��,��(�(��,rN)r
rrr>rBrFrJrMrPrSrVrYr\r`rdrgrjrur
rrr8r8MsM��>�>�=�>�=�>�=�=�=�=�,�
,�
,�
,�
-rr8c��eZdZeZeZy)�TestBinaryOpsMutating_Set_SetN�r
rrrJr1r2r
rrrwrw�����L��Lrrwc��eZdZeZeZy)�'TestBinaryOpsMutating_Subclass_SubclassN�r
rrr�r1r2r
rrr{r{�����L��Lrr{c��eZdZeZeZy)�"TestBinaryOpsMutating_Set_SubclassN�r
rrrJr1r�r2r
rrrr�����L��Lrrc��eZdZeZeZy)�"TestBinaryOpsMutating_Subclass_SetN�r
rrr�r1rJr2r
rrr�r������L��Lrr�c�N�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
y)
�TestMethodsMutatingc�B�|jtj�yr)r6rJr�rs r�test_issubset_with_mutationz/TestMethodsMutating.test_issubset_with_mutation�s���(�(����6rc�B�|jtj�yr)r6rJr�rs r�test_issuperset_with_mutationz1TestMethodsMutating.test_issuperset_with_mutation�����(�(����8rc�B�|jtj�yr)r6rJr}rs r�test_intersection_with_mutationz3TestMethodsMutating.test_intersection_with_mutation�s���(�(��)9�)9�:rc�B�|jtj�yr)r6rJrfrs r�test_union_with_mutationz,TestMethodsMutating.test_union_with_mutation�s���(�(����3rc�B�|jtj�yr)r6rJr�rs r�test_difference_with_mutationz1TestMethodsMutating.test_difference_with_mutation�r�rc�B�|jtj�yr)r6rJr�rs r�'test_symmetric_difference_with_mutationz;TestMethodsMutating.test_symmetric_difference_with_mutation�s���(�(��)A�)A�Brc�B�|jtj�yr)r6rJr�rs r�test_isdisjoint_with_mutationz1TestMethodsMutating.test_isdisjoint_with_mutation�r�rc�B�|jtj�yr)r6rJrmrs r�$test_difference_update_with_mutationz8TestMethodsMutating.test_difference_update_with_mutation�s���(�(��)>�)>�?rc�B�|jtj�yr)r6rJrars r�&test_intersection_update_with_mutationz:TestMethodsMutating.test_intersection_update_with_mutation�s���(�(��)@�)@�Arc�B�|jtj�yr)r6rJrrs r�.test_symmetric_difference_update_with_mutationzBTestMethodsMutating.test_symmetric_difference_update_with_mutation�s���(�(��)H�)H�Irc�B�|jtj�yr)r6rJrXrs r�test_update_with_mutationz-TestMethodsMutating.test_update_with_mutation�s���(�(����4rN)r
rrr�r�r�r�r�r�r�r�r�r�r�r
rrr�r��s=��7�9�;�4�9�C�9�@�B�J�5rr�c��eZdZeZeZy)�TestMethodsMutating_Set_SetNrxr
rrr�r��ryrr�c��eZdZeZeZy)�%TestMethodsMutating_Subclass_SubclassNr|r
rrr�r��r}rr�c��eZdZeZeZy)� TestMethodsMutating_Set_SubclassNr�r
rrr�r��r�rr�c��eZdZeZeZy)� TestMethodsMutating_Subclass_SetNr�r
rrr�r��r�rr�c�(�eZdZeZejZy)�TestMethodsMutating_Set_DictN)r
rrrJr1r@rAr2r
rrr�r��s���L��=�=�Lrr�c��eZdZeZeZy)�TestMethodsMutating_Set_ListN)r
rrrJr1rjr2r
rrr�r��s���L��Lrr�c#�K�t|�}	tt|�g�}t|�D]
}|��||z���y#t$rt���YywxYw�w)z-Generates all subsets of a set or sequence U.N)r�rWr�r�r�)�Urnr�s   rr�r��sX�����Q��A���t�A�w�i� ���!��A��G��a�%�K������k���s'�A�0A�A�A�A�A�Ac��t|�D�cgc]}t|g���}}ttt|��D��cgc] }|t|D�cgc]}||z��	c}�f��"c}}�Scc}wcc}wcc}}w)z!Graph of n-dimensional hypercube.)r�rWr@r�)r	rn�
singletonsr?s    r�cuber��s{��*/��(�3�(�Q�)�Q�C�.�(�J�3��"�5��8�,�.�,�Q��Y�Z�8�Z���!��Z�8�9�:�,�.�/�/��4��8��.s�A,�A6
�A1�
A6
�1A6
c	��i}|D]n}||D]d}||D�cgc]}||k7s�	t||g���}}||D�cgc]}||k7s�	t||g���}}t||z�|t||g�<�f�p|Scc}wcc}w)z�Graph, the vertices of which are edges of G,
    with two vertices being adjacent iff the corresponding
    edges share a vertex.)rW)r�r�rnr�r��nx�nys       r�	linegraphr��s���	�A�
���1��A�,-�a�D�;�D�q�A��F�)�Q�q�E�"�D�B�;�,-�a�D�;�D�q�A��F�)�Q�q�E�"�D�B�;�"+�B�r�E�"2�A�i��1������

�H��<��;s�
A8�A8�
A=�A=c��t�}|j�D]�\}}|D]�}||D]�}||k(r�	|||vr|jt|||g���.||D]j}||k(r�	|||vr|jt||||g���/||D]4}||k(s||k(r�|||vs�|jt|||||g���6�l������|S)zKReturn a set of faces in G.  Where a face is a set of vertices on that face)rJ�itemsr�rW)r�r�rF�edgesrH�v3�v4�v5s        r�facesr�s���	��A��W�W�Y�	��E��B���e����8����2��;��E�E�)�R��R�L�1�2���e����8�$���2��;��E�E�)�R��R��,<�"=�>�&'��e��#%��8�r�R�x�$,�#%��2��;�$%�E�E�)�R��R��R�4H�*I�$J�	',�
$�
���&
�Hrc��eZdZd�Zd�Zy)�
TestGraphsc��td�}t|�}|jt|�d�|j	�D]}|jt|�d��td�|j	�D��}|j||�t|�}|jt|�d�|D]}|jt|�d��y)Nr�r�c3�.K�|]
}|D]}|����y�wrr
)r�r�rPs   rr�z'TestGraphs.test_cube.<locals>.<genexpr>$s����A�z�e�5�a��5��z���r�rK)r�rJrNrSrr�)rr��	vertices1�edge�	vertices2�	cubefaces�faces       r�	test_cubezTestGraphs.test_cubes�����G����F�	�����Y���+��H�H�J�D����S��Y��*���A�q�x�x�z�A�A�	�����I�.��!�H�	�����Y���+��D����S��Y��*�rc��td�}t|�}|jt|�d�t	|�}|j�D]}|jt|�d��t	d�|j�D��}|j||�t
|�}tjt�}|D]}|t|�xxdz
cc<�|j|dd�|j|dd�|D]8}	|	}
|jt|
�d�|
D]}|j||���:y)	Nr��rKc3�.K�|]
}|D]}|����y�wrr
)r�r�r�s   rr�z0TestGraphs.test_cuboctahedron.<locals>.<genexpr>9s����W�.D�U�QV��D�QV�D�.D�r�rr�r�rE)r�r�rNrSrJrr�r��defaultdictr4rX)rr��
cuboctahedron�verticesr��
othervertices�	cubofaces�	facesizesr��vertexr��cubeverts            r�test_cuboctahedronzTestGraphs.test_cuboctahedron,s ��
��G��!�!��
�����]�+�R�0��}�%��"�)�)�+�E����S��Z��+�,��W�m�.B�.B�.D�W�W�
�����=�1��-�(�	��+�+�C�0�	��D��c�$�i� �A�%� ������1��q�)�����1��q�)�#�F��D����S��Y��*� ���
�
�h��*�!�$rN)r
rrr�r�r
rrr�r�s��
+�+rr��__main__)lr��testr�test.supportrrrrsr�r��randomrrr�r��collections.abcr��	Exceptionrrrr%r4r,r6�TestCaserrJr�r�r�rWr�r�r�rrr
r-rrWr]rirqrurr�r�r�r�r�r�r�rr&r:r>r@rCrErGr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr
rr"r8rwr{rr�r�r�r�r�r�r�r�r�r�r�r�r�r
�mainr
rr�<module>r�s`����(�	����
�%�����	�y�	���� � �
"�c�"�{E�{E�z	[3�l�H�-�-�[3�z	�#�	�!0�g�!0�HG+�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�	)�)�<��1B�1B�)���J�x�0�0�J�6	�H�%�%�	�E4�H�%�%�E4�RR0�H�%�%�R0�lF=��"�"�F=�T#3�#3�L�;��(9�(9���k�8�+<�+<���k�8�+<�+<����X�%6�%6���;��(9�(9��pJ�pJ�h%�1�8�3D�3D�%�$�.��0A�0A�$�%�2�H�4E�4E�%�$�/��1B�1B�$�$�0�(�2C�2C�$�$�3�X�5F�5F�$�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�HD-�2�D-�N�$9�8�;L�;L���.C�X�EV�EV���)>��@Q�@Q���)>��@Q�@Q��
!5�0�!5�H�"5�x�7H�7H���,?��AR�AR���':�H�<M�<M���':�H�<M�<M��!�#6��8I�8I�!��#6��8I�8I��	�/�

�
�4,+��"�"�,+�b�z���H�M�M�O�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists