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_descr.cpython-312.opt-1.pyc

�

'Μg���l�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZddlmZ	ddlZ	ddlZGd�de
j,�ZGd�de
j,�ZGd	�d
e
j,�ZGd�de
j,�ZGd
�de
j,�ZGd�de
j,�ZGd�de
j,�ZGd�de�ZGd�de
j,�Z e!dk(re
jD�yy#e$rdZY��wxYw#e$rdZY��wxYw)�N)�deepcopy)�redirect_stdout)�supportc�6�eZdZd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z	d�Z
d	�Zgfd
�Zd�Z
d�Zd
�Zd�Zej$d�ej(edud�d���Zej$d�ej(edud�d���Zd�Zy)�
OperatorsTestc�:�tjj|g|��i|��idd�dd�dd�dd�d	d
�dd�d
d
�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"d#d$��|_t	|jj��D]/\}}|j
�r|d%z}nd&|z}||j|<�1ddd'd(d)d*d+�|_t	|jj��D]/\}}|j
�r|d,z}nd-|z}||j|<�1y).N�add�+�sub�-�mul�*�matmul�@�truediv�/�floordivz//�divmod�powz**�lshiftz<<�rshiftz>>�and�&�xor�^�or�|�cmp�lt�<�le�<=�eq�==�!=�>�>=)�ne�gt�gez(a, b)za %s b�abs�~�int�float)�pos�negr+�invertr-r.z(a)z%s a)�unittest�TestCase�__init__�binops�list�items�islower�unops)�self�args�kwargs�name�exprs     �,/usr/local/lib/python3.12/test/test_descr.pyr4zOperatorsTest.__init__ s������"�"�4�9�$�9�&�9�
��3�
��3�
�
�3�
�
�c�	
�

�s�
�
��

�
�h�
�
�4�
�
�d�
�
�d�
�
�3�
�
�3�
�
�#�
�
�5�
�
�#�
� 
�$�!
�"
�$�#
�$���)
���.�t�{�{�0�0�2�3�J�D�$��|�|�~��h����$��� $�D�K�K���4�������

��
��t�z�z�/�/�1�2�J�D�$��|�|�~��e�|����}��#�D�J�J�t��3�c��d|i}|jt||�|�t|�}t||�}||jvr|j
d}||jvr�|jt|d|�|j|�|j||�|�t||�}|j|�|�y)N�ar�im_func��assertEqual�eval�type�getattr�__dict__�	__bases__)	r:rB�resr>�meth�d�t�m�bms	         r?�	unop_testzOperatorsTest.unop_testPs���
�!�H������d�A���,���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D�����1��s�#�
�Q��
�������s�#r@c��||d�}|jt||�|�t|�}t||�}||jvr|j
d}||jvr�|jt|d|�|j|�|j|||�|�t||�}	|j|	|�|�y)N�rB�brrCrD)
r:rBrTrKr>rLrMrNrOrPs
          r?�
binop_testzOperatorsTest.binop_test`s����!�������d�A���,���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D�����1�a��#�&�
�Q��
������A���$r@c	���|||d�}|jt||�|�t|�}t||�}	||jvr|j
d}||jvr�|jt|	d|	�|j|�|j|	|t
||��|�t||�}
|j|
t
||��|�y)N�rBrT�crrC)rErFrGrHrIrJ�slice)r:rBrTrXrKr>rLrMrNrOrPs           r?�sliceop_testzOperatorsTest.sliceop_testos����!�!�$������d�A���,���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D�����1�e�A�q�k�*�C�0�
�Q��
������E�!�Q�K��#�.r@c��t|�|d�}t||�|j|d|�t|�}t	||�}||j
vr|jd}||j
vr�|jt	|d|�|j
|�t|�|d<||d|�|j|d|�t|�|d<t	|d|�}	|	|�|j|d|�y)NrSrBrrC�r�execrErGrHrIrJ)
r:rBrTrK�stmtrLrMrNrOrPs
          r?�
setop_testzOperatorsTest.setop_test}s����1�+�A�&���T�1�
�����3���%���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D��!���#��	�!�C�&�!������3���%��!���#��
�Q�s�V�T�
"��
�1������3���%r@c��t|�||d�}t||�|j|d|�t|�}t	||�}	||j
vr|jd}||j
vr�|jt	|	d|	�|j
|�t|�|d<|	|d||�|j|d|�t|�|d<t	|d|�}
|
||�|j|d|�y)NrWrBrrCr\)r:rBrTrXrKr^rLrMrNrOrPs           r?�set2op_testzOperatorsTest.set2op_test�s����1�+�A�A�.���T�1�
�����3���%���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D��!���#��	�!�C�&�!�Q������3���%��!���#��
�Q�s�V�T�
"��
�1�a������3���%r@c�>�t|�|||d�}t||�|j|d|�t|�}	||	jvr|	j
d}	||	jvr�t
|	|�}
|jt
|
d|
�|	j|�t|�|d<|
|dt||�|�|j|d|�t|�|d<t
|d|�}|t||�|�|j|d|�y)N)rBrTrXrMrBrrC)rr]rErGrIrJrHrY)r:rBrTrXrMrKr^rL�
dictionaryrNrOrPs            r?�setsliceop_testzOperatorsTest.setsliceop_test�s
��#�A�;�Q�Q�Q�?�
��T�:������C��#�.���G���!�*�*�$����A��A��!�*�*�$��A�t���	
�����I�q�1�1�:�:�d�3C�D�"�1�+�
�3��	�*�S�/�5��A�;��*�����C��#�.�"�1�+�
�3��
�Z��_�d�
+��
�5��A�;�������C��#�.r@c	�V�|jdgdgddgdd�|jgd�dddd�|jgd�dd	dd�|jgd�ddd
d�|jgd�d	dddgdd�|jdgdgddgd
d�|jddgdgd�dd�|jgd�ddd�|jddgdgd�dd�|jddgdgd�dd�|j	ddgddddgdd�|jgd�ddddggd�dd�y) N���a+b�__add__�rfrg��b in a�__contains__�r�a[b]�__getitem__�a[b:c]�a+=b�__iadd__rk�rfrgrfrgrfrg�a*=b�__imul__�len(a)�__len__�a*b�__mul__�b*a�__rmul__�a[b]=c�__setitem__�rfrgrkrn���rfr�r�rn�a[b:c]=d)rUrZr_rQrard�r:s r?�
test_listszOperatorsTest.test_lists�s/��	
�����a�S�1�Q�%��	�:������A�x��@������A�x��@������A�v�}�=����'�1�a�!�A���-�H������a�S�1�Q�%���<�����1��q�-���D����w��8�Y�7�����1��q�-��	�B�����1��q�-��
�C����!�A���1�q��e�X�}�E����Y��1�q��e�Y�
�%�	'r@c	�f�|jddd�dddd�|jddd�dddd�|jddd�dddd	�ddd�}g}t|j��D]}|j|��g}t	|�D]}|j|��|j||�g}|j
�D]}|j|��|j||�g}tj
|�D]}|j|��|j||�ddd�}|j|dd
d�|jtt|�i�|�|jt|j�i�|�|jddd�dddddd
�dd�y)Nrgrn�rfrkrfrlrmrrorprwrxrkrjr}r~)
rUr6�keys�append�iterrE�__iter__�dictrQrF�repr�__repr__ra)r:rM�l1�i�ls     r?�
test_dictszOperatorsTest.test_dicts�s������1�q�	�1�a��>�B����1�q�	�1�a��>�B����1�q�	�1�a���?��A�J��
���a�f�f�h��A��I�I�a�L� ����a��A�
�H�H�Q�K������B��������A�
�H�H�Q�K������B�������q�!�A�
�H�H�Q�K�"�����B���A�J�����q�!�X�y�1�����d�1�g�r�*�A�.�����a�j�j�l�B�/��3����A���A�q�Q��Q�-��%�	'r@c��||d�}|jj�D]=\}}||vs�d|z}t||�s�t||�}|j	|||||��?t|jj��D]<\}}||vs�d|z}t||�s�t||�}|j||||��>y)NrSz__%s__)r5r7�hasattrrFrUr6r9rQ)r:rBrT�skipr�r=r>rKs        r?�number_operatorszOperatorsTest.number_operators�s����Q����+�+�+�+�-�J�D�$��4���$����1�d�#��t�T�*�C��O�O�A�q�#�t�T�:�.��t�z�z�/�/�1�2�J�D�$��4���$����1�d�#��t�T�*�C��N�N�1�c�4��6�3r@c�L�|jdd�|jdj�d�|jdj�d�Gd�dt�}|j|d�d�	|�dz|j	d	�y#t
$rYywxYw)
N�drkrfrc��eZdZd�Zy)�"OperatorsTest.test_ints.<locals>.Cc��tS�N��NotImplemented�r:�others  r?riz*OperatorsTest.test_ints.<locals>.C.__add__����%�%r@N)�__name__�
__module__�__qualname__ri�r@r?�Cr�����
&r@r�r��z+NotImplemented should have caused TypeError)r�rE�__bool__r-�fail�	TypeError�r:r�s  r?�	test_intszOperatorsTest.test_ints�s������c�1�%����!�����+����!�����+�	&��	&�	
����1��q�!�	E�
�C�"�H�
�I�I�C�D���	��	�s�;
B�	B#�"B#c�(�|jdd�y)NgY@�@)r�r�s r?�test_floatszOperatorsTest.test_floatss�����e�S�)r@c���|jddgd���Gd�dt�}|dd�	�}|jt|�d
�|j|jd�||d�	�}|jt|�d�|j|jd�|d
�}|jt|�d�|j|jd�y)NyY@�@)	rr!r)r*r-r.rr�mod)r�c�"�eZdZdgZd�Zd�ZeZy)�,OperatorsTest.test_complexes.<locals>.Number�precc�`�tj|g|���}|jdd�|_|S)Nr��)�complex�__new__�getr�)�clsr;�kwds�results    r?r�z4OperatorsTest.test_complexes.<locals>.Number.__new__s,�� ����4�t�4��"�h�h�v�r�2����
r@c���|j}|jdk(rd||jfzS|jdk(rd||jfzSd||j||jfzS)N��%.*gz%.*gjz(%.*g+%.*gj))r��imag�real)r:r�s  r?r�z5OperatorsTest.test_complexes.<locals>.Number.__repr__sg���y�y���9�9��#�!�T�4�9�9�$5�5�5��9�9��#�"�d�D�I�I�%6�6�6�%��t�y�y�$��	�	�(J�J�Jr@N)r�r�r��	__slots__r�r��__str__r�r@r?�Numberr�s����I�
�
K��Gr@r�g��Q�	@r��r�z3.14rgz3.1gPm@z234.5r�)r�r�rEr�r�)r:r�rBs   r?�test_complexeszOperatorsTest.test_complexess������f�d�2O��	P�
	�W�
	�
�4�a� ������a��&�)��������#��1�1�������a��%�(��������#��5�M������a��'�*��������$r@c��|jtjdd�tdd��|jtj	dd�d�y)Nr�g@r�rfg�)rEr��__radd__r.�__rsub__r�s r?�test_explicit_reverse_methodsz+OperatorsTest.test_explicit_reverse_methods-sA������)�)�"�c�2�G�C��4E�F��������Q�/��6r@�"the module 'xxsubtype' is internalN�requires xxsubtype modulec
�:�ddl}ddl}d%d�}||j|j<|j	|dg�|dg�|ddg�dd�|j	|gd��dddd	�|j	|gd��d
ddd	�|j	|gd��dddd�|j|gd��dd|ddg�d
d�|j
|dg�|dg�|ddg�dd�|j
|ddg�d|gd��dd�|j|gd��ddd�|j	|ddg�d|gd��dd�|j	|ddg�d|gd��dd�|j|ddg�dd|ddg�dd�|j|gd��dd|ddg�|gd��d d�Gd!�d"|j�}|�}|j|g�|j|j�d�|jd#�|j|d#g�|j|j�d�|jd$�|j|j�d$�y)&Nrc�,�ddl}|j|�S�Nr)�	xxsubtype�spamlist)r��memo�spams   r?r�z/OperatorsTest.test_spam_lists.<locals>.spamlist8s��$��=�=��#�#r@rfrgrhrirjrlrmrnrorprqrrrsrkrtrurvrwrxryrzr{r|r}r~rr�r�r�r�c��eZdZd�Zy)�(OperatorsTest.test_spam_lists.<locals>.Cc��y�Nrfr�r�s r?�fooz,OperatorsTest.test_spam_lists.<locals>.C.fooU���!r@N�r�r�r�r�r�r@r?r�r�T���#r@r�r��*r�)�copyr��_deepcopy_dispatchr�rUrZr_rQrardrEr�r��getstate�setstate)r:r�r�r�r�rBs      r?�test_spam_listszOperatorsTest.test_spam_lists2sZ��	'�	$�
2:�����
�
�.�����!��
�x���}�h��!�u�o�u� �	"������)�1�a��>�J������)�1�a��>�J������)�1�a���G����(�7�+�Q��8�Q�q�E�?�H�'�	)�����!��
�x���}�h��!�u�o�v�"�	$�����!�A����H�]�,C�V�"�	$����x��(�!�X�y�A�����!�A����H�]�,C�U�!�	#�����!�A����H�]�,C�U�"�	$�����1�Q�%��!�Q��!�A����&�	(����X�i�0�!�Q��!�A���%�i�0�*�m�	M�	$��
�
�	$�
�C������B���������!�$�	����
�����S�E�"��������q�)�	�
�
�2���������r�*r@c��ddl}ddl}dd�}||j|j<|j	|ddd��dddd�|j	|ddd��dddd�|j	|ddd��ddd	d
�|ddd��}g}t|j
��D]}|j|��g}t|�D]}|j|��|j||�g}|j�D]}|j|��|j||�g}t|i��j|�D]}|j|��|j||�ddd�}||�}	|j|	ddd�|j|	t|�d
d�|j|ddd��dd|dddd��dd�Gd�d|j�}
|
�}|jt|j��g�|j|j!�d�d|d<|jt|j��dg�|j|j#�d�|j%d�|j|j#�d�y)Nrc�z�ddl}|j�}t|j��D]
\}}|||<�|Sr�)r��spamdictr6r7)rMr�r��sd�k�vs      r?r�z/OperatorsTest.test_spam_dicts.<locals>.spamdictds6��$�����B��Q�W�W�Y����1���1��(��Ir@rgrnr�rfrlrmrorprwrxzrepr(a)r�rkrjr}r~c��eZdZd�Zy)�(OperatorsTest.test_spam_dicts.<locals>.Cc��yr�r�r�s r?r�z,OperatorsTest.test_spam_dicts.<locals>.C.foo�r�r@Nr�r�r@r?r�r��r�r@r��barr��r�r�r�r�)r�r�r�r�rUr6r�r�r�rEr�rGrQr�rar7r�r�r�)r:r�r�r�rMr�r�r��	straightd�spamdr�rBs            r?�test_spam_dictszOperatorsTest.test_spam_dicts_sU��	'�	�2:�����
�
�.�����A���+�Q��8�^�L�����A���+�Q��8�^�L�����A���+�Q��6�=�I���A�Y���
���a�f�f�h��A��I�I�a�L� ����a��A�
�H�H�Q�K������B��������A�
�H�H�Q�K������B�����h�r�l�#�,�,�Q�/�A�
�H�H�Q�K�0�����B���A�J�	���#�����u�a��9�5����u�d�9�o�y�*�E�����Q��)�,�a��H��A��]�4K��]�	,�	$��
�
�	$�
�C������a�g�g�i��"�-��������!�$���%������a�g�g�i��>�*:�;��������q�)�	�
�
�3���������s�+r@c��|jttj�j	�tj�yr�)rE�range�sys�maxsizerxr�s r?�test_wrap_lenfunc_bad_castz(OperatorsTest.test_wrap_lenfunc_bad_cast�s(������s�{�{�+�3�3�5�s�{�{�Cr@)rwrx)rhri)rqrp)rrrs)r}r~)r�r~)r�r�r�r4rQrUrZr_rardr�r�r�r�r�r�r�r�impl_detailr2�skipIfr�r�r�r�r�r@r?rrs���.$�`$� 
%�/�&�&&�&/�&'�"'�<+-�7�"E�$*�%�B7�
�W���=�>��X�_�_�Y�$�&�(C�D�)+�E�?�)+�V�W���=�>��X�_�_�Y�$�&�(C�D�/,�E�?�/,�bDr@rc�`��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z�fd�Zej2d��Zej6d�ej:edud�d���Zd�Z ej2d��Z!ej6d�ej:edud�d���Z"d�Z#d�Z$d �Z%ejLd!��Z'd"�Z(ejLd#��Z)d$�Z*d%�Z+d&�Z,d'�Z-ej6d(�d)��Z.d*�Z/d+�Z0d,�Z1d-�Z2ej:e3jhjjd.k\d/�d0��Z6ejnd1��Z8d2�Z9d3�Z:d4�Z;�fd5�Z<d6�Z=d7�Z>d8�Z?d9�Z@d:�ZAd;�ZBd<�ZCd=�ZDd>�ZEd?�ZFd@�ZGdA�ZHdB�ZIdC�ZJdD�ZKdE�ZLdF�ZMdG�ZNdH�ZOdI�ZPdJ�ZQdK�ZRdL�ZSdM�ZTdN�ZUdO�ZVdP�ZWdQ�ZXdR�ZYdS�ZZdT�Z[dU�Z\dV�Z]dW�Z^dX�Z_dY�Z`dZ�Zad[�Zbd\�Zcd]�Zdd^�Zeej6d_�d`��Zfda�Zgdb�Zhdc�Zidd�Zjde�Zkdf�Zlej�dg�dh��Zndi�Zodj�Zpdk�Zqdl�Zrdm�Zsdn�Ztdo�Zudp�Zvdq�Zwdr�Zxds�Zydt�Zzdu�Z{dv�Z|dw�Z}dx�Z~dy�Zdz�Z�d{�Z�d|�Z�d}�Z�d~�Z�d�Z�d��Z�d��Z��fd��Z�ej:e�dud��d���Z�d��Z�d��Z��xZ�S)��ClassPropertiesAndMethodsc�F�|jt||�|�d|���y)Nz has no attribute )�
assertTruer��r:�objr=s   r?�
assertHasAttrz'ClassPropertiesAndMethods.assertHasAttr�s �������T�*�47��>�	@r@c�F�|jt||�|�d|���y)Nz has unexpected attribute )�assertFalser�r�s   r?�assertNotHasAttrz*ClassPropertiesAndMethods.assertNotHasAttr�s"�������d�+�=@�$�G�	Ir@c����jttt���jit�t�}�j	|i��j|jt��j|t�G�fd�dt�}�jt|t��|d�}�j	|jd�|dd��}�j	|ddk(xr|dd�|�}�j	|jd	��j	|j�d	�|jd
��j	|jd
��j	|j�d
�|jd��j	|jd��j	|j�d��j	|dd
�d
|d<�j	|dd
�d}t|�D]'}|�||<t|�D]
}||z|||<��)t|�D]-}t|�D]}�j	|||||z���/y)Nc�8��eZdZdZ�fd�Zd�Z�fd�Zd�Zd�Zy)�6ClassPropertiesAndMethods.test_python_dicts.<locals>.C���c���|r%�jt|�d�|d|_|r't|j	��D]
\}}|||<�yy�Nrfr)rE�len�stater6r7)�
self_localrB�kwr�r�r:s     �r?r4z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.__init__�sP�����$�$�S��V�Q�/�'(��t�J�$�� $�R�X�X�Z� 0���1�()�
�1�
�!1�r@c�&�|j|d�Sr�)r��r:�keys  r?rpzBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__getitem__�s���x�x��Q�'�'r@c�`���j|t�tj|||�yr�)�assertIsInstancer-r�r~)rr�valuer:s   �r?r~zBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__setitem__�s%����%�%�c�3�/�� � ��S�%�8r@c��||_yr��r
�r:r
s  r?r�z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.setstate��	��"��
r@c��|jSr�rr�s r?r�z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.getstate�����z�z�!r@N)	r�r�r�r
r4rpr~r�r�r�s�r?r�r�s!����E�
*�
(�
9�
#�
"r@r�r�rfrgr�r�r�rr�
r���2)r��
issubclassr�rrE�assertIs�	__class__r
r�r�r�)	r:rMr��a1�a2rB�Nr��js	`        r?�test_python_dictsz+ClassPropertiesAndMethods.test_python_dicts�s������
�4��.�/����b�$�'��F������B���
�
�a�k�k�4�(����a��&�	"��	"�$	
���
�1�d�+�,�
�r�U��������2�&�
�1�!�_������A��%��1�B�q�E�5�9�
�C��������"�%��������r�*�	�
�
�1�
�������!�$��������q�)�	�
�
�2��������"�%��������r�*�����2���"���"������2���#����q��A��3�A�a�D��1�X���A�#��!��Q�����q��A��1�X��� � ��1��a��!�A�#�.��r@c��Gd�dt�}|�}|jgd��|j|dd�|j|dd�|j|dd	�|j|dd
d�y)Nc��eZdZd�Zy)�6ClassPropertiesAndMethods.test_python_lists.<locals>.Cc��t|t�r|j|jfStj||�dzS�Nr�)�
isinstancerY�start�stopr6rp�r:r�s  r?rpzBClassPropertiesAndMethods.test_python_lists.<locals>.C.__getitem__�s6���a��'��7�7�A�F�F�?�*��'�'��a�0�3�6�6r@N�r�r�r�rpr�r@r?r�r&�s��
7r@r��rrfrgrr�rf�erg�f��)r�r1)r6�extendrE�r:r�rBs   r?�test_python_listsz+ClassPropertiesAndMethods.test_python_lists�su��	7��	7�

�C��	���������1��s�#�����1��s�#�����1��s�#�����3�s��Y�/r@c���������Gd�dt��}|�}|j|j�d�|jd�|j|j�d�Gd�dt�}Gd�d	|��}|j|j	�|�|�}|j|j
|�Gd
�dt�}Gd�d|��}|j|jd
�|�}|j|jd
�Gd�dt��G�fd�dt�}Gd�d|��}|j|jd�|j|jd�|jd|j�|�}|j|j�d�G�fd�dt��Gd�d���}	Gd�d|	�}
Gd�d|	�}Gd�d	||
�}|j|�j�d�Gd�d |
|�}|j|�j�d!�G�fd"�d#t��Gd$�d���}	|	�}|j|d%�d&|_|j|jd&�|j|j d'�Gd(�d)���}Gd*�d|��}	Gd+�d|	�}
Gd,�d|	�}Gd-�d	||
�}|j|�jd�G�fd.�d/t��Gd0�d���}|j�j"d
�|�}|jt|�|�|j�j"d
�Gd1�dt�}|�}|�|j%d2�Gd3�dt�}	Gd4�dt�}
Gd5�dt|	��}Gd6�d	|
|�}|j)|	t|��g�G�fd7�d8t�}
G�fd9�d:|
�}Gd;�d|
��}	|jd8g���j+�Gd<�d|��}
|jd:d8g���j+�Gd=�d|	|
�}|jd:d8g���j+�|jd>|j,�Gd?�d@|
|	�}|jd:d8g���j+�|jd>|j,�GdA�d	|t��}|jd:d8g���j+�|jd>|j,�GdB�d ||
��}|jd:d8g���j+�|jd>|j,�t���fdC�}GdD�dE|��}GdF�dGt|��}GdH�dI||��}|j)�|�|j)�|�|j)�|�g�G��fdJ�dK�}G��fdL�dM|�}GdN�d|��}	|j)|t|	��|jdKg���j+�|jdKg���j+�GdO�d|��}
|j)|t|
��|jdMdKg���j+�|jdMdKg���j+�GdP�d|	|
�}|j)|t|��|jdMdKg���j+�|jdMdKg���j+�GdQ�d@|
|	�}|j)|t|��|jdMdKg���j+�|jdMdKg���j+�|j/t&�5GdR�d	|t��}ddd�GdS�d ||��}|j)|t|��|jdMdKg���j+�|jdMdKg���j+�GdT�dUt�|�}|j)|t|��|jdMdKg���j+�|jdMdKg���j+�GdV�dW|t��}|j)|t|��|jdMdKg���j+�|jdMdKg���j+�|j/t&�5GdX�dE|t1��}ddd�|j/t&�5GdY�dEt1�|�}ddd�y#t&$rY��OwxYw#1swY���xYw#1swY�YxYw#1swYyxYw)ZNc��eZdZd�Zd�Zd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Cc��d|_yr���	_C__stater�s r?r4z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.__init__��	�� ��r@c��|jSr�r9r�s r?r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.getstate�����|�|�#r@c��||_yr�r9rs  r?r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.setstate��	��$��r@N�r�r�r�r4r�r�r�r@r?r�r7����
!�
$�
%r@r���	metaclassrrc��eZdZd�Zy)�<ClassPropertiesAndMethods.test_metaclass.<locals>._metaclassc��|Sr�r��r�s r?�myselfzCClassPropertiesAndMethods.test_metaclass.<locals>._metaclass.myself�s��C�Zr@N)r�r�r�rHr�r@r?�
_metaclassrE�s��'r@rIc��eZdZy��3ClassPropertiesAndMethods.test_metaclass.<locals>.DN�r�r�r�r�r@r?�DrL����r@rNc��eZdZd�Zy)�4ClassPropertiesAndMethods.test_metaclass.<locals>.M1c�<�d|d<tj||||�S)Nrf�__spam__�rGr�)r�r=�basesr�s    r?r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.M1.__new__�s!��#$��Z� ��|�|�C��u�d�;�;r@N�r�r�r�r�r�r@r?�M1rQ�s��
<r@rWc��eZdZy�r7NrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rOr@rfc��eZdZy)�;ClassPropertiesAndMethods.test_metaclass.<locals>._instanceNrMr�r@r?�	_instancer[rOr@r\c�(��eZdZed��Z�fd�Zy)�4ClassPropertiesAndMethods.test_metaclass.<locals>.M2c�Z�tj|�}||_||_||_|Sr�)�objectr�r=rUr�)r�r=rUr�r:s     r?r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__new__s*���~�~�c�*�� ��	�"��
� ��	��r@c	�����}|jD]>}|jd�r�t|||j|j||���@|S)N�__)r��
startswith�setattr�__get__)r:�itrr\s   �r?�__call__z=ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__call__
sO����[���9�9�C��~�~�d�+� ��B��T�Y�Y�s�^�%;�%;�B��%E�F�%��	r@N)r�r�r��staticmethodr�rg)r\s�r?�M2r^s���
�
��
�
r@ric��eZdZd�Zy)r7c��y�Nr�r�r�s r?r�z8ClassPropertiesAndMethods.test_metaclass.<locals>.C.spam���r@N�r�r�r�r�r�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C���
r@r�r�r�c�"���eZdZ��fd�Z�xZS)�;ClassPropertiesAndMethods.test_metaclass.<locals>.autosuperc���t�|�||||�}|dddk(r|dd}|dddk(r�|rd|z}nd}t||t|��|S)Nrf�_z
_%s__super�__super)�superr�rd)rCr=rUr�r�r�	autosupers     ��r?r�zCClassPropertiesAndMethods.test_metaclass.<locals>.autosuper.__new__ sn����I�y�9�)�:>��t�M���2�A�h�#�o����8�D��2�A�h�#�o��'�$�.�D�$�D���T�5��:�.��
r@�r�r�r�r��
__classcell__)rrvs@�r?rvrqs
���
�
r@rvc��eZdZd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Ac��y�N�Ar�r�s r?rLz8ClassPropertiesAndMethods.test_metaclass.<locals>.A.meth-���r@N�r�r�r�rLr�r@r?r}rz,���
r@r}c��eZdZd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Bc�<�d|jj�zS�N�B��	_B__superrLr�s r?rLz8ClassPropertiesAndMethods.test_metaclass.<locals>.B.meth0����T�\�\�.�.�0�0�0r@Nrr�r@r?r�r�/���
1r@r�c��eZdZd�Zy)r7c�<�d|jj�zS�Nr���	_C__superrLr�s r?rLz8ClassPropertiesAndMethods.test_metaclass.<locals>.C.meth3r�r@Nrr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C2r�r@c��eZdZd�Zy)rLc�<�d|jj�zS�NrN)�	_D__superrLr�s r?rLz8ClassPropertiesAndMethods.test_metaclass.<locals>.D.meth6r�r@Nrr�r@r?rNz3ClassPropertiesAndMethods.test_metaclass.<locals>.D5r�r@�DCBAc��eZdZd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Ec�<�d|jj�zS)N�E)�	_E__superrLr�s r?rLz8ClassPropertiesAndMethods.test_metaclass.<locals>.E.meth:r�r@Nrr�r@r?r�r�9r�r@r��EBCAc�"���eZdZ��fd�Z�xZS)�>ClassPropertiesAndMethods.test_metaclass.<locals>.autopropertyc���i}|j�D]o\}}|jd�r$|dd}|j|d�\}}|}||f||<�;|jd�s�M|dd}|j|d�\}}|}||f||<�q|j�D]\}\}}t||�||<�t�
|�||||�S)N�_get_r��NN�_set_)r7rcr��propertyrur�)rCr=rUr��hitsr�valr��setr�autopropertys         ��r?r�zFClassPropertiesAndMethods.test_metaclass.<locals>.autoproperty.__new__As������ $�
�
��H�C���~�~�g�.�!�!�"�g��#'�8�8�C��#>���S�!��$'��H��S�	�����0�!�!�"�g��#'�8�8�C��#>���S�!��$'��H��S�	�!-�(,�z�z�|�O�C��#�s� (��c� 2�D��I�(4��\�9�=�i�<@�%��O�Or@rw)rr�s@�r?r�r�>s���
O�
Or@r�c��eZdZd�Zd�Zy)rzc��|jSr���_A__xr�s r?�_get_xz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xSs�����y� r@c��||_yr�r��r:�xs  r?�_set_xz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._set_xUs���2��r@N)r�r�r�r�r�r�r@r?r}z3ClassPropertiesAndMethods.test_metaclass.<locals>.ARs��
!�
r@r�r�i�c��eZdZy)�@ClassPropertiesAndMethods.test_metaclass.<locals>.multimetaclassNrMr�r@r?�multimetaclassr�]���r@r�c��eZdZd�Zy)rzc��yr|r�r�s r?r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xar~r@N�r�r�r�r�r�r@r?r}z3ClassPropertiesAndMethods.test_metaclass.<locals>.A`r�r@c��eZdZd�Zy)r�c�<�d|jj�zSr�)r�r�r�s r?r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.B._get_xd����T�\�\�0�0�2�2�2r@Nr�r�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.Bc���
3r@c��eZdZd�Zy)r7c�<�d|jj�zSr�)r�r�r�s r?r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.C._get_xgr�r@Nr�r�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.Cfr�r@c��eZdZd�Zy)rLc�<�d|jj�zSr�)r�r�r�s r?r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.D._get_xjr�r@Nr�r�r@r?rNz3ClassPropertiesAndMethods.test_metaclass.<locals>.Dir�r@c���eZdZdZ�fd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Trc�0���xjdz
c_yr���counter)r:r;�Ts  �r?r4z<ClassPropertiesAndMethods.test_metaclass.<locals>.T.__init__qs����	�	�Q��	r@N)r�r�r�r�r4)r�s�r?r�r�os
����G�
r@r�c��eZdZyrYrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.CsrOr@c��eZdZyrYrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.Cz��r@z5calling object w/o call method should raise TypeErrorc��eZdZd�Zy)rzc�,�tj|i|��Sr�rT�r;r<s  r?r�z;ClassPropertiesAndMethods.test_metaclass.<locals>.A.__new__�s���|�|�T�4�V�4�4r@NrVr�r@r?r}z3ClassPropertiesAndMethods.test_metaclass.<locals>.A����
5r@c��eZdZy�r�NrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.B�rOr@c��eZdZyrYrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rOr@c��eZdZyrKrMr�r@r?rNz3ClassPropertiesAndMethods.test_metaclass.<locals>.D�rOr@c�<���eZdZe��fd��Zed��Z�xZS)�7ClassPropertiesAndMethods.test_metaclass.<locals>.AMetac�J���jd�t�|�	||||�S)N�AMeta�r�rur���mclsr=rU�nsr�	new_callss    ��r?r�z?ClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__new__��&���� � ��)��w��t�T�5�"�=�=r@c��iSr�r�)r�r=rUs   r?�__prepare__zCClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__prepare__�s���	r@�r�r�r�rhr��classmethodr�rx�rr�s@�r?r�r��s)���
�
>��
>��
��
r@r�c�@���eZdZe��fd��Ze�fd��Z�xZS)�7ClassPropertiesAndMethods.test_metaclass.<locals>.BMetac�J���jd�t�|�	||||�S)N�BMetar�r�s    ��r?r�z?ClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__new__�r�r@c�2��t�|�||�}d|d<|S)NT�BMeta_was_here)rur�)r�r=rUr�rs    �r?r�zCClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__prepare__�s$����W�(��u�5��'+��#�$��	r@r�r�s@�r?r�r��s)���
�
>��
>��
��
r@r�c��eZdZy�rzNrMr�r@r?r}z3ClassPropertiesAndMethods.test_metaclass.<locals>.A�rOr@c��eZdZyr�rMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.B�rOr@c��eZdZyrYrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rOr@r�c��eZdZy��4ClassPropertiesAndMethods.test_metaclass.<locals>.C2NrMr�r@r?�C2r��rOr@r�c��eZdZyrKrMr�r@r?rNz3ClassPropertiesAndMethods.test_metaclass.<locals>.D�rOr@c��eZdZy�r�NrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.E�rOr@c����Sr�r�)r;r<�markers  �r?�funcz6ClassPropertiesAndMethods.test_metaclass.<locals>.func�s����Mr@c��eZdZy��3ClassPropertiesAndMethods.test_metaclass.<locals>.XNrMr�r@r?�Xr��rOr@r�c��eZdZy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.YNrMr�r@r?�Yr��rOr@r�c��eZdZy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.ZNrMr�r@r?�Zr��rOr@r�c�6���eZdZ��fd�Ze�fd��Z�xZS)�:ClassPropertiesAndMethods.test_metaclass.<locals>.ANotMetac�D���jd�t�|�	|�S�N�ANotMetar��r�r;r<rr�s   ��r?r�zBClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__new__�� ���� � ��,��w��t�,�,r@c�*���jd�iSr��r�)r�r=rU�
prepare_callss   �r?r�zFClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__prepare__�s����$�$�Z�0��	r@�r�r�r�r�r�r�rx�rr�rs@��r?r�r��s���
-��
��
r@r�c�8���eZdZ��fd�Ze��fd��Z�xZS)�:ClassPropertiesAndMethods.test_metaclass.<locals>.BNotMetac�D���jd�t�|�	|�S�N�BNotMetar�rs   ��r?r�zBClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__new__�rr@c�F���jd�t�|�	||�Sr
)r�rur�)r�r=rUrrs   ��r?r�zFClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__prepare__�s#����$�$�Z�0��w�*�4��7�7r@rrs@��r?rr�s���
-��
8��
8r@rc��eZdZyr�rMr�r@r?r}z3ClassPropertiesAndMethods.test_metaclass.<locals>.A�rOr@c��eZdZyr�rMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.B�rOr@c��eZdZyrYrMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.CrOr@c��eZdZyr�rMr�r@r?r�z4ClassPropertiesAndMethods.test_metaclass.<locals>.C2	rOr@c��eZdZyrKrMr�r@r?rNz3ClassPropertiesAndMethods.test_metaclass.<locals>.D���r@c��eZdZyr�rMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.ErOr@c��eZdZy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.FNrMr�r@r?�FrrOr@rc��eZdZy)�4ClassPropertiesAndMethods.test_metaclass.<locals>.F2NrMr�r@r?�F2r'rOr@rc��eZdZyr�rMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.X2rr@c��eZdZyr�rMr�r@r?r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.X5rr@)rGrEr�r�rHrrSr`r=rU�assertInr�r�rLrr�r�r�r�r�r�clearrI�assertRaisesr-)r:r�rBrIrNrMrWrXrir}r�r�r�r�r�r�r�r�r�r�r�rrrr�r\r�rvr�r�rs                        @@@@@@@r?�test_metaclassz(ClassPropertiesAndMethods.test_metaclass�s����	%�$�	%�
�C���������q�)�	�
�
�2���������r�*�	(��	(�	�*�	��������Q�'�
�C��������a�(�	<��	<�	�"�	�������Q�'�
�C��������Q�'�	��	�	��	� 	�"�	�	
�������%�������"�%��
�
�f�a�f�f�%�
�C���������2�&�	��	�	�)�	�	1��	1�	1��	1�	1��1�	1�	
��������V�,�	1��1�	1�	
��������V�,�	O�4�	O�(	�,�	�

�C�����a��%����������b�!�������#�&�	�\�9�	�	�.�	�	3��	3�	3��	3�	3��1�	3�	
��������'�	��	�	�!�	�������A�&�
�C������a��!�$�������A�&����
�C��
�S��i�i�$�%�	5��	5�	��	�	��!�	�	��1�	��
�
�a��a��!��	�	�D�	�		�E�		�	�%�	����'��I�.�����	�%�	�	
���'�7�+�Y�7�����	��1�	�	
���'�7�+�Y�7������
�
�&��
�
�3�	��A�	����'�7�+�Y�7������
�
�&����4�	��T�	����'�7�+�Y�7������
�
�&��
�
�3�	��U�	����'�7�+�Y�7������
�
�&��
�
�3����	�	�$�	�	��$�	�	��T�	��
�
�f�a� ��
�
�f�a� ��
�
�f�a� ��
�	�	�	8�x�	8�	�(�	��
�
�h��Q��(����*��}�5��������*��y�1�����	�(�	��
�
�h��Q��(����*�j�1�=�A��������*�j�1�9�=�����	��1�	��
�
�h��Q��(����*�j�1�9�=��������*�j�1�=�A�����	��A�	��
�
�h��R��)����*�j�1�9�=��������*�j�1�=�A������
�
�y�
)�
�A��
�*�	��X�	��
�
�h��Q��(����*�j�1�9�=��������*�j�1�=�A�����	���!�	��
�
�h��Q��(����*�j�1�9�=��������*�j�1�=�A�����	��F�H�	��
�
�h��R��)����*�j�1�9�=��������*�j�1�=�A������
�
�y�
)�
�A�s�u�
�*��
�
�y�
)�
�C�E�1�
�*�
)��o��$���l*�
)��<*�
)��*�
)�s6�h�?h,�h9�>i�	h)�(h)�,h6�9i�ic���	�
�g�
tt��	G�	�
fd�d�	�}|d�}d|_|j}|`|j�
gd��	Gd�dtj
t�}|jd�d	�}Gd
�d�}td�D�cgc]}t|�|fi���}}|j|j�|�y#t$rY�bwxYwcc}w)
Nc�<��eZdZ�fd�Z��fd�Z��fd�Z��fd�Zy)�<ClassPropertiesAndMethods.test_module_subclasses.<locals>.MMc�*���j||�yr�)r4)r:r=�MTs  �r?r4zEClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__init__=s������D�$�'r@c�N���jd|f��j||�S)NrH)r��__getattribute__�r:r=r$�logs  ��r?r&zMClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__getattribute__?s'����
�
�I�t�,�-��*�*�4��6�6r@c�T���jd||f��j|||�y)Nrd)r��__setattr__)r:r=rr$r(s   ��r?r*zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__setattr__Bs&����
�
�I�t�U�3�4����t�T�5�1r@c�P���jd|f��j||�y)N�delattr)r��__delattr__r's  ��r?r-zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__delattr__Es"����
�
�I�t�,�-����t�T�*r@N)r�r�r�r4r&r*r-)r$r(s��r?�MMr"<s���
(�
7�
2�
+r@r.rBr�))rdr�r��rHr�)r,r�c��eZdZy)�@ClassPropertiesAndMethods.test_module_subclasses.<locals>.ModuleNrMr�r@r?�Moduler1Rrr@r2z?inheriting from ModuleType and str at the same time should failc�j�djtjtjd���S)Nr�r)r�)�join�random�choices�string�
ascii_lettersr�r@r?�random_namezEClassPropertiesAndMethods.test_module_subclasses.<locals>.random_name[s"���7�7�6�>�>�&�*>�*>�"�E�F�Fr@c��eZdZy)�;ClassPropertiesAndMethods.test_module_subclasses.<locals>.ANrMr�r@r?r}r;]rOr@r}r�)rGr�r�rE�types�
ModuleType�strr�r�r��__subclasses__)r:r.rBr�r2r9r}r��
subclassesr$r(s         @@r?�test_module_subclassesz0ClassPropertiesAndMethods.test_module_subclasses8s������
�#�Y��	+��	+�
�s�G�����
�E�E��
�E�����3�	4�
	%�
��)�)�3�
�

�I�I�$�
%�	G�	�	�=B�3�Z�H�Z��d�;�=�1�$��3�Z�
�H�����)�)�+�Z�8���	��	��Is�C�C)�	C&�%C&c�$��Gd�dt����}|j|j�d�|jd�|j|j�d�G�fd�dt��}|�}|jt|j
��g�d|d<|jt|j��d	g�|j|dd�|j|j�d�|jd�|j|j�d�|j|j|t�tf�Gd
�dt�}Gd�d
|t
�}|j|�j�d�|jt|��d�|j|�j�d�|jt|��d�y)Nc��eZdZd�Zd�Zd�Zy)�>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Cc��d|_yr�r9r�s r?r4zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.__init__er;r@c��|jSr�r9r�s r?r�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.getstategr=r@c��||_yr�r9rs  r?r�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.setstateir?r@Nr@r�r@r?r�rDdrAr@r�rrc���eZdZ�fd�Zy)�>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Dc�R��tj|��j|�yr�)r�r4r�s �r?r4zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.D.__init__ps����
�
�d�#��
�
�4� r@N�r�r�r�r4�r�s�r?rNrIos���
!r@rN�world�hello)rNrMc��eZdZd�Zd�Zy)�AClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Nodec�4�t|j��Sr�)r-r�r�s r?�__int__zIClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.__int__s���4�8�8�:��&r@c��y)N�23r�r�s r?r�zEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.foo����r@N)r�r�r�rRr�r�r@r?�NoderP~s��
'�
r@rVc��eZdZd�Zy)�AClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Fragc��y)N�42r�r�s r?r�zEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Frag.foo�rUr@Nr�r�r@r?�FragrX����
r@r[�r�)r`rEr�r�r�r6r�r7�__mro__rRr-)r:rBrNrMrVr[r�s      @r?�test_multiple_inheritancez3ClassPropertiesAndMethods.test_multiple_inheritancebs����	%��	%�
�C���������q�)�	�
�
�2���������r�*�	!��a�	!�
�C������a�f�f�h���,���'�
�����a�g�g�i��+=�*>�?�����7��W�-��������q�)�	�
�
�2���������r�*�������Q��a��$8�9�	�6�	�
	�4��	�	
�������)�2�.�����T�V��b�)��������)�2�.�����T�V��b�)r@c�`�Gd�dt�}|j|�j�d�Gd�d|�}|j|�j�d�|j|�j�d�Gd�d|�}|j|�j�d�|j|�j�d�Gd�d||�}|j|�j�d�|j|�j�d�|j|j||||tf�Gd	�d
||�}|j|�j�d�|j|�j�d�|j|j||||tf�	Gd�d||�}|jd
�	Gd�d||�}|jd�y#t$rY�*wxYw#t$rYywxYw)Nc��eZdZd�Zy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.Ac��yr|r�r�s r?r�zBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.A.spam����3r@Nrnr�r@r?r}rb�s��&r@r}c��eZdZd�Zd�Zy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.Bc��yr�r�r�s r?�boozAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.boo����#r@c��yr�r�r�s r?r�zBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.spam�rdr@N)r�r�r�rhr�r�r@r?r�rf�s��%�&r@r�c��eZdZd�Zy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.Cc��yr�r�r�s r?rhzAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.C.boo�rir@N)r�r�r�rhr�r@r?r�rl�s��%r@r�c��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.DNrMr�r@r?rNro�r�r@rNc��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.ENrMr�r@r?r�rq�r�r@r�c��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.FNrMr�r@r?rrs�r�r@rz#expected MRO order disagreement (F)c��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.GNrMr�r@r?�Gru�r�r@rvz#expected MRO order disagreement (G))r`rEr�rhr^r�r�)r:r}r�r�rNr�rrvs        r?�test_diamond_inheritancez2ClassPropertiesAndMethods.test_diamond_inheritance�s���	'��	'���������S�)�	'��	'�	
��������S�)���������C�(�	&��	&���������S�)���������C�(���1����������S�)���������C�(�������Q��1�a��$8�9���1����������S�)���������C�(�������Q��1�a��$8�9�	=��A�q��
�I�I�;�<�	=��A�q��
�I�I�;�<���	��	���	��	�s$�H�4H!�	H�H�!	H-�,H-c
���Gd�dt�}Gd�dt�}Gd�dt�}Gd�d|�}Gd	�d
|�}Gd�d||||�}|j|j||||||tf�y)
Nc��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ANrMr�r@r?r}rz�r�r@r}c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.BNrMr�r@r?r�r|�r�r@r�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.CNrMr�r@r?r�r~�r�r@r�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.XNrMr�r@r?r�r��r�r@r�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.YNrMr�r@r?r�r��r�r@r�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ZNrMr�r@r?r�r��r�r@r��r`rEr^)r:r}r�r�r�r�r�s       r?�test_ex5_from_c3_switchz1ClassPropertiesAndMethods.test_ex5_from_c3_switch�s[�������������������!�A�a��������Q��1�a��A�v�$>�?r@c��Gd�dt�}Gd�d|�}Gd�d|�}Gd�d|�}Gd	�d
|�}Gd�d||�}Gd
�d|�}Gd�d||�}|j|j|||||tf�|j|j||||tf�|j|j||||||||tf	�y)Nc��eZdZy)�9ClassPropertiesAndMethods.test_monotonicity.<locals>.BoatNrMr�r@r?�Boatr��r�r@r�c��eZdZy)�<ClassPropertiesAndMethods.test_monotonicity.<locals>.DayBoatNrMr�r@r?�DayBoatr��r�r@r�c��eZdZy)�>ClassPropertiesAndMethods.test_monotonicity.<locals>.WheelBoatNrMr�r@r?�	WheelBoatr��r�r@r�c��eZdZy)�?ClassPropertiesAndMethods.test_monotonicity.<locals>.EngineLessNrMr�r@r?�
EngineLessr��r�r@r�c��eZdZy)�CClassPropertiesAndMethods.test_monotonicity.<locals>.SmallMultihullNrMr�r@r?�SmallMultihullr��r�r@r�c��eZdZy)�CClassPropertiesAndMethods.test_monotonicity.<locals>.PedalWheelBoatNrMr�r@r?�PedalWheelBoatr��r�r@r�c��eZdZy)�CClassPropertiesAndMethods.test_monotonicity.<locals>.SmallCatamaranNrMr�r@r?�SmallCatamaranr��r�r@r�c��eZdZy)�;ClassPropertiesAndMethods.test_monotonicity.<locals>.PedaloNrMr�r@r?�Pedalor��r�r@r�r�)	r:r�r�r�r�r�r�r�r�s	         r?�test_monotonicityz+ClassPropertiesAndMethods.test_monotonicity�s��� �6� �!�d�!�#��#�'��'�+�W�+�8�Z�	�8�2�^�2�9�^�N�9�����/�/��z�7�I�t�V�L�	N�����/�/��~�w��f�E�	G��������~�z�>��w�	�4��A�	Br@c
���Gd�dt�}Gd�dt�}Gd�dt�}Gd�d||�}Gd	�d
||�}Gd�d||�}|j|j||||||tf�y)
Nc��eZdZy)�AClassPropertiesAndMethods.test_consistency_with_epg.<locals>.PaneNrMr�r@r?�Paner��r�r@r�c��eZdZy)�KClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollingMixinNrMr�r@r?�ScrollingMixinr��r�r@r�c��eZdZy)�IClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditingMixinNrMr�r@r?�EditingMixinr��r�r@r�c��eZdZy)�KClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollablePaneNrMr�r@r?�ScrollablePaner��r�r@r�c��eZdZy)�IClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditablePaneNrMr�r@r?�EditablePaner��r�r@r�c��eZdZy)�SClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditableScrollablePaneNrMr�r@r?�EditableScrollablePaner��r�r@r�r�)r:r�r�r�r�r�r�s       r?�test_consistency_with_epgz3ClassPropertiesAndMethods.test_consistency_with_epg�sd�� �6� �*�V�*�(�6�(�7�T�.�7�3�4��3�G�^�L�G����/�7�7�%�~�|�T���f�6�	7r@c	���d}�fd�}Gd�dt�}Gd�d|�}Gd�dt�}|td	td
||fi�|t|td
||fi�|t|td
|||fi�Gd�dt�}Gd
�d|�}Gd�d|�}Gd�d||�}	Gd�d||�}
|t|td|	|
fi�y)NzCCannot create a consistent method resolution
order (MRO) for bases c���	||��jd|z�y#|$rb}tj�rDt|�j	|�s%�jdt|��d|���Yd}~yYd}~yYd}~yd}~wwxYw)NzExpected %szMessage z, expected )r�r�check_impl_detailr>rc)�exc�expected�callabler;�msgr:s     �r?�raisesz?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.raises�s{���	
/��$���	�	�-�#�-�.���
8��,�,�.��s�8�.�.�x�8��	�	�#&�s�8�X�#7�8�8�9�/��
8�s��B�AA?�?Bc��eZdZy)�:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.ANrMr�r@r?r}r��r�r@r}c��eZdZy)�:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.BNrMr�r@r?r�r��r�r@r�c��eZdZy)�:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.CNrMr�r@r?r�r��r�r@r�zduplicate base class Ar�c��eZdZy)�CClassPropertiesAndMethods.test_mro_disagreement.<locals>.GridLayoutNrMr�r@r?�
GridLayoutr��r�r@r�c��eZdZy)�GClassPropertiesAndMethods.test_mro_disagreement.<locals>.HorizontalGridNrMr�r@r?�HorizontalGridr��r�r@r�c��eZdZy)�EClassPropertiesAndMethods.test_mro_disagreement.<locals>.VerticalGridNrMr�r@r?�VerticalGridr��r�r@r�c��eZdZy)�?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.HVGridNrMr�r@r?�HVGridr��r�r@r�c��eZdZy)�?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.VHGridNrMr�r@r?�VHGridr��r�r@r��ConfusedGrid)r`r�rG)r:�mro_err_msgr�r}r�r�r�r�r�r�r�s`          r?�test_mro_disagreementz/ClassPropertiesAndMethods.test_mro_disagreement�s������
	/�	���������	�y�2��S�1�a�&�"�	&��y�+��S�1�a�&�"�	&��y�+��S�1�a��)�R�	)�	'��&�.�Z�.�,�:�,�8�^�\�8�8�\�>�8��y�+��^�f�f�%5�r�	;r@c�h�t�}|j|jt�|jt|�t�t�}|j	||�|j|d�	d|_|jd�|jt�d�Gd�dt�}|�}|j|ji�d|_|j|jd�|j|jddi�y#ttf$rY��wxYw)Nr�r�z1object() should not allow setting a foo attributerIc��eZdZy)�:ClassPropertiesAndMethods.test_object_class.<locals>.CdictNrMr�r@r?�Cdictr�rOr@r�rf)r`rErrG�assertNotEqualrr�r��AttributeErrorr�rI)r:rBrTr�r�s     r?�test_object_classz+ClassPropertiesAndMethods.test_object_classs����H��������f�-�����a��&�)��H�����A�q�!����a��'�	K��A�E�
�I�I�I�J����f�h�
�3�	�F�	��G��������R�(�����������"�������e�Q�Z�0���	�*�	��	�s�9D�D1�0D1c��Gd�dtj�}tjd�}|j|jtju�|j	t|d��||_|j|j|u�|jt|d��tj|_|j|jtju�|j	t|d��Gd�dt�}|jt�5|d_ddd�Gd�d	t�}|jt�5|d
_ddd�Gd�dt�}|jt�5|d
_ddd�Gd�dt�}|jt�5|d_ddd�Gd�dt�}|jt�5|d_ddd�Gd�dt�}|jt�5|d_ddd�Gd�dt�}	|jt�5|	t�_ddd�y#1swY��KxYw#1swY��$xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)Nc��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.SubTyperfN�r�r�r�rBr�r@r?�SubTyper�s���Ar@r�rOrBc��eZdZdZy)�hClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyIntr�N�r�r�r�r�r�r@r?�MyIntr�5����Ir@r�rfc��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFloatr�Nr�r�r@r?�MyFloatr�:r�r@r���?c��eZdZdZy)�lClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyComplexr�Nr�r�r@r?�	MyComplexr�?r�r@r�y�?@c��eZdZdZy)�hClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyStrr�Nr�r�r@r?�MyStrr�Dr�r@r�c��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyBytesr�Nr�r�r@r?�MyBytesr�Ir�r@r��ac��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyTupler�Nr�r�r@r?�MyTupler�Nr�r@r�r�c��eZdZdZy)�nClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFrozenSetr�Nr�r�r@r?�MyFrozenSetr�Sr�r@r�)r<r=r�rrr�r-rr�r.r�r>�bytes�tuple�	frozenset)
r:r�rOr�r�r�r�r�r�r�s
          r?�?test_object_class_assignment_between_heaptypes_and_nonheaptypeszYClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypess��	�e�&�&�	�
���S�!��������u�'7�'7�7�8������C��)����������w�.�/������3��(��&�&���������u�'7�'7�7�8������C��)�	�C�	�
�
�
�y�
)�!�Q�M�*�	�e�	�
�
�
�y�
)�%�S�O�*�	��	�
�
�
�y�
)�!*�V��*�	�C�	�
�
�
�y�
)�!�C�M�*�	�e�	�
�
�
�y�
)�$�D�N�*�	�e�	�
�
�
�y�
)�"�B�L�*�	�)�	�
�
�
�y�
)�$/�I�K�!�*�
)�=*�
)��
*�
)��
*�
)��
*�
)��
*�
)��
*�
)��
*�
)�sT�3J�'J�J�J*�J6�7K�+K�J�J�J'�*J3�6J?�K�Kc������Gd�dt�}|�}�j|d��j|d�Gd�dt�}|�}�j|d��j|d�d|_�j|jd�d|_�j|jd�|`�j|d�Gd	�d
t�}|�}�j|d��j|d��j|d��j|d�d|_d
|_d|_�j|jd��j|jd
��j|j
d�Gd�dt�}|d�}�j|d��j|d��j|j
�d�	d|_�jd�	Gd�dt�}�jd�	Gd�dt�}�jd�	Gd�dt�}�jd�	Gd�dt�}�jd�	Gd�dt�}�jd�Gd �dt�}Gd!�dt�}|�}d|_�j|jd�Gd"�dt�}|�}d|_�j|jd�d#�G�fd$�dt�}|�}d|_�j|jd��jt�d%�t�	Gd&�dt�}�jd'�G�fd(�d)t��Gd*�dt�}|�}��|_��|_��|_�j�j"d�~t%j&��j�j"d%�Gd+�d,|�}|�}��|_��|_�j�j"d
�~t%j&��j�j"d%�Gd-�d.|�}	|	�}��|_��|_��|_�j�j"d�~t%j&��j�j"d%�Gd/�d0t�}
|
�}��|g|_�j�j"d�d}t%j&��j�j"d%�t-t.d1�rwGd2�d3t�}|�}
t1t/j2��}t5d4�D]}|
|
k(�	t1t/j2��}�j||�G�fd5�d6t�}t%j6d7�5}|�}~ddd��j|j9�d8�Gd9�d:t�}�j;t�5|�`ddd�Gd;�d:t�}�j=td<�5|�jddd�Gd=�d>t��G�fd?�d:t�}d|�_�j=td<�5|�jddd�y#t$rY��dwxYw#t$rY��SwxYw#t$rY��BwxYw#t$rY��1wxYw#t$rY�� wxYw#t$rY��wxYw#tt f$rY��$wxYw#1swY��pxYw#1swY��)xYw#1swY��xYw#1swYyxYw)@Nc��eZdZgZy)�0ClassPropertiesAndMethods.test_slots.<locals>.C0Nr�r�r@r?�C0rZr�r@rrIr�c��eZdZdgZy)�0ClassPropertiesAndMethods.test_slots.<locals>.C1rBNr�r�r@r?�C1r`�	����Ir@rrBrfc��eZdZgd�Zy)�0ClassPropertiesAndMethods.test_slots.<locals>.C3rWNr�r�r@r?�C3rl���'�Ir@rrTrXrgrkc�"�eZdZdZdgZd�Zd�Zy)�0ClassPropertiesAndMethods.test_slots.<locals>.C4zValidate name mangling�__ac��||_yr���_C4__a�r:rs  r?r4z9ClassPropertiesAndMethods.test_slots.<locals>.C4.__init__}�	�� ��r@c��|jSr�rr�s r?r�z4ClassPropertiesAndMethods.test_slots.<locals>.C4.get����x�x�r@N)r�r�r��__doc__r�r4r�r�r@r?�C4rzs��(���I�
!�
 r@rr�rr�z$Double underscored names not mangledc��eZdZdgZy��/ClassPropertiesAndMethods.test_slots.<locals>.CNr�r�r@r?r�r�s	��!�F�	r@r�z[None] slots not caughtc��eZdZdgZy)rzfoo barNr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	��&�K�	r@z['foo bar'] slots not caughtc��eZdZdgZy)rzfoobarNr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	��'�L�	r@z['foo\0bar'] slots not caughtc��eZdZdgZy)r�1Nr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	�� �E�	r@z['1'] slots not caughtc��eZdZdgZy)rr�Nr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	���D�	r@z[''] slots not caughtc��eZdZgd�Zy)r)rB�a_b�_a�A0123456789ZNr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s��:�Ir@c��eZdZdZy�r�abcNr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�����Ir@c��eZdZdZyr#r�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�r%r@r�c���eZdZW�Zyrr�)�slotss�r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s����Ir@rc��eZdZed�gZy)r�N)r�r�r��chrr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s
�� ��X�J�	r@zhr(128)] slots not caughtc�&��eZdZdZ�fd�Z�fd�Zy)�5ClassPropertiesAndMethods.test_slots.<locals>.Countedrc�0���xjdz
c_yr�r��r:�Counteds �r?r4z>ClassPropertiesAndMethods.test_slots.<locals>.Counted.__init__��������1�$�r@c�0���xjdzc_yr�r�r/s �r?�__del__z=ClassPropertiesAndMethods.test_slots.<locals>.Counted.__del__�r1r@N)r�r�r�r�r4r3)r0s�r?r0r-�s����G�
%�
%r@r0c��eZdZgd�Zy)rrWNr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�r	r@c��eZdZy)�/ClassPropertiesAndMethods.test_slots.<locals>.DNrMr�r@r?rNr6�rOr@rNc��eZdZdgZy)�/ClassPropertiesAndMethods.test_slots.<locals>.E�eNr�r�r@r?r�r8�rr@r�c��eZdZddgZy)�/ClassPropertiesAndMethods.test_slots.<locals>.FrBrTNr�r�r@r?rr;�����c�
�Ir@r�get_objectsc��eZdZd�Zy)�/ClassPropertiesAndMethods.test_slots.<locals>.Gc��y)NFr�r�s  r?�__eq__z6ClassPropertiesAndMethods.test_slots.<locals>.G.__eq__s�� r@N�r�r�r�rAr�r@r?rvr?s��!r@rvrc�&��eZdZddgZd�Z�fd�Zy)�/ClassPropertiesAndMethods.test_slots.<locals>.HrBrTc� �d|_d|_y�NrfrgrSr�s r?r4z8ClassPropertiesAndMethods.test_slots.<locals>.H.__init__s�������r@c�v���j|jd��j|jd�yrF)rErBrT)�self_r:s �r?r3z7ClassPropertiesAndMethods.test_slots.<locals>.H.__del__s+���� � ����!�,�� � ����!�,r@N)r�r�r�r�r4r3r�s�r?�HrDs����c�
�I�
�
-r@rI�stderrr�c��eZdZdZy��/ClassPropertiesAndMethods.test_slots.<locals>.XrBNr�r�r@r?r�rM����Ir@r�c��eZdZdZyrLr�r�r@r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.X#rNr@z'X' object has no attribute 'a'c��eZdZy)�4ClassPropertiesAndMethods.test_slots.<locals>.SubStrNrMr�r@r?�SubStrrQ)rOr@rRc�"��eZdZW�d�fZy)rMr�Nr�)rRs�r?r�z/ClassPropertiesAndMethods.test_slots.<locals>.X+s�������Ir@) r`rrBrErTrXr��_ClassPropertiesAndMethods__ar�r�r�r$r�rrGr>�UnicodeEncodeErrorr�r�
gc_collect�zr9r��gcr	r=r��captured_output�getvaluer�assertRaisesRegexr�)r:rr�rrrr�rXrNr�r�srv�g�orig_objectsr��new_objectsrI�hr�r0rRr(s`                   @@@r?�
test_slotsz$ClassPropertiesAndMethods.test_slotsXs����	��	��D�����a��,����a��'�	��	��D�����a��,����a��%����������a� ����������d�#�
�C����a��%�	(��	(��D�����a��,����a��%����a��%����a��%����������������a� �������a� �������a� �	 ��	 �
�q�E�����a��,����a��'��������!�$�	>��A�E�
�I�I�<�=�	1�
#�F�
#�

�I�I�/�0�	6�
(�F�
(�

�I�I�4�5�	8�
)�F�
)�

�I�I�6�7�	0�
"�F�
"�

�I�I�.�/�	/�
!�F�
!�

�I�I�-�.�	;��	;�	��	�
�C������������"�	��	�
�C������������"���	��	�
�C������������"��
�
�d�5��8�n�c�*�	5�
'�F�
'�

�I�I�3�4�	%�f�	%�	(��	(�
�C���i����i����i���������!�,�
�����������!�,�	��	�
�C���i����i���������!�,�
�����������!�,�	��	�
�C���i����i����i���������!�,�
�����������!�,�	#��	#�
�C���y�!�n���������!�,�������������!�,��2�}�%�
!�F�
!���A��r�~�~�/�0�L��2�Y���1����b�n�n�.�/�K����\�;�7�	-��	-��
$�
$�X�
.�!���A��/�	
�������r�*�	��	�
�
�
�~�
.����/�	��	�
�
#�
#�N�4U�
V�
�C�E�E�W�	�S�	�	'��	'�����
�
#�
#�N�4U�
V�
�C�E�E�W�
V��O�	��	���	��	���	��	���	��	���	��	���	��	��H�-�.�	��	��P/�
.��/�
.��W�
V��W�
V�s��6]&�]6�0^�^�2^&�^6�_�%	_�:_)�/_6�`�&	]3�2]3�6	^�^�	^�^�	^#�"^#�&	^3�2^3�6	_�_�_�_�_&�)_3�6_?�`c��Gd�dt�}|�}|j|d�|j|d�d|_|j	|j
ddi�Gd�dt�}|�}|j|d�|j|d�	d|_|j
d	�Gd
�d||�}|�}|j|d�|j|d�d|_|j	|j
ddi�Gd�d
||�}|�}|j|d�|j|d�d|_|j	|j
ddi�y#t$rY��wxYw)Nc��eZdZdgZy)�7ClassPropertiesAndMethods.test_slots_special.<locals>.DrINr�r�r@r?rNrd3�	��#��Ir@rNrI�__weakref__r�r�c��eZdZdgZy)�7ClassPropertiesAndMethods.test_slots_special.<locals>.WrfNr�r�r@r?�Wrh;�	��&��Ir@riz!shouldn't be allowed to set a.fooc��eZdZgZy)�8ClassPropertiesAndMethods.test_slots_special.<locals>.C1Nr�r�r@r?rrlGr�r@rc��eZdZgZy)�8ClassPropertiesAndMethods.test_slots_special.<locals>.C2Nr�r�r@r?r�rnOr�r@r�)r`r�rr�rErIr�r�)r:rNrBrirr�s      r?�test_slots_specialz,ClassPropertiesAndMethods.test_slots_special1s^��	%��	%�
�C�����1�j�)����a��/����������e�R�[�1�	(��	(�
�C�����1�m�,����a��,�	;��A�E�
�I�I�9�:�	��A�	��D�����1�j�)����1�m�,����������e�R�[�1�	��A�	��D�����1�j�)����1�m�,����������e�R�[�1��'�	��	�s�E,�,	E8�7E8c�v��G�fd�dt�}Gd�d�}Gd�d||d��}�j|jdtj�|�}�j|jd	��j|d�d	|_�j|jd	��jt�5Gd
�d�}ddd�Gd�d
|d��}�j|j|jddd
z��j|jdtj�|�}�j|d�d|_�j|jd��jt�5Gd�d�}ddd�y#1swY��xYw#1swYyxYw)Nc�"���eZdZ��fd�Z�xZS)�;ClassPropertiesAndMethods.test_slots_special2.<locals>.Metac�L���j||�t�|�	||||�Sr�)rrur�)r�r=rU�	namespace�attrrr:s     ��r?r�zCClassPropertiesAndMethods.test_slots_special2.<locals>.Meta.__new__Zs&����
�
�d�I�.��w��s�D�%��C�Cr@rw�rr:s@�r?�MetarrYs���
D�
Dr@rwc��eZdZd�Zy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.C1c��d|_yrl)rTr�s r?r4zBClassPropertiesAndMethods.test_slots_special2.<locals>.C1.__init___s	����r@NrKr�r@r?rry^r\r@rc�$��eZdZdgZ�fd�Z�xZS)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.C2rxc�"��t�|��yr��rur4)r:rs �r?r4zBClassPropertiesAndMethods.test_slots_special2.<locals>.C2.__init__cs����� �"r@)r�r�r�r�r4rx�rs@r?r�r|as���(�)�I�
#�
#r@r�rx)rCrur�c��eZdZdZdgZy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.C3r�rxN)r�r�r�rxr�r�r@r?rr�ms�� "�
�,�-�	r@rc��eZdZdgZy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q1r�Nr�r�r@r?�Q1r�qs
��'�(�Ir@r�r�����qc� �eZdZe�ZdgZy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q2r�N)r�r�r�r`r�r�r@r?�Q2r�{s��%�x��+�,�	r@r�)rGrrIr<�MemberDescriptorTyperErTrrxrr�r�)	r:rwrr�rXrr�r�r�s	`        r?�test_slots_special2z-ClassPropertiesAndMethods.test_slots_special2Wsj���	D�4�	D�
	�	�	#��t�/�	#�	
���b�k�k�/�:�#�8�8�	:��D��������b�!����a��1����������"�-�
�
�
�y�
)�
.�
.�*�
	)�4�n�	)�������"�/�/�#�2�*>��*E�F����b�k�k�.�9�#�8�8�	:��D�����a��0�����������-�
�
�
�y�
)�
-�
-�*�
)�*�
)��*�
)�s�F#�F/�#F,�/F8c��ddl}Gd�d|j��}Gd�dt�}|j|�|�}|j	||�|jt|jj|d�y)Nrc��eZdZdZy)�>ClassPropertiesAndMethods.test_slots_descriptor.<locals>.MyABCrBNr�r�r@r?�MyABCr��rNr@r�rBc��eZdZy)�BClassPropertiesAndMethods.test_slots_descriptor.<locals>.UnrelatedNrMr�r@r?�	Unrelatedr��rOr@r�rk)	r$�ABCMetar`�registerrrr�rB�__set__)r:r$r�r��us     r?�test_slots_descriptorz/ClassPropertiesAndMethods.test_slots_descriptorsd��	�	�c�k�k�	�	��	�
���y�!��K�����a��'�	
���)�U�W�W�_�_�a��;r@c��Gd�dt�}Gd�d|�}Gd�d|�}d|_|j|jd�|j|jd�|j|jd�Gd�d	t�}|�}|j|d
�d|_|j|jd�d�|_|j|j�d
�d�|_|jt|�d�d�|_|jt|�d�|j|jd�|j|d�d�}||_
|j|jd�d|_|j|jd�d�}||_
|jt�5d|_ddd�|j|jd�Gd�d|�}|�}d|_|j|jd�Gd�dt�}	|jd|	d�zd�|j|	d�dzd�|jd|	d�zd�|j|	d�dzd�|j|	d�|	d�zd�Gd�dt �}
Gd �d!|
�"�}|j#|t�y#1swY��)xYw)#Nc��eZdZy��2ClassPropertiesAndMethods.test_dynamics.<locals>.DNrMr�r@r?rNr��rOr@rNc��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.ENrMr�r@r?r�r��rOr@r�c��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.FNrMr�r@r?rr��rOr@rrfc��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.CNrMr�r@r?r�r��rOr@r��foobarrgc��yrlr�r�s r?�<lambda>z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>�s��r@r�c��y)N�C()r�r�s r?r�z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>�s��%r@r�c��yr(r�r�s r?r�z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>�s��r@r�r�c��|dk(ryt��Nr��r��r:r=s  r?�	mygetattrz:ClassPropertiesAndMethods.test_dynamics.<locals>.mygetattr�s���v�~�� � r@r�c�F�|dk(rt�tj|||�Sr�)r�r`r*)r:r=rs   r?�	mysetattrz:ClassPropertiesAndMethods.test_dynamics.<locals>.mysetattr�s$���v�~�$�$��%�%�d�D�%�8�8r@znot spamc��eZdZyr�rMr�r@r?rNz2ClassPropertiesAndMethods.test_dynamics.<locals>.D�rOr@c��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.INrMr�r@r?�Ir��rOr@r�rB�aarkr�c��eZdZy)�AClassPropertiesAndMethods.test_dynamics.<locals>.dynamicmetaclassNrMr�r@r?�dynamicmetaclassr��rOr@r�c��eZdZy)�:ClassPropertiesAndMethods.test_dynamics.<locals>.someclassNrMr�r@r?�	someclassr��rOr@r�rB)r`r�rErr��methodr�r�rRr-�__getattr__r��newr*rr�rGr�)r:rNr�rr�rBr�r�rMr�r�r�s            r?�
test_dynamicsz'ClassPropertiesAndMethods.test_dynamics�s���	��	�	��	�	��	�����������"��������"��������"�	��	�
�C�����a��*����������1�%�"����������R�(�'��
�����a��%�(�$��	�����Q���%�������1�%����a��(�	!�"��
��������(�����������#�	9�"��
�
�
�
�~�
.��A�F�/�	
�������(�	��	�
�C������������"�	��	�����Q�q�T��4�(�����1��c��4�(�����1�Q�4���#�����1��a���#�����1��a��d��A�&�	�t�	�	�"2�	����I�v�.�1/�
.�s�K?�?L	c���	Gd�dtt�}|jd�	Gd�dtd�}|jd�Gd�d�}	Gd�dtt��}|jd	�	Gd
�dt�}|jd�	Gd�dt�}|jd
�Gd�dt
�}Gd�dt
�}Gd�dt|��}Gd�dt|��}	Gd�d||�}|jd�y#t$rY��wxYw#t$rY��wxYw#t$rY��wxYw#t$rY��wxYw#t$rY��wxYw#t$rYywxYw)Nc��eZdZy��0ClassPropertiesAndMethods.test_errors.<locals>.CNrMr�r@r?r�r��rr@r�z5inheritance from both list and dict should be illegalc��eZdZyr�rMr�r@r?r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�rr@z+inheritance from non-type should be illegalc��eZdZy)�6ClassPropertiesAndMethods.test_errors.<locals>.ClassicNrMr�r@r?�Classicr��rOr@r�c��eZdZyr�rMr�r@r?r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�rr@z,inheritance from CFunction should be illegalc��eZdZdZy�r�rfNr�r�r@r?r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�s���	r@z__slots__ = 1 should be illegalc��eZdZdgZyr�r�r�r@r?r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�s	���C�	r@z!__slots__ = [1] should be illegalc��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.M1NrMr�r@r?rWr��rOr@rWc��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.M2NrMr�r@r?rir�rOr@ric��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.A1NrMr�r@r?�A1r�rOr@r�rBc��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.A2NrMr�r@r?�A2r�rOr@r�c��eZdZy)�0ClassPropertiesAndMethods.test_errors.<locals>.BNrMr�r@r?r�r�rr@r�z5finding the most derived metaclass should have failed)r6r�r�r�r`rGr	)r:r�r�rWrir�r�r�s        r?�test_errorsz%ClassPropertiesAndMethods.test_errors�s���	O�
�D�$�
�

�I�I�M�N�	E�
�F�D�
�

�I�I�C�D�	�	�	F�
�D��I�
�

�I�I�D�E�	9�
�F�
�

�I�I�7�8�	;�
 �F�
 �

�I�I�9�:�	��	�	��	�	��2�	�	��2�	�	O�
�B��
�

�I�I�M�N��k�	��	���	��	���	��	���	��	���	��	�� �	��	�sj�D�D.�D=�>E�E�E*�	D+�*D+�.	D:�9D:�=	E	�E	�	E�E�	E'�&E'�*	E6�5E6c����Gd�dt�}|�}|j|jd�|df�|j|jd�|df�|j|jd�|df�Gd�d|�}|�}|j|jd�|df�|j|jd�|df�|j|jd�|df�|j|j|d�|df�d�}t	|�}|j|jdt�d�tdf�|j|jd�d�tdf�|j|jj|�|j|jj|�|jt||�
j|�|jt||�
j|�|jt||��|f�|jt||��|f�t	d�jd�}|jt|�	t	|d�	�|jd
�t	|�}itjrdndtd|jd
�}	|j|j |	�d|_|j|j"d�|j|j ddi|	��|`|j%|d�y#t$rY��wxYw)Nc�"�eZdZd�Zee�Zy)�6ClassPropertiesAndMethods.test_classmethods.<locals>.Cc��|Sr�r��rBs r?r�z:ClassPropertiesAndMethods.test_classmethods.<locals>.C.foo����r@N�r�r�r�r�r��goor�r@r?r�r����!��c�"�Cr@r�rfc��eZdZy)�6ClassPropertiesAndMethods.test_classmethods.<locals>.DNrMr�r@r?rNr�rOr@rNc�
�||fS)�f docstringr�)r��args  r?�fz6ClassPropertiesAndMethods.test_classmethods.<locals>.f s����:�r@rr��rz)classmethod shouldn't accept keyword argsr�r�)�__annotations__rr�r�r�r�)r`rEr�r�r�rer-�__self__rurr�r�r�HAVE_DOCSTRINGSr�r�rIr�r)r:r�rXrNrMr��ffrL�cm�cm_dictrs          �r?�test_classmethodsz+ClassPropertiesAndMethods.test_classmethodss����	#��	#�
�C��������q��A�q�6�*�������q��A�q�6�*�������q��A�q�6�*�	��	�
�C��������q��A�q�6�*�������q��A�q�6�*�������q��A�q�6�*�������q�!��q�!�f�-�	���^�����+����A�s�+�B�/�#�r��;��������A��r�*�S�"�I�6�	
���������+����������+�����q���0�0�!�4�����q���0�0�!�4�����q���)�A�4�0�����q���)�A�4�0��1�~�%�%�a�(�����)�T�*�	C���a� �
�I�I�A�B�
��^��&(�"�1�1�%� �!)�"�#$�>�>�3��	
������g�.����������r�"�������s�R�&;�7�&;�<��D����b�#�&��+�	��	�s�
M�	M!� M!c���tjtd�}td�}|�}t	d�D]}|jd��|j
|�|z
dd��y�N�gettotalrefcountr�rr)�delta)r�
get_attributer�r�r�r4�assertAlmostEqual)r:r�r��refs_beforer�s     r?�%test_refleaks_in_classmethod___init__z?ClassPropertiesAndMethods.test_refleaks_in_classmethod___init__Ms`��"�0�0��6H�I��
��
��&�(���s��A��K�K�������/�1�K�?��"��Mr@r�Nr�c�8�ddl}d}ddi}|jj|i|��\}}}|j||j�|j||�|j||�|j�j|i|��\}}}|j||j�|j||�|j||�|jjd}||jg|��i|��\}}	}
|j||j�|j|	|�|j|
|�Gd�d|j�}||g|��i|��\}}	}
|j||�|j|	|�|j|
|�|jt�5}|�ddd�|jtj�d�|jt�5}||j��ddd�|jt|j�d	�|jt�5}|t�ddd�d
}
|jt|j�|
�|jt�5}|jdt�ddd�|jt|j�|
�y#1swY��3xYw#1swY��xYw#1swY��xYw#1swY�TxYw)Nrrjr$�{�	classmethc��eZdZy)�AClassPropertiesAndMethods.test_classmethods_in_c.<locals>.SubSpamNrMr�r@r?�SubSpamr�jr�r@r�zGdescriptor 'classmeth' of 'xxsubtype.spamlist' object needs an argumentzfdescriptor 'classmeth' for type 'xxsubtype.spamlist' needs a type, not a 'xxsubtype.spamlist' as arg 2zUdescriptor 'classmeth' requires a subtype of 'xxsubtype.spamlist' but received 'list')r�r�r�rErIrr�r>�	exceptionr6re)r:r�rBrMr�r�d1�spam_cm�x2r �d2r�r��expected_errmsgs              r?�test_classmethods_in_cz0ClassPropertiesAndMethods.test_classmethods_in_cVs���	!���
�C�L��+�D�M�M�+�+�Q�4�!�4�	��2�r�����D�M�M�*�����B������B��-�D�M�M�O�-�-�q�6�A�6�	��2�r�����D�M�M�*�����B������B���-�-�(�(��5���T�]�]�4�Q�4�!�4�
��B������T�]�]�+�����R� �����R� �*�d�m�m�*��W�.�q�.�A�.�
��B������W�%�����R� �����R� �
�
�
�y�
)�R��I�*���������
'�	(�
�
�
�y�
)�R��D�M�M�O�$�*���������
@�	A�
�
�
�y�
)�R��D�M�*�
"�	�	
����R�\�\�*�O�<�
�
�
�y�
)�R��O�O�D�$�'�*�����R�\�\�*�O�<�/*�
)��*�
)��*�
)��*�
)�s0�2K+�<K8�
L�&L�+K5�8L�L
�Lc�.�Gd�dt�}|�}|j|jd�d�|j|jd�d�|j|jd�|df�Gd�d|�}|�}|j|jd�d�|j|jd�d�|j|jd�|df�|j|j|d�|df�t	d�}|j|j
ddi�d|_|j|jd�|j|j
ddd	��|`|j|d
�y)Nc�"�eZdZd�Zee�Zy)�7ClassPropertiesAndMethods.test_staticmethods.<locals>.Cc��|Sr�r�r�s r?r�z;ClassPropertiesAndMethods.test_staticmethods.<locals>.C.foo�r�r@N)r�r�r�r�rhr�r�r@r?r�r�s��!��s�#�Cr@r�rf)rfc��eZdZy)�7ClassPropertiesAndMethods.test_staticmethods.<locals>.DNrMr�r@r?rNr�rOr@rNrr�)r�rr�)r`rEr�r�rhrIr�r)r:r�rXrNrM�sms      r?�test_staticmethodsz,ClassPropertiesAndMethods.test_staticmethods�sL��	$��	$�
�C��������q��4�(�������q��4�(�������q��A�q�7�+�	��	�
�C��������q��4�(�������q��4�(�������q��A�q�6�*�������q�!��q�!�f�-�
�$�
��������y�$�&7�8����������r�"�������R�D�&A�B��D����b�#�&r@c���tjtd�}td�}|�}t	d�D]}|jd��|j
|�|z
dd��yr�)rr�r�rhr�r4r�)r:r�r	r�r�s     r?�&test_refleaks_in_staticmethod___init__z@ClassPropertiesAndMethods.test_refleaks_in_staticmethod___init__�s`��"�0�0��6H�I��
�$�
��&�(���s��A��K�K�������/�1�K�?��"��Mr@c�x�ddl}d}ddi}|jj|i|��\}}}|j|d�|j||�|j||�|j�j|i|��\}}}|j|d�|j||�|j||�y)Nrrjr$r�)r�r��
staticmethrE)r:r�rBrMr�rr�rs        r?�test_staticmethods_in_cz1ClassPropertiesAndMethods.test_staticmethods_in_c�s���	!���
�C�L��,�D�M�M�,�,�a�5�1�5�	��2�r�����D�!�����B������B��.�D�M�M�O�.�.��7�Q�7�	��2�r�����D�!�����B������B�r@c�H��Gd�d����}|j�jd��df�|j|jd��df�|j|jd�|df�Gd�d��}|�}|j|jd�|df�|j|jd�|df�|j|jd�|df�|j|j|d�|df�G�fd�d�}|j|�jj�j�|j	t�jj
����jd��y)	Nc�"�eZdZd�Zee�Zy)�1ClassPropertiesAndMethods.test_classic.<locals>.Cc��|Sr�r�r�s r?r�z5ClassPropertiesAndMethods.test_classic.<locals>.C.foo�r�r@Nr�r�r@r?r�r�r�r@r�rfc��eZdZy)�1ClassPropertiesAndMethods.test_classic.<locals>.DNrMr�r@r?rNr�rOr@rNc�(��eZdZW�jZy)�1ClassPropertiesAndMethods.test_classic.<locals>.ENr�rLs�r?r�r������%�%�Cr@r��<bound method )rEr�r��__func__r�r�rerc)r:rXrNrMr�r�s     @r?�test_classicz&ClassPropertiesAndMethods.test_classic�sE���	#�	#�
�C��������q��A�q�6�*�������q��A�q�6�*�������q��A�q�6�*�	��	�
�C��������q��A�q�6�*�������q��A�q�6�*�������q��A�q�6�*�������q�!��q�!�f�-�	�	��������)�)�1�5�5�1�����Q�U�U�]�]�1�3�/�0�;�;�<L�M�Nr@c�F�Gd�dt�}|�}|j|jd�|j|jd�d|_|j|jd�|j|jd�|`|j|d�y)Nc�N�eZdZGd�de�Zd�Zd�Zd�Zd�Zeeee�Z	y)�2ClassPropertiesAndMethods.test_compattr.<locals>.Cc�(�eZdZdd�Zdd�Zd�Zd�Zy)�EClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attributeNc�.�||_||_||_yr�)�_computed_attribute__get�_computed_attribute__set�_computed_attribute__delete)r:r�r��deletes    r?r4zNClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__init__�s��!$�D�J�!$�D�J�$*�D�Mr@c�$�|j|�Sr�)r")r:r�rGs   r?rezMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__get__�s���:�:�c�?�*r@c�&�|j||�Sr�)r#�r:r�rs   r?r�zMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__set__�s���:�:�c�5�1�1r@c�$�|j|�Sr�)r$�r:r�s  r?�
__delete__zPClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__delete__�s���=�=��-�-r@r�r�)r�r�r�r4rer�r+r�r@r?�computed_attributer �s��+�+�2�.r@r,c��d|_yr���_C__xr�s r?r4z;ClassPropertiesAndMethods.test_compattr.<locals>.C.__init__��	����r@c�2�|j}|dz|_|Sr�r.r�s  r?�__get_xz:ClassPropertiesAndMethods.test_compattr.<locals>.C.__get_x�s���H�H���Q�3����r@c��||_yr�r.r�s  r?�__set_xz:ClassPropertiesAndMethods.test_compattr.<locals>.C.__set_x�r0r@c��|`yr�r.r�s r?�
__delete_xz=ClassPropertiesAndMethods.test_compattr.<locals>.C.__delete_x�����Hr@N)
r�r�r�r`r,r4�	_C__get_x�	_C__set_x�_C__delete_xr�r�r@r?r�r�s0��

.�V�

.�
�
�
�
�"�7�G�Z�@�Ar@r�rrfr�r�)r`rEr�rr3s   r?�
test_compattrz'ClassPropertiesAndMethods.test_compattr�s���	A��	A�.
�C��������a� �������a� ����������b�!�������b�!�
�C����a��%r@c�4�Gd�dt�}|�}|j|jd�|j|j|�Gd�d|�}|�}|j|jd�|j|j|�y)Nc��eZdZd�Zd�Zy)�2ClassPropertiesAndMethods.test_newslots.<locals>.Cc�>�tj|�}d|_|Sr�)r6r�r��r�r:s  r?r�z:ClassPropertiesAndMethods.test_newslots.<locals>.C.__new__�s���|�|�C�(������r@c�,�|jdz|_y�Nrg�r�r�s r?r4z;ClassPropertiesAndMethods.test_newslots.<locals>.C.__init__�s���8�8�a�<��r@N�r�r�r�r�r4r�r@r?r�r?�s��
�
(r@r�rkc��eZdZy)�2ClassPropertiesAndMethods.test_newslots.<locals>.DNrMr�r@r?rNrG�rOr@rN)r6rEr�r)r:r�rBrNrTs     r?�
test_newslotsz'ClassPropertiesAndMethods.test_newslots�sz��	(��	(�
�C���������"�������a�(�	��	�
�C���������"�������a�(r@c���|jttj�|jttjd�|jttjt�|jttjt�Gd�dt�}|jt|�Gd�dt�}|jt|�y)Nr�c�$�eZdZejZy��1ClassPropertiesAndMethods.test_bad_new.<locals>.CN)r�r�r�r6r�r�r@r?r�rL	s���l�l�Gr@r�c�$�eZdZejZyrK)r�r�r�r`r�r�r@r?r�z1ClassPropertiesAndMethods.test_bad_new.<locals>.Cs���n�n�Gr@)rr�r`r�r6r�s  r?�test_bad_newz&ClassPropertiesAndMethods.test_bad_news������)�V�^�^�4����)�V�^�^�R�8����)�T�\�\�6�:����)�V�^�^�T�:�	#��	#����)�Q�'�	%��	%����)�Q�'r@c�H�Gd�dt�}tj|�|jttj|d�tj	|��|jttj|�d�Gd�dt�}tj|�tj|d�tj	|d��|jttj|d�d�Gd�dt�}tj|�|jttj|d�tj	|d��tj	|d�d�Gd�dt�}tj|�|jttj|d�tj	|d��|jttj|d�d�y)Nc��eZdZy)�4ClassPropertiesAndMethods.test_object_new.<locals>.ANrMr�r@r?r}rQrOr@r}r�c��eZdZd�Zy)rQc��||_yr�rD�r:r�s  r?r4z=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__�	����r@NrKr�r@r?r}z4ClassPropertiesAndMethods.test_object_new.<locals>.A���
r@rkc��eZdZd�Zy)rQc�,�tj|�Sr��r`r��r�r�s  r?r�z<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__!����~�~�c�*�*r@NrVr�r@r?r}z4ClassPropertiesAndMethods.test_object_new.<locals>.A s��
+r@c��eZdZd�Zd�Zy)rQc�,�tj|�Sr�rYrZs  r?r�z<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__)r[r@c��||_yr�rDrTs  r?r4z=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__+rUr@NrEr�r@r?r}z4ClassPropertiesAndMethods.test_object_new.<locals>.A(s��
+�
r@)r`r�rr�r4�r:r}s  r?�test_object_newz)ClassPropertiesAndMethods.test_object_news`��	��	����q�����)�V�^�^�Q��:����������)�V�_�_�a�c�1�=�	��	�	���q�����q�!������!������)�V�_�_�a��d�A�>�	+��	+�	���q�����)�V�^�^�Q��:�����!�������!��a� �	��	�
	���q�����)�V�^�^�Q��:�����!������)�V�_�_�a��d�A�>r@c��Gd�dt�}|jt|�Gd�d|�}tj�5tj
dt�|d�}ddd�|jjd�|j|j|�|`
|jt|�|`
tj�5tj
dt�|d�}ddd�|j|jd�|j|j|�y#1swY��xYw#1swY�NxYw)Nc��eZdZd�Zy)�=ClassPropertiesAndMethods.test_restored_object_new.<locals>.Ac��t�r���AssertionError)r�r;r<s   r?r�zEClassPropertiesAndMethods.test_restored_object_new.<locals>.A.__new__5s��$�$r@NrVr�r@r?r}rc4���
%r@r}c�*�eZdZejZd�Zy)�=ClassPropertiesAndMethods.test_restored_object_new.<locals>.Bc��||_yr�rDrTs  r?r4zFClassPropertiesAndMethods.test_restored_object_new.<locals>.B.__init__:rUr@N)r�r�r�r`r�r4r�r@r?r�ri8s���n�n�G�
r@r��errorrk)r`rrf�warnings�catch_warnings�simplefilter�DeprecationWarningrEr�rr�)r:r}r�rTs    r?�test_restored_object_newz2ClassPropertiesAndMethods.test_restored_object_new2s��	%��	%�	
���.�!�,�	��	��
$�
$�
&��!�!�'�+=�>��!��A�'�	
�������"�������a�(�
�I����.�!�,�
�I�
�
$�
$�
&��!�!�'�+=�>��!��A�'�	
�������"�������a�(�'�
&��'�
&�s�#D:�#E�:E�Ec	��Gd�dt�}Gd�d|�}Gd�d|�}Gd�d||�}|j|j�|tg�|j|j|tf�|j|j�||tg�|j|j||tf�|j|j�||tg�|j|j||tf�|j|j�||||tg�|j|j||||tf�|j|�j	�d�Gd	�d
t
�}Gd�d|||||�
�}|j|jt|||||f�|j|�j	�d�	Gd�dt
�}Gd�dt|�
�}tj
|�}d|d<|jd�	Gd�dt
�}Gd�dt|�
�}|jd�	Gd�dt
�}Gd�dt|�
�}|jd�y#t$rY�pwxYw#t$rY�MwxYw#t$rYywxYw)Nc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_altmro.<locals>.Ac��yr|r�r�s r?r�z2ClassPropertiesAndMethods.test_altmro.<locals>.A.fM���r@N�r�r�r�r�r�r@r?r}rsLr�r@r}c��eZdZy)�0ClassPropertiesAndMethods.test_altmro.<locals>.BNrMr�r@r?r�rxNrOr@r�c��eZdZd�Zy)�0ClassPropertiesAndMethods.test_altmro.<locals>.Cc��yr�r�r�s r?r�z2ClassPropertiesAndMethods.test_altmro.<locals>.C.fQrur@Nrvr�r@r?r�rzPr�r@r�c��eZdZy)�0ClassPropertiesAndMethods.test_altmro.<locals>.DNrMr�r@r?rNr}RrOr@rNc��eZdZd�Zy)�?ClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaTypec�P�tj|�}|j�|Sr�)rG�mro�reverse)r��Ls  r?r�zCClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaType.mro_s���H�H�S�M���	�	���r@N�r�r�r�r�r�r@r?�PerverseMetaTyper^s��
r@r�c��eZdZy��0ClassPropertiesAndMethods.test_altmro.<locals>.XNrMr�r@r?r�r�crOr@r�rBc��eZdZd�Zy)�9ClassPropertiesAndMethods.test_altmro.<locals>._metaclassc��|ttgSr�)r�r`r�s r?r�z=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mrojs�� �$��/�/r@Nr�r�r@r?rIr�is��0r@rIc��eZdZyr�rMr�r@r?r�z0ClassPropertiesAndMethods.test_altmro.<locals>.Xlrr@r�r�zdevious mro() return not caughtc��eZdZd�Zy)r�c��dgSr�r�r�s r?r�z=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mro}s	���3�Jr@Nr�r�r@r?rIz9ClassPropertiesAndMethods.test_altmro.<locals>._metaclass|s��r@c��eZdZyr�rMr�r@r?r�z0ClassPropertiesAndMethods.test_altmro.<locals>.Xrr@z!non-class mro() return not caughtc��eZdZd�Zy)r�c��yr�r�r�s r?r�z=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mro�s��r@Nr�r�r@r?rIz9ClassPropertiesAndMethods.test_altmro.<locals>._metaclass�s��r@c��eZdZyr�rMr�r@r?r�z0ClassPropertiesAndMethods.test_altmro.<locals>.X�rr@z$non-sequence mro() return not caught)	r`rEr�r^r�rGr�r�r�)	r:r}r�r�rNr�r�rIr�s	         r?�test_altmroz%ClassPropertiesAndMethods.test_altmroJsa��	$��	$�	��	�	$��	$�	��1�	��������1�f�+�.�������Q��K�0��������1�a��.�1�������Q��6�N�3��������1�a��.�1�������Q��6�N�3��������1�a��A�v�"6�7�������Q��1�a��$8�9���������#�&�	�t�	�
	��!�A�a�#3�	�������V�Q��1�a��$;�<���������#�&�	9�
0�T�
0�
�F�j�
����q�!�A��A�a�D�
�I�I�7�8�		;�
�T�
�
�F�j�
�

�I�I�9�:�		>�
�T�
�
�F�j�
�

�I�I�<�=��3�	��	���	��	���	��	�s6�,:J�8 J+�* J:�	J(�'J(�+	J7�6J7�:	K�Kc���Gd�dt��G�fd�d��}|�}|j|jd�d|_|j|jd�|`|j|jd�|j|dd	�d
|d<|j|j
d�|d=|j|jd�|j|dd
dtdd
�f�d|dd
|j|j
tdd
�df�|dd
�=|j|jtdd
��y)Nc��eZdZdZy)�5ClassPropertiesAndMethods.test_overloading.<locals>.Bz<Intermediate class because object doesn't have a __setattr__N�r�r�r�rr�r@r?r�r��s��Jr@r�c�:��eZdZd�Z�fd�Z�fd�Zd�Zd�Zd�Zy)�5ClassPropertiesAndMethods.test_overloading.<locals>.Cc� �|dk(rd|fSt�)Nr�rHr�r�s  r?r�zAClassPropertiesAndMethods.test_overloading.<locals>.C.__getattr__�s���5�=�%�t�,�,�(�(r@c�H��|dk(r
||f|_y�j|||�S�Nr�)rdr*)r:r=rr�s   �r?r*zAClassPropertiesAndMethods.test_overloading.<locals>.C.__setattr__�s(����5�=�$(�%�=�D�L��=�=��t�U�;�;r@c�B��|dk(r||_y�j||�Sr�)r,r-)r:r=r�s  �r?r-zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delattr__�s"����5�=�#'�D�L��=�=��t�4�4r@c�
�d|fS)N�getitemr�rs  r?rpzAClassPropertiesAndMethods.test_overloading.<locals>.C.__getitem__�s
��!�3�'�'r@c��||f|_yr�)�setitem)r:rrs   r?r~zAClassPropertiesAndMethods.test_overloading.<locals>.C.__setitem__�s
�� #�U�|��r@c��||_yr�)�delitemrs  r?�__delitem__zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delitem__�s	��"��r@N)	r�r�r�r�r*r-rpr~r�)r�s�r?r�r��s!���
)�

<�

5�
(�
,�
#r@r�r/r�)r�r�r�)r�r��)r�r�rrr�)r`rEr�rdr,r�r�rY)r:r�rBr�s   @r?�test_overloadingz*ClassPropertiesAndMethods.test_overloading�s+���	K��	K�	#��	#�0
�C�������� 2�3����������K�0�
�E�������E�*�����2���0���"��������H�-�
�b�E�������B�'�����1�R��9�e�A�r�l�";�<���!�B��������U�1�b�\�5�$9�:�
�a��d�G�������U�1�b�\�3r@c	�
�Gd�d�}djd�td�D��}d|�d�}i}t||�|d}td	�D]1}|j||��t	td����3y)
Nc��eZdZd�Zy)�FClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.Numbersc�6�t|jd��S�Nrs)r-�lstrip�r:rus  r?r�zRClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.Numbers.__getattr__�s���4�;�;�s�+�,�,r@N�r�r�r�r�r�r@r?�Numbersr��s��
-r@r��, c3�(K�|]
}d|d�����y�w)zZ._�03dNr�)�.0�ns  r?�	<genexpr>zHClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.<genexpr>�s����<��A�C��#�w�-��s�iz"def number_attrs(Z):
    return [ z ]�number_attrs�)r4r�r]rEr6)r:r��attrs�coder�r�rss       r?�test_load_attr_extended_argz5ClassPropertiesAndMethods.test_load_attr_extended_arg�sz��	-�	-��	�	�<��s��<�<��4�U�G�2�>��
���T�2���.�)���r��A����\�'�)�4�d�5��:�6F�G�r@c	�~���Gd�dt���d��|j�j�d�G��fd�d��}|d�}|j|j�d�|j|j�d�|j|j	�d�G�fd�dt�}|j|�jj
�j�|j
t�jj�d���jd	��y)
Nc��eZdZd�Zd�Zy)�1ClassPropertiesAndMethods.test_methods.<locals>.Cc��||_yr��r�r�s  r?r4z:ClassPropertiesAndMethods.test_methods.<locals>.C.__init__��	����r@c��|jSr�r�r�s r?r�z5ClassPropertiesAndMethods.test_methods.<locals>.C.foo�s���v�v�
r@N)r�r�r�r4r�r�r@r?r�r��s��
�
r@r�rfc�B��eZdZW�jZW�jZy)�1ClassPropertiesAndMethods.test_methods.<locals>.DN)r�r�r�r�rhr�)r��c1s��r?rNr��s����%�%�C��&�&�Cr@rNrgc�(��eZdZW�jZy)�1ClassPropertiesAndMethods.test_methods.<locals>.ENr�rLs�r?r�r��rr@r�r)
r`rEr�rhr�rr�r�rerc)r:rNrr�r�r�s    @@r?�test_methodsz&ClassPropertiesAndMethods.test_methods�s����	��	�
�q�T���������1�%�	��	��q�T���������1�%��������1�%��������1�%�	��	��������)�)�1�5�5�1�����Q�U�U�]�]�1�Q�4�0�1�<�<�=M�N�Or@z)testing error message from implementationc�^�tj}d}|jt�5}|�ddd�|j	j
jd|�d}|jt�5}|d�ddd�|j	|j
jd|�|jt�5}|jd�ddd�|j	|j
jd|�y#1swY��xYw#1swY��xYw#1swY�KxYw)Nz*unbound method set.add() needs an argumentrzBdescriptor 'add' for 'set' objects doesn't apply to a 'int' object)r�r	rr�rEr�r;re)r:�set_addrr�s    r?�test_methods_in_cz+ClassPropertiesAndMethods.test_methods_in_c�s���
�'�'��F��
�
�
�y�
)�R��I�*�������*�*�1�-��?�^��
�
�
�y�
)�R��A�J�*�������*�*�1�-��?�
�
�
�y�
)�R��O�O�A��*�������*�*�1�-��?�*�
)��*�
)��*�
)�s#�D�8	D�D#�D�D �#D,c������d�}d�}d�}d�}d�}d�}d�}d/d�}d	�}	d
�}
�fd�}�fd�}d
�}
d�}dt|t�ifdt|t�ifdt|t�||d�fdtj
|t�ifd|	|t�ifd||td�ifd|
|td�ifd||t�d|
ifd||
t�d|ifdt|t�ifdt|t�ifdtj|t�ifdtj|t�ifdtj|t�ifd t|t�ifd!t|t�ifg}G��fd"�d#t�}G�fd$�d%t�}Gd&�d't��G�fd(�d)t�}|D�]\}}}�}Gd*�d+|�}|j!�D]\}}t#|||��t#|||�||��g�Gd,�d+|�}|j!�D]\}}t#|||��t#||||��||���j%�d-g|�Gd.�d+|�}|j!�D]\}}t#|||��t#|||���j'�||����y)0Nc�4�|5	ddd�y#1swYyxYwr�r�)�managers r?�run_contextzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.run_contexts�������s��c��|Sr�r�r�s r?�idenzBClassPropertiesAndMethods.test_special_method_lookup.<locals>.idens���Kr@c��y)Nshellor�r�s r?rNzCClassPropertiesAndMethods.test_special_method_lookup.<locals>.hellos��r@c��gSr�r�r�s r?�	empty_seqzGClassPropertiesAndMethods.test_special_method_lookup.<locals>.empty_seqs���Ir@c��yr�r�r�s r?�zerozBClassPropertiesAndMethods.test_special_method_lookup.<locals>.zero	s��r@c��y)N��?r�r�s r?�complex_numzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.complex_nums��r@c��t�r�)�
StopIterationr�s r?r+zBClassPropertiesAndMethods.test_special_method_lookup.<locals>.stop
s���r@c��y)NTr�)r:�things  r?�return_truezIClassPropertiesAndMethods.test_special_method_lookup.<locals>.return_trues��r@c�"�tt|�Sr�)r)r-�r�s r?�
do_isinstancezKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_isinstance����c�3�'�'r@c�"�tt|�Sr�)rr-r�s r?�
do_issubclasszKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_issubclassr�r@c�n��Gd�d|jt�}�j|�dd�y)Nc��eZdZy)�^ClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missing.<locals>.DictSubNrMr�r@r?�DictSubr�rr@r��hirn)rr�rE)�checkerr�r:s  �r?�do_dict_missingzMClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missings-���
�'�+�+�T�
����W�Y�t�_�a�0r@c�*���j|d�y)Nr�rn�rE)rHrr:s  �r?�some_numberzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.some_numbers������S�$�'�r@c��yr�r��r;s r?�swallowzEClassPropertiesAndMethods.test_special_method_lookup.<locals>.swallows��Dr@c��y�NrNr�)r:�specs  r?�format_implzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.format_impls��r@�	__bytes__�__reversed__�__length_hint__)r��__next__�
__sizeof__�__instancecheck__�__missing__r�__subclasscheck__�rJ�	__enter__�__exit__�__complex__�
__format__�	__floor__�	__trunc__�__ceil__�__dir__�	__round__c�*��eZdZW�fd�ZW�f�fd�	Zy)�EClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checkerc�D�|jdj|��y)Nz__getattr__ called with {0})r��format)r:ru�tests   r?r�zQClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattr__:s���	�	�7�>�>�t�D�Er@c�x��|�vr |jdj|��tj||�S)Nz __getattribute__ called with {0})r�r
r`r&)r:rur�oks   �r?r&zVClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattribute__<s5����r�>��I�I�@�G�G��M�N��.�.�t�T�:�:r@N�r�r�r�r�r&)r
r:s��r?�Checkerr9s���-1�
F�26�
;r@rc���eZdZd�Z�fd�Zy)�JClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescrc��||_yr�)�impl)r:rs  r?r4zSClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__init__A�	�� ��	r@c�^���jd�|jj||�Sr�)r�rre)r:r��owner�records   �r?rezRClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__get__Cs&����
�
�a� ��y�y�(�(��e�4�4r@N)r�r�r�r4re)rs�r?�SpecialDescrr@s
���
!�
5r@rc��eZdZy)�IClassPropertiesAndMethods.test_special_method_lookup.<locals>.MyExceptionNrMr�r@r?�MyExceptionrFrOr@rc���eZdZ�fd�Zy)�FClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescrc�����r�r�)r:r�rrs   �r?rezNClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescr.__get__Is	���!�!r@N�r�r�r�re)rs�r?�ErrDescrrH����
"r@r c��eZdZy��?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XNrMr�r@r?r�r$Mrr@r�c��eZdZyr#rMr�r@r?r�z?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XUrr@rfc��eZdZyr#rMr�r@r?r�z?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.X]rr@r�)r�r��reversedr6r��	getsizeofr�r
�math�floor�trunc�ceil�dir�roundr`�	Exceptionr7rdrEr)r:r�r�rNr�r�r�r+r�r�r�r�r�r�r��specialsrrr r=�runner�	meth_impl�envr�rur�rr
rs`                         @@@r?�test_special_method_lookupz4ClassPropertiesAndMethods.test_special_method_lookup�s����	�	�	�	�	�	�	 �	�	(�	(�	1�	�	!�	��%����r�2�
�X�y�#�%��<�
��d�C�E��d�
3�
5�
�3�=�=�$���r�:�
 �-��c�e�R�H�
�O�[�
��
 �"�
&�
 �-��
��
 �"�
&�
�+�t�S�U�Z�'�4J�K�
��g�s�u�{�T�6J�K�
�G�[�#�%��<�
�6�;���r�:�
�$�*�*�d�C�E�2�6�
�$�*�*�d�C�E�2�6�
����D�#�%��4�
��Y���r�2�
�%��s�u�b�1�'��,	;�f�	;�	5�6�	5�	�)�	�	"�v�	"�19�,�D�&�)�R��
�G�
� �Y�Y�[�	��c���4��%�)��A�t�Y�'��1�3�K��F�
�G�
� �Y�Y�[�	��c���4��%�)��A�t�\�)�4�5��1�3�K����V�a�S�$�/�
�G�
� �Y�Y�[�	��c���4��%�)��A�t�X�Z�(����k�6�1�3�7�-19r@c�X�Gd�dt�}|�}|�}|j|�|jt|�t|��t	|�t	|�|j||�|j
||k7�|j||k7�|j||k(�|jt|�jd�d�|jt|�t|��|jd|�td�D]}|j||��|jd|�Gd�dt�}|�}|�}|j|�|jt|�t|��t	|�t	|�|j||�|j||�|j||k7�|j||k(�|jt|�jd	�d�|jt|�t|��|jd|�td�D]}|j||��|jd|�Gd
�dt�}|d�}	|d�}
|d�}|j|	�|j|
�|jt	|	�t	d��|j|	|	�|j|	|
�|j|	|	k7�|j|	|
�|j
|	|
k�|j
|	|
k�|j
|
|	kD�|j
|
|	k\�|jt|	�d
�|jt|	�d�|td��}|jd|�td�D]}|j||��|jd|�y)Nc��eZdZd�Zy)�2ClassPropertiesAndMethods.test_specials.<locals>.Cc�6�d|cxkrdkr	|St�t��Nrr��
IndexErrorr,s  r?rpz>ClassPropertiesAndMethods.test_specials.<locals>.C.__getitem__j�����;�B�;�q��;� � �j� r@Nr-r�r@r?r�r7i���
!r@r�zC object at rrrc��eZdZd�Zy)�2ClassPropertiesAndMethods.test_specials.<locals>.Dc�6�d|cxkrdkr	|St�t�r9r:r,s  r?rpz>ClassPropertiesAndMethods.test_specials.<locals>.D.__getitem__�r<r@Nr-r�r@r?rNr?�r=r@rNzD object at c�T�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�6ClassPropertiesAndMethods.test_specials.<locals>.Proxyc��||_yr�r�r�s  r?r4z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__init__�r�r@c��|jSr�r�r�s r?r�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__bool__�s��#�v�v�:�~�%r@c�,�t|j�Sr�)�hashr�r�s r?�__hash__z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__hash__�s���D�F�F�|�#r@c� �|j|k(Sr�r�r�s  r?rAz=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__eq__�����v�v���&r@c� �|j|k7Sr�r�r�s  r?�__ne__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ne__�rIr@c� �|j|k\Sr�r�r�s  r?�__ge__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ge__�rIr@c� �|j|kDSr�r�r�s  r?�__gt__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__gt__�����v�v��~�%r@c� �|j|kSr�r�r�s  r?�__le__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__le__�rIr@c� �|j|kSr�r�r�s  r?�__lt__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__lt__�rPr@c� �d|jzS)NzProxy:%sr�r�s r?r�z>ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__str__�s��!�D�F�F�*�*r@c� �d|jzS)Nz	Proxy(%r)r�r�s r?r�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__repr__�s��"�T�V�V�+�+r@c��||jvSr�r�rs  r?rmzCClassPropertiesAndMethods.test_specials.<locals>.Proxy.__contains__�s�������&r@N)r�r�r�r4r�rGrArKrMrOrRrTr�r�rmr�r@r?�ProxyrB�s>��
�
&�
$�
'�
'�
'�
&�
'�
&�
+�
,�
'r@rXrfzProxy:0zProxy(0))r`rr��idrFrEr��assertGreaterEqualr>�findr��assertNotInr�r)
r:r�r��c2r�rNr�rrX�p0�p1�p_1�p10s
             r?�
test_specialsz'ClassPropertiesAndMethods.test_specialsdsi��
	!��	!��S��
�S�����R�� ����B�r�F�B�r�F�+��R���R������R� �����b��!�����r��"�����r��"�	
����B����^� <�a�@�����R��$�r�(�+�����R� ��r��A��M�M�!�R� ������R� �	!��	!��S��
�S�����R�� ����B�r�F�B�r�F�+��R���R������R� ����B��#�����r��"�����r��"�	
����B����^� <�a�@�����R��$�r�(�+�����R� ��r��A��M�M�!�R� ������R� �	'�F�	'�2�1�X��
�1�X���B�i����������R�� �����b��4��7�+�����R� ����B��#�����r��"����R���$�����R�� �����b��!�����R�� �����b��!�����R��)�,�����b��:�.��E�"�I�������S�!��r��A��M�M�!�S�!������S�!r@c��ddl}Gd�dt�}|�}|j|�}|j|�|�~t	j
�|j|�d�~Gd�dt�}|�}	|j|�|j
d�Gd�d	t�}|�}	|j|	�}|j|�|	�~	t	j
�|j|�d�~y#t$r%}|jdt|��Yd}~��d}~wwxYw)
Nrc��eZdZy)�2ClassPropertiesAndMethods.test_weakrefs.<locals>.CNrMr�r@r?r�re�rOr@r�c��eZdZdgZy)�7ClassPropertiesAndMethods.test_weakrefs.<locals>.NoWeakr�Nr�r�r@r?�NoWeakrg�s	����Ir@rhz!weakref.ref(no) should be illegalzweak referencec��eZdZddgZy)�5ClassPropertiesAndMethods.test_weakrefs.<locals>.Weakr�rfNr�r�r@r?�Weakrj�s���
�.�Ir@rk)
�weakrefr`�refrErrVr�r�rr>)
r:rlr�rX�rrh�nor�rk�yess
          r?�
test_weakrefsz'ClassPropertiesAndMethods.test_weakrefs�s���	��	�
�C���G�K�K��N�������a� �
����������d�#�
�	 �V�	 �
�X��	;��G�K�K��O�
�I�I�9�:�	/�6�	/��f���G�K�K���������c�"�����������d�#�
���	6��M�M�*�C��H�5�5��	6�s�D�	E�!E�Ec
��Gd�dt�}|�}|j|d�d|_|j|jd�|j|jd�|`|j|d�|j|d�|jj|d�|j|jj
|�d�|jj|�|j|d�|jd}|j|t�t|�}|jd|�|jd|�|jd	|�|jd
|�|j|jd�|j|j|jd�|j|j |jd
�|j|j"|jd�dD]$}	t%||d�|j'd|z��&d|_
|j|jd�Gd�dt�}|�}	|D]
}	t+|	��	|j'd�y#t($rG}t+|�j-d�dkr |j'd|�dt+|����Yd}~��d}~wwxYw#t.$rYywxYw)Nc�6�eZdZd�Zd�Zd�Zeeeed��Zy)�4ClassPropertiesAndMethods.test_properties.<locals>.Cc��|jSr�r.r�s r?�getxz9ClassPropertiesAndMethods.test_properties.<locals>.C.getx�rr@c��||_yr�r.rs  r?�setxz9ClassPropertiesAndMethods.test_properties.<locals>.C.setx�rr@c��|`yr�r.r�s r?�delxz9ClassPropertiesAndMethods.test_properties.<locals>.C.delx�r7r@�I'm the x property.��docN)r�r�r�rvrxrzr�r�r�r@r?r�rt�s"��
 �
!�
���t�T�/D�E�Ar@r�r�r�r/r�r�fget�fset�fdelr{rvrxrz)r~rr�zIexpected AttributeError from trying to set readonly %r attr on a property�readonlyrzwhen setting readonly attr z2 on a property, got unexpected AttributeError msg c��eZdZed��Zy)�4ClassPropertiesAndMethods.test_properties.<locals>.Dc��ddzSrr�)r\s r?r�z=ClassPropertiesAndMethods.test_properties.<locals>.D.<lambda>	s��Q�q�Sr@N)r�r�r�r�rpr�r@r?rNr�	s��"�=�1�Kr@rNz,expected ZeroDivisionError from bad property)r`rr�rEr/r�rer+rIrr�r-rrrr~rr�rdr�r�r>r[�ZeroDivisionError)
r:r�rB�rawr�rur�rNrMr�s
          r?�test_propertiesz)ClassPropertiesAndMethods.test_properties�sw��	F��	F�
�C�����a��%����������"�%�������b�!�
�C����a��%����a��)�	�����A�s����������Q���-�	�����q�����a��%��j�j��o�����c�8�,��C����
�
�i��'��
�
�f�e�$��
�
�f�e�$��
�
�f�e�$�������&;�<��
�
�c�h�h��
�
�6� 2�3��
�
�c�h�h��
�
�6� 2�3��
�
�c�h�h��
�
�6� 2�3�*�D�
7���T�2�&��	�	�/�15�6�7�+����������b�)�	2��	2�
�C��	F����A���

�I�I�D�E��+"�
Y��s�8�=�=��,�q�0��I�I�HL�c�RU�h�X�Y���
Y��$!�	��	�s*�
J�4K,�	K)�"=K$�$K)�,	K8�7K8rgz)Docstrings are omitted with -O2 and abovec�(��G�fd�dt�}y)Nc���eZdZd�Zd�Zee�ZW�jejd�ee��Z	W�je	jd�y)�?ClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.Ec��y)�
getter methodrr�r�s r?�getterzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.getter(	s��r@c��y)z
setter methodNr�)rHrs  r?�setterzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.setter+	���r@r�)rN)
r�r�r�r�r�r��proprEr�prop2r�s�r?r�r�'	sK���
�
��F�#�D����T�\�\�?�;��&�)�E����U�]�]�D�1r@r��r`)r:r�s` r?�test_properties_doc_attribz4ClassPropertiesAndMethods.test_properties_doc_attrib$	s���
	2��
	2r@c�P��	ddl�G�fd�dt�}y#t$rYywxYw)Nrc�4��eZdZeW�j�Zy)�>ClassPropertiesAndMethods.test_testcapi_no_segfault.<locals>.XN)r�r�r�r��test_with_docstring�p)�	_testcapis�r?r�r�;	s����Y�:�:�;�r@r�)r�r`�ImportError)r:r�r�s  @r?�test_testcapi_no_segfaultz3ClassPropertiesAndMethods.test_testcapi_no_segfault3	s+���	<��
<�F�
<���	��	�s��	%�%c�����Gd�dt����}|j�jjd�|j	|d�d|_|j|d�|j|jd�|j|jd�|`|j	|d�|j	|d�G�fd�d	��}|�}d
|_|j|jd
�|`|`Gd�dt����}d|_|j|jd�|`G�fd
�d��}|�}d|_|j|jd�|`y)Nc��eZdZed��Zej
d��Zejd��Zejd��Zy)�9ClassPropertiesAndMethods.test_properties_plus.<locals>.CrNr|c��|jSr���_foor�s r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.fooA	����y�y� r@c�$�t|�|_yr��r+r�rs  r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.fooD	�
����J��	r@c��|`yr�r�r�s r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.fooG	����Ir@N)r�r�r�r�r�r�r��deleterr�r@r?r�r�?	sN���w�'�C�
�Z�Z�
!��
!�
�Z�Z�
'��
'�
�[�[�
��
r@r�rNr�i���r�r�c�H��eZdZW�jjd��Zy)�9ClassPropertiesAndMethods.test_properties_plus.<locals>.Dc�(�	|`y#t$rYywxYwr�)r�r�r�s r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.D.fooV	s����	��%����s��	�N)r�r�r�r�r�rLs�r?rNr�U	s���
�U�U�]�]�
��
r@rNrc��eZdZed��Zej
d��Zej
d��Zejdd��Zy)�9ClassPropertiesAndMethods.test_properties_plus.<locals>.Ec��|jSr�r�r�s r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.fooc	r�r@c��t�r�)�RuntimeErrorrs  r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.foof	s��"�"r@c�$�t|�|_yr�r�rs  r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.fooi	r�r@Nc��|`yr�r�rs  r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.fool	r�r@r�)r�r�r�r�r�r�r�r�r@r?r�r�b	sV��
�
!��
!�
�Z�Z�
#��
#�
�Z�Z�
'��
'�
�[�[�
��
r@r�c�l��eZdZW�jjd��Zej
d��Zy)�9ClassPropertiesAndMethods.test_properties_plus.<locals>.Fc��|`yr�r�r�s r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.F.foov	r�r@c�&�td|�|_yr�)�maxr�rs  r?r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.F.fooy	s����5�M��	r@N)r�r�r�r�r�r�)r�s�r?rr�u	s3���
�U�U�]�]�
��
�
�Z�Z�
*��
*r@r���r)r`rEr�rrr�r�)	r:rXrNrMr9rr�r�r�s	       @@r?�test_properties_plusz.ClassPropertiesAndMethods.test_properties_plus>	sH���
	��
	�
�C�����������0����a��'�������1�f�%��������$��������#�
�E����a��(����a��'�	��	�
�C������������#�
�E�
�E�	��	�
�C������������#�
�E�	*��	*�
�C������������"�
�Er@c���t�}|j|i�ti�}|j|i�tddd��}|j|ddd��|j|tt|j����|j|tt	|j����tddd��}|j|tdd���|j|td"i|���|j|tddid���|j|tdgd�	��|j|td
dgfi|���|j|td"i|���ddd
ddgdfD]"}	t|�|jd|z��$|jt�5tii�ddd�Gd�d�}	t|��|jd�d�|_	d�|_
t|��}|j||j�Gd�d�}t|dd�|dd�|dd�|dd�g�}|j|ddd��tttd�tdd���}|j|ttd�D�cgc]	}||dzf��c}��dgd gfD]"}	t|�|jd!|z��$y#t$rY���t$r|dk(rn|jd|z�Y���wxYw#1swY��|xYw#t$rY��_wxYwcc}w#t$rY��wxYw)#NrgrT)rfrBrf)�one�twor�)r�)r�rg)r�)r�r�)r�r1ry�0�rzno TypeError from dict(%r)c��eZdZdddd�Zy)�AClassPropertiesAndMethods.test_dict_constructors.<locals>.Mappingrgrnr�)rfrkrBN)r�r�r�r�r�r@r?�Mappingr��	s���1�"�%�Dr@r�z*no TypeError from dict(incomplete mapping)c�H�t|jj��Sr�)r6r�r�r�s r?r�zBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>�	s��D������)9�$:r@c� �|j|Sr�)r�r,s  r?r�zBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>�	s��d�i�i��lr@c��eZdZd�Zd�Zy)�JClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntryc� �||_||_yr�)�first�last)r:r�r�s   r?r4zSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__init__�	s��"��
� ��	r@c�D�t|j|jg�Sr�)r�r�r�r�s r?r�zSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__iter__�	s���T�Z�Z����3�4�4r@N)r�r�r�r4r�r�r@r?�AddressBookEntryr��	s��
!�
5r@r��Tim�Warsaw�Barry�Peters)r�r�rnr�)�tooshort)�too�longzby 1zno ValueError from dict(%r)r�)
r�rEr6r7r�r�r��
ValueErrorrr�rp�zipr�)r:rM�badargr�r�r��bads       r?�test_dict_constructorsz0ClassPropertiesAndMethods.test_dict_constructors�	s5���F������B����H������B���Q�S�!�"��������,�-�����D��a�g�g�i��1�2�����D��a�g�g�i��1�2����#�$������D�Q�A�.�/�����D�I�1�I�&�����D�%����3�4�����D�*��1�5�6�����D�,��!=�C��C�D�����D�I�1�I�&���B��a�S�$�.�F�

A��V���	�	�6��?�@�/� �
�
�y�
)���R�L�*�	&�	&�	D����O�
�I�I�B�C�:���:������O������G�L�L�)�	5�	5�
�"�5�(�3�"�7�H�5�"�5�(�3�"�7�H�5�7�
8��	
����h�x�@�A���U�1�X�u�Q��{�+�,������D�E�!�H�!=�H�q�1�a��c�(�H�!=�>�?�"�?�%<�$=�=�C�
?��S�	��	�	�7�#�=�>�
>��e�
���
E��S�=���I�I�:�V�C�D��
E��*�
)���	��	��2">���
��
�sN�
L�
M� M�
M$�0M)�	M�"M�M�M�	M!� M!�)	M5�4M5c�`��d}|jt�ddg�~dddddgddd	ddit|jfD]
}t|��d
�}Gd�dt�}d
dg}|j|t|��|�|�}|j|t|��|�d|_d�|_|j|t|��|ddgz�Gd�d|�}ddg|z}|j|t|��|�|�}	|j|t|	��|�d|	_d�|	_|j|t|	��|ddgz�Gd�dtt��}
|
d�}d|_
d|_gd�}t|�D�
cgc]	}
|
|vs�|
��}}
|j|dd g�Gd!�d"|
�}|d#�}d|_
d|_|j|jd$�|jt�5t|�ddd�|jtt	��tt��G�fd%�d&t��G�fd'�dt�}t|��ycc}
w#1swY�qxYw)(Nr��junkr:rgy@g@�2�2)rgc�P�|D�cgc]}|jd�r�|��c}Scc}wr�)rc)�stringsr\s  r?�interestingz7ClassPropertiesAndMethods.test_dir.<locals>.interesting�	s%��&�@�w�!�a�l�l�3�.?�A�w�@�@��@s�#�#c��eZdZdZd�Zy)�-ClassPropertiesAndMethods.test_dir.<locals>.Crfc��yr�r�r�s r?�Cmethodz5ClassPropertiesAndMethods.test_dir.<locals>.C.Cmethod�	���tr@N)r�r�r��Cdatar�r�r@r?r�r��	�
���E�#r@r�r�r�c��yr�r�r�s r?r�z4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>�	���r@�cdata�cmethodc��eZdZdZd�Zy)�-ClassPropertiesAndMethods.test_dir.<locals>.Arfc��yr�r�r�s r?�Amethodz5ClassPropertiesAndMethods.test_dir.<locals>.A.Amethod�	r�r@N)r�r�r��Adatar�r�r@r?r}r��	r�r@r}r�r�r�c��y)Nrkr�r�s r?r�z4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>�	r�r@�adata�amethodc��eZdZy)�-ClassPropertiesAndMethods.test_dir.<locals>.MNrMr�r@r?�Mr��	rOr@r�rOrf)r�r�__package__�
__loader__�__spec__rBrTc�"�eZdZd�Zee�Zy)�.ClassPropertiesAndMethods.test_dir.<locals>.M2c��y)N�Not a dict!r�r�s r?�getdictz6ClassPropertiesAndMethods.test_dir.<locals>.M2.getdict	
s��$r@N)r�r�r�r�r�rIr�r@r?rir�
s��
%���(�Hr@ri�m2r�c�4��eZdZd�Zd�Z�fd�Zd�Z�fd�Zy)�3ClassPropertiesAndMethods.test_dir.<locals>.Wrapperc��||_yr���
_Wrapper__objr*s  r?r4z<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__init__
�	�� ��
r@c�2�dt|j�zS)NzWrapper(%s))r�rr�s r?r�z<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__repr__
s��$�t�D�J�J�'7�7�7r@c�.���|j|�Sr�r)r:r�Wrappers  �r?rpz?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getitem__
s����t�z�z�#��/�/r@c�,�t|j�Sr�)r	rr�s r?rxz;ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__len__ 
s���4�:�:��&r@c�<���t|j|��Sr�)rHr)r:r=rs  �r?r�z?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getattr__"
s����w�t�z�z�4�8�9�9r@N)r�r�r�r4r�rprxr��rs�r?rr�
s���
!�
8�
0�
'�
:r@rc�(��eZdZ�fd�Zee�Zy)r�c�&���t|��Sr�)rG)r:rs �r?�
__getclassz8ClassPropertiesAndMethods.test_dir.<locals>.C.__getclass&
s����t�D�z�*�*r@N)r�r�r��_C__getclassr�rr	s�r?r�z-ClassPropertiesAndMethods.test_dir.<locals>.C%
s���
+� ��,�Ir@)rEr-rG�test_dirr`r�r�r�r�r�rTrBrIrr��Ellipsis)r:r�r�r�r��cstuffrXr}�astuffrBr��	minstance�default_attributesr��namesri�
m2instancers                 @r?rz"ClassPropertiesAndMethods.test_dir�	so������������ 0�1���a��S�1�#�s�D�$��1��t�T�]�]�R�C���H�S�
	A�	$��	$��9�%������S��V�,�f�5�
�C������S��V�,�f�5����"��	�����S��V�,�f���7K�.K�L�	$��	$��9�%��.������S��V�,�f�5�
�C������S��V�,�f�5����"��	�����S��V�,�f���7K�.K�L�	��S�	�	��c�F�	��	���	��8���	�N�J�N�q�a�7I�.I��N��J������c�
�+�	)��	)�
��X�
��
���
������,�,�m�<�
�
�
�y�
)��
�O�*�
	
����V�X���H�
�6�
	:�f�
	:�	-��	-�
	�A�C���KK�*�
)�s�2	J�<J�(J$�$J-c�4���	�
���Gd�dt�}|j|�jd�d�G�fd�d|��|j��jd�d�Gd	�d
|�}t|�|_|j|�jd�d�G�	fd
�d|���	|j�	�jd�d�G�fd�dt��G�
�fd�d�	��
|j�
�jd�d�Gd�d�
�}�|�|_|j|�jd�d�	t�	d�|j
d�	t�	|��|j
d�	t�	�jd�|j
d�	t�	�j|��|j
d �Gd!�d"t�}Gd#�d$|�}|�}|j|jd%�|jt||�&d�Gd&�d't�}G�fd(�d)|��|j�j�|j�|jt�5t|d�*�ddd�y#t$rY��UwxYw#t$rY��BwxYw#t$rY��&wxYw#t$rY��wxYw#1swYyxYw)+Nc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_supers.<locals>.Ac��d|zS)NzA(%r)r��r:rBs  r?rLz5ClassPropertiesAndMethods.test_supers.<locals>.A.meth0
s����{�"r@Nrr�r@r?r}r/
���
#r@r}rfzA(1)c�(���eZdZ��fd�Zd�Z�xZS)�0ClassPropertiesAndMethods.test_supers.<locals>.Bc�(��t�|�|_yr�)rur�)r:r�rs ��r?r4z9ClassPropertiesAndMethods.test_supers.<locals>.B.__init__6
s���$�Q��~��r@c�D�d|z|jj|�zS)NzB(%r)r�rs  r?rLz5ClassPropertiesAndMethods.test_supers.<locals>.B.meth8
� ����{�T�\�\�%6�%6�q�%9�9�9r@)r�r�r�r4rLrx)rr�s@�r?r�r5
s
���
.�
:r@r�rgzB(2)A(2)c��eZdZd�Zy)�0ClassPropertiesAndMethods.test_supers.<locals>.Cc�D�d|z|jj|�zS)NzC(%r)r�rs  r?rLz5ClassPropertiesAndMethods.test_supers.<locals>.C.meth>
r r@Nrr�r@r?r�r"=
s��
:r@r�rkzC(3)A(3)c�"���eZdZ��fd�Z�xZS)�0ClassPropertiesAndMethods.test_supers.<locals>.Dc�.��d|zt�|�|�zS)NzD(%r))rurL)r:rBrNrs  ��r?rLz5ClassPropertiesAndMethods.test_supers.<locals>.D.methE
s�����{�U�1�d�%8��%;�;�;r@)r�r�r�rLrx)rrNs@�r?rNr%D
�
���
<�
<r@rNrnzD(4)C(4)B(4)A(4)c�"���eZdZ��fd�Z�xZS)�6ClassPropertiesAndMethods.test_supers.<locals>.mysuperc���t�|�|�Sr�r~)r:r;r�mysupers  ��r?r4z?ClassPropertiesAndMethods.test_supers.<locals>.mysuper.__init__M
s����W�d�4�d�;�;r@)r�r�r�r4rx)rr+s@�r?r+r)L
r'r@r+c���eZdZ��fd�Zy)�0ClassPropertiesAndMethods.test_supers.<locals>.Ec�@��d|z��|�j|�zS)NzE(%r))rL)r:rBr�r+s  ��r?rLz5ClassPropertiesAndMethods.test_supers.<locals>.E.methQ
s$�����{�W�Q��%5�%:�%:�1�%=�=�=r@Nr)r�r+s��r?r�r-P
s���
>r@r�r�zE(5)D(5)C(5)B(5)A(5)c��eZdZd�Zy)�0ClassPropertiesAndMethods.test_supers.<locals>.Fc�x�|j}d|�d|jj�d�|j|�zS)NzF(z)[�])�	_F__superrr�rL)r:rBr\s   r?rLz5ClassPropertiesAndMethods.test_supers.<locals>.F.methW
s-���L�L��&'����)=�)=�>������J�Jr@Nrr�r@r?rr0V
s��
Kr@rr�z!F(6)[mysuper]E(6)D(6)C(6)B(6)A(6)r�zshouldn't allow super(D, 42)zshouldn't allow super(D, C())r�z$shouldn't allow super(D).__get__(12)z%shouldn't allow super(D).__get__(C())c�"�eZdZd�Zee�Zy)�5ClassPropertiesAndMethods.test_supers.<locals>.DDbasec��yrlr�r�s r?rvz:ClassPropertiesAndMethods.test_supers.<locals>.DDbase.getx�
s��2r@N�r�r�r�rvr�r�r�r@r?�DDbaser5
s��%����Ar@r8c�"�eZdZd�Zee�Zy)�4ClassPropertiesAndMethods.test_supers.<locals>.DDsubc��yr�r�r�s r?rvz9ClassPropertiesAndMethods.test_supers.<locals>.DDsub.getx�
s��7r@Nr7r�r@r?�DDsubr:�
s��*����Ar@r<rNc��eZdZed��Zy)�3ClassPropertiesAndMethods.test_supers.<locals>.Basec��yr�r�r�s r?r�z<ClassPropertiesAndMethods.test_supers.<locals>.Base.<lambda>�
s��%r@N)r�r�r�r��aPropr�r@r?�Baser>�
s
���/�0�Er@rAc�,���eZdZe��fd��Z�xZS)�2ClassPropertiesAndMethods.test_supers.<locals>.Subc���t�|�Sr�)rur@)�klass�Subrs ��r?rz7ClassPropertiesAndMethods.test_supers.<locals>.Sub.test�
s����S��-�-r@)r�r�r�r�rrx)rrFs@�r?rFrC�
s���
�
.��
.r@rFr�)
r`rErLrur�r3r�r�rer�rr@r)r:r}r�rr8r<�ddrAr�rNr�rFr+rs        @@@@@�r?�test_supersz%ClassPropertiesAndMethods.test_supers,
s����	#��	#�	
�������!��f�-�	:��	:�	
�������!��j�1�	:��	:��A�h����������!��j�1�	<��1�	<�	
�������!��&8�9�	<�e�	<�	>��	>�	
�������!��&<�=�	K��	K��a�j����������!��&I�J�	6��!�R�L�
�I�I�4�5�	7��!�Q�S�M�
�I�I�5�6�	>��!�H���R� �
�I�I�<�=�	?��!�H���Q�S�!�
�I�I�=�>�
	�V�	�	�F�	��W��������w�'�����u�b�+�R�0�
	1�6�	1�	.�$�	.�
	
�������T�Z�Z�0��
�
�y�
)��$�1��*�
)��o�	��	���	��	���	��	���	��	��D*�
)�sT�(K�K�)K.�K>�7L�	K�K�	K+�*K+�.	K;�:K;�>	L�
L�Lc�4���G�fd�dt��|jt�d�dz�d�|jt�d�dz�d��d�}|j|d�|jt|�d�|jt|�jt�|jt|�td��|j|�jt�|j|d	z	jt�|j|d	zjt�|j�d	�d
zjt�|j�d	�d
z	jt�G�fd�dt��|jt
�d
�dz�d�|jt
d�d�z�d��d�}|j|d�|jt|�d�|jt|�td��|jt|�jt�|j|�jt�|j|jt�|j�d	�jt�|j|d	z	jt�|j|d	zjt�|j|d	z
jt�|j|dzjt�|j|dzjt�|j|dzjt�|jd|zjt�|j|d	zjt�|j|d	zjt�|j|dzjt�|j�d	�d
zjt�|j�d	�d
z	jt�|jt�d	��jt�Gd�dt�}|d�}|j|d	zjt�|jd	|zjt�|d�}|j|ji�|jt|�d�Gd�dt�}|jt|d��d�|d�}|j|d�|jt|�d�|jt|�jt�|jt|�td��|j|�jt�Gd�dt�}|dd�}|jt|�d�tdd�}|j|jt�|j||�|jt|�|�|jt|�jt�||�}|jt|�d�|j||�|jt|�|�|jt|�jt�|jt|�t|��|j|�jt�|j|d	zjt�|j|d	z|�|j|d	z
jt�|j|d	z
|�|j|dzjt�|j|dz|�|j|dzjt�|j|dz|�Gd �d!t�}|d"�}|j|d"�|j|j�|d#��|j|j�j�|d"��td$�D]E}|t|��}|j�}	|	j�}
|j|
|��G|d%�}|jt|�d%�|jt|�jt�|jt|�td%��|j|ddjt�|j|dzjt�|j|d	zjt�|j|d&zjt�|d&�}|jt|�d&�|jt|�jt�|j||zjt�|j|d	zjt�|j|dzjt�|j|d'zjt�|j|ddjt�Gd(�d)t�}|d*�}|j|d*�|j|j�|d+��|j|j�j�|d*��td,�D]b}|d-jtt t|����}|j�}|j�}	|j|	|��d|d.�}|jt
|�d.�|jt
|�jt�d/}||�}|j||�|jt
|�|�|jt
|�jt�|jt|�t|��|j|di|d�|j|di|d�|j|d-zjt�|j|d-z|�|jd-|zjt�|jd-|z|�|j|d	zjt�|j|d	zd-�|j|dzjt�|j|dz|�|j|d'zjt�|j|d'z||z�|j|ddjt�|j|dd|�|j|d	d	jt�|j|d	d	d-�|j|j#�jt�|j|j#�|�|j|j%�jt�|j|j%�|�|j|j'�jt�|j|j'�|�i}
|j|j)|
�jt�|j|j)|
�|�|j|j+d0d0�jt�|j|j+d0d0�|�|j|j-t/|��jt�|j|j-t/|��|�|j|j1t/|��jt�|j|j1t/|��|�|j|j3t/|��jt�|j|j3t/|��|�|j|j5�jt�|j|j5�|�Gd1�d2t�}|d3�}	|j|	d3�|j|	j�|d4��|j|	j�j�|d3��d.}||�}	|jt
|	�|�|jt
|	�jt�|jt|	�t|��|j|	di|d�|j|di|	d�|j|	j#�jt�|j|	j#�|�|j|	j%�jt�|j|	j%�|�|j|	j'�jt�|j|	j'�|�|j|	j+d0d0�jt�|j|	j+d0d0�|�|j|	j+d5d5�jt�|j|	j+d5d5�|�|j|	j3t/|	��jt�|j|	j3t/|	��|�|j|	j-t/|	��jt�|j|	j-t/|	��|�|j|	j1t/|	��jt�|j|	j1t/|	��|�|j|	j5�jt�|j|	j5�|�|j|	j7�jt�|j|	j7�|�|j|	j9�jt�|j|	j9�|�|j|	j;�jt�|j|	j;�|�|j|	d-zjt�|j|	d-z|�|jd-|	zjt�|jd-|	z|�|j|	d	zjt�|j|	d	zd-�|j|	dzjt�|j|	dz|�|j|	d'zjt�|j|	d'z||z�|j|	ddjt�|j|	dd|�|j|	d	d	jt�|j|	d	d	d-�Gd6�d7t<�}|td��}|j|t=td���|j?d8�|j|t=td��d8gz�d|d<|j|t=td9���|jAtd9d:��|j|t=td:���g|d;d|j|t=td<���|d=d<�=|jt/|�d=�|j|t=td=���|jt=|�t=td=���|j|d	d	�|j|dd�|j|d>d	�|j|dd�|j|ddt=td���y)?Nc���eZdZd�Z�fd�Zy)�@ClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexintc��t|�Sr�)�hexr�s r?r�zIClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__repr__�
����4�y� r@c�<���tj||��Sr�)r-ri)r:r��hexints  �r?rizHClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__add__�
s����c�k�k�$��6�7�7r@N)r�r�r�r�ri)rPs�r?rPrK�
s
���
!�
8r@rP��	�0x10i��0x3efi90rr�c�0���eZdZgZd�Z��fd�ZeZ�xZS)�AClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlongc��t|�Sr�)�octr�s r?r�zIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__str__�
rNr@c�@��|jt�|�|��Sr�)rruri)r:r�r�octlongs  ��r?rizIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__add__�
s����~�~�e�G�T�&B�5�&I�J�Jr@)r�r�r�r�r�rir�rx)rrZs@�r?rZrV�
s����I�
!�
K��Hr@rZrkr��0o10i��0o5675rfrc��eZdZy)�CClassPropertiesAndMethods.test_basic_inheritance.<locals>.longcloneNrMr�r@r?�	longcloner^�
rOr@r_c� �eZdZdgZdd�Zd�Zy)�CClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloatr�c�$�t|�|_yr�)r-r�)r:rr�s   r?r4zLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__init__�
s
����I��	r@c�$�d|j|fzS)Nr�r�r�s r?r�zLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__repr__�
s������D� 1�1�1r@N)r�r�)r�r�r�r�r4r�r�r@r?�	precfloatra�
s����I�
&�
2r@rdg�������?z1.1g��@c��eZdZd�Zy)�DClassPropertiesAndMethods.test_basic_inheritance.<locals>.madcomplexc�8�d|j|jfzS)Nz%.17gj%+.17g�r�r�r�s r?r�zMClassPropertiesAndMethods.test_basic_inheritance.<locals>.madcomplex.__repr__�
s��%����D�I�I�(>�>�>r@N)r�r�r�r�r�r@r?�
madcomplexrf�
s��
?r@ri���rnz4j-3c��eZdZdZd�Zy)�BClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtupleNc��|j�|jSt|�}|j�|j|�|_|jSr�)�_revr6r�r�r:r�s  r?�revzFClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtuple.revsB���9�9�(��9�9�$���J���	�	�� �N�N�1�-��	��y�y� r@�r�r�r�rnrpr�r@r?�madtuplerl	����D�
!r@rr)
rfrgrkrnr�r�rQ�rRr)
rrRrtrQr�r�rnrkrgrfi)rfrgrkrnr�r�rgc��eZdZdZd�Zy)�CClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstringNc���|j�|jSt|�}|j�|jdj	|��|_|jS�Nr��rnr6r�rr4ros  r?rpzGClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstring.rev.�J���9�9�(��9�9�$���J���	�	�� �N�N�2�7�7�1�:�6��	��y�y� r@rqr�r@r?�	madstringrv,rsr@r{�abcdefghijklmnopqrstuvwxyz�zyxwvutsrqponmlkjihgfedcba�r��12345zr�c��eZdZdZd�Zy)�DClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicodeNc���|j�|jSt|�}|j�|jdj	|��|_|jSrxryros  r?rpzHClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicode.revnrzr@rqr�r@r?�
madunicoder�lrsr@r��ABCDEF�FEDCBA�xyc��eZdZy)�AClassPropertiesAndMethods.test_basic_inheritance.<locals>.sublistNrMr�r@r?�sublistr��rOr@r�rNr������rr�)!r-rEr�rrrFr>r+rIr.r�r�rpr�r4�mapr+�stripr��rstrip�	translate�replace�ljustr	�rjust�center�lower�upper�
capitalize�titler6r�r2)r:rBr_rdri�baserrr�rNr�r�r{r\�identitytabr�r�rPrZs                @@r?�test_basic_inheritancez0ClassPropertiesAndMethods.test_basic_inheritance�
s���	8�S�	8�	
����f�Q�i�!�m�,�f�5�����f�T�l�Q�.�/��9��5�M������E�"�����Q���'��
�
�c�!�f�&�&��,�����a��$�u�+�.��
�
��r�n�n�c�*��
�
�q�A�v�(�(�#�.��
�
�q�A�v�(�(�#�.��
�
�v�a�y�B��1�1�3�7��
�
�v�a�y�B��1�1�3�7�	�c�	�	
����W�Q�Z�!�^�,�f�5�	
����Q����.�/��:��E�N������E�"�����Q���'�����a��$�u�+�.��
�
�c�!�f�&�&��,��
�
��r�n�n�c�*��
�
��r�n�n�c�*��
�
���
�{�-�-�s�3��
�
�q�A�v�(�(�#�.��
�
�q�A�v�(�(�#�.��
�
�q�1�u�'�'��-��
�
�q�1�u�'�'��-��
�
�q�A�v�(�(�#�.��
�
�q�A�v�(�(�#�.��
�
�q�1�u�'�'��-��
�
�q�1�u�'�'��-��
�
�q�1�u�'�'��-��
�
�q�2�v�(�(�#�.��
�
�w�q�z�R�'�2�2�C�8��
�
�w�q�z�R�'�2�2�C�8��
�
�c�'�!�*�o�/�/��5�	��	��a�L���
�
�q�1�u�'�'��-��
�
�q�1�u�'�'��-�
�b�M��������R�(�����Q���$�	2��	2�	
����i��n�-�u�5��e�������G�$�����q��7�+��
�
�e�A�h�(�(�%�0�����a��$�w�-�0��
�
��r�n�n�e�,�	?��	?�
�r�1�������a��&�)��r�1�~���������1�����D�!�������T�*�������-�-�w�7��q�M������a��&�)�����D�!�������T�*�������-�-�w�7�����a��$�t�*�-����1�"����1����!�a�%�*�*�G�4�����Q���%����!�a�%�*�*�G�4�����Q���%����!�a�%�*�*�G�4�����Q���%����!�a�%�*�*�G�4�����Q���%�	!�u�	!�
�*�+������1�2��������(�+@�"A�B������������1F�(G�H��s��A���q��"�A�����A�����A����Q��"�	�

�[�!������q��;�/��
�
�e�A�h�(�(�%�0�����a��$�{�"3�4��
�
�a��d�n�n�e�,��
�
�q�1�u�'�'��/��
�
�q�1�u�'�'��/��
�
�q�2�v�(�(�%�0��R�L������q��2�&��
�
�e�A�h�(�(�%�0��
�
�q�1�u�'�'��/��
�
�q�1�u�'�'��/��
�
�q�1�u�'�'��/��
�
�q�1�u�'�'��/��
�
�a��d�n�n�e�,�	!��	!�
�2�3������8�9��������)�,H�"I�J�����������	�2N�(O�P��s��A��"�'�'�#�c�5��8�"4�5�6�A�����A�����A����Q��"�	�

�g�������Q���)��
�
�c�!�f�&�&��,����d�O������D�!�����Q���&��
�
�c�!�f�&�&��,�����a��$�t�*�-����!�Q����q�)����$���1��q�)��
�
�q�2�v�(�(�#�.�����R���&��
�
�r�A�v�(�(�#�.�����a���&��
�
�q�1�u�'�'��-�����Q���#��
�
�q�1�u�'�'��-�����Q���%��
�
�q�1�u�'�'��-�����Q���t��,��
�
�a��d�n�n�c�*�����1��t�$��
�
�a��!�f�&�&��,�����1�Q���$��
�
�a�g�g�i�)�)�3�/��������D�)��
�
�a�h�h�j�*�*�C�0��������T�*��
�
�a�h�h�j�*�*�C�0��������T�*����
�
�a�k�k�+�.�8�8�#�>�������[�1�4�8��
�
�a�i�i��S�)�3�3�S�9�������3��,�d�3��
�
�a�g�g�c�!�f�o�/�/��5��������Q���$�/��
�
�a�g�g�c�!�f�o�/�/��5��������Q���$�/��
�
�a�h�h�s�1�v�&�0�0�#�6�������#�a�&�)�4�0��
�
�a�g�g�i�)�)�3�/��������D�)�	!��	!�
�x� ������H�%��������*�X�"6�7�����������
�8�(<�=����t�������Q���&��
�
�c�!�f�&�&��,�����a��$�t�*�-����!�Q����q�)����$���1��q�)��
�
�a�g�g�i�)�)�3�/��������D�)��
�
�a�h�h�j�*�*�C�0��������T�*��
�
�a�h�h�j�*�*�C�0��������T�*��
�
�a�i�i��S�)�3�3�S�9�������3��,�d�3��
�
�a�i�i��d�+�5�5�s�;�������4��.��5��
�
�a�h�h�s�1�v�&�0�0�#�6�������#�a�&�)�4�0��
�
�a�g�g�c�!�f�o�/�/��5��������Q���$�/��
�
�a�g�g�c�!�f�o�/�/��5��������Q���$�/��
�
�a�g�g�i�)�)�3�/��������D�)��
�
�a�g�g�i�)�)�3�/��������D�)��
�
�a�l�l�n�.�.��4���������.��
�
�a�g�g�i�)�)�3�/��������D�)��
�
�q�2�v�(�(�#�.�����R���&��
�
�r�A�v�(�(�#�.�����a���&��
�
�q�1�u�'�'��-�����Q���#��
�
�q�1�u�'�'��-�����Q���%��
�
�q�1�u�'�'��-�����Q���t��,��
�
�a��d�n�n�c�*�����1��t�$��
�
�a��!�f�&�&��,�����1�Q���$�	�d�	��E�!�H�������D��q��N�+�	���������D��q��N�g�Y�6�7���!������D��q��N�+�	����q�"�������D��r��O�,���"�#������D��r��O�,�
�b��e�H�����Q���$�����D��r��O�,�����a��$�u�R�y�/�2�����1��q�!�����1��q�!�����3���#�����2���"�����2�A���U�1�X��/r@c��|jtd�5td��ddd�|jtd�5td��ddd�|jtd�5t	d��ddd�|jt
dd��t
dd��|jtd�	�d
�|jtdd�
�d�|jtd�5ttd���ddd�|jtd�5td��ddd�ttttttttfD] }	|d��|jd|z��"y#1swY��mxYw#1swY��OxYw#1swY��1xYw#1swY��xYw#1swY��xYw#t$rY�nwxYw)Nzkeyword argumentrfr�rgr�i�rhi�r��500�abc�strict)r`�errorsr$rk)�sequencer.)�bogus_keyword_argz4expected TypeError from bogus keyword argument to %r)r[r�r-r.�boolrEr�r>r�r�r6r�)r:�constructors  r?�
test_keywordsz'ClassPropertiesAndMethods.test_keywords�si��
�
#�
#�I�/A�
B��!�H�C�
�
#�
#�I�/A�
B��A�J�C�
�
#�
#�I�/A�
B��1�I�C�����b�s�3�W�S�"�5E�F�����C��%�0�����F�8�<�e�D�
�
#�
#�I�/A�
B��5��8�$�C�
�
#�
#�I�/A�
B��)�$�C� ���W�c�3�!�4�)�K�
+��a�0��	�	�P�)�*�+�)�C�
B��
B�
B��
B�
B��
C�
B��
B�
B���
��
�sM�
F�
F�-
F)�8F6�,
G�/	G�F�F&�)F3�6F?�G�	G�Gc���G�fd�dt��|j�d�d�|jd�d��|jt�d��d��d�d�d�d	�d
�di}|j|�d�d�|j|�d�d	�|j|�d
�d�|j�d�|�|j|j�d��d�y)Nc�(��eZdZdZd�Z�fd�Zd�Zy)�FClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistrz�Subclass of str that computes __eq__ case-insensitively.

            Also computes a hash code of the string in canonical form.
            c�b�|j�|_t|j�|_yr�)r��	canonicalrF�hashcoders  r?r4zOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__init__s��!&������ $�T�^�^� 4��
r@c�^��t|��s�|�}|j|jk(Sr�)r)r�)r:r��cistrs  �r?rAzMClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__eq__s)���!�%��/�!�%�L�E��~�~����8�8r@c��|jSr�)r�r�s r?rGzOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__hash__s���}�}�$r@N)r�r�r�rr4rArG)r�s�r?r�r�s���
�

5�
9�

%r@r��ABCr$�aBcr�rfr�rg�tHreerk�tWo�THrEE�ONe�thrEE)r>rErr�)r:rMr�s  @r?�test_str_subclass_as_dict_keyz7ClassPropertiesAndMethods.test_str_subclass_as_dict_keys����	%�C�	%�$	
����u��u�-������e��-�����U�5�\�*�E�2�
�5�\�1�e�E�l�A�u�W�~�q�A������5��<��!�,�����5��<��!�,�����5��>�*�A�.��
�
�e�E�l�A�&�������u�W�~�.��2r@c��
�Gd�d�}|ttfD]�}G�
fd�d|��
�
d�}�
d�}�
d�}|j|d�|||d�}dD]�}dD]�}d	D]�}	|jtd
|	z�td|	z�d||fz�|jtd
|	z�td|	z�d||fz�|jtd|	z�td|	z�d||fz���������y)Nc��eZdZy)�CClassPropertiesAndMethods.test_classic_comparisons.<locals>.classicNrMr�r@r?�classicr�%rOr@r�c�P��eZdZd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z	y)	�=ClassPropertiesAndMethods.test_classic_comparisons.<locals>.Cc�$�t|�|_yr��r-rrs  r?r4zFClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__init__*�
��!$�U��D�Jr@c���t|��r|j|jk(St|t�st|t�r|j|k(StSr��r)rr-r��r:r�r�s  �r?rAzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__eq__,�H���!�%��+�#�z�z�U�[�[�8�8�!�%��-��E�3�1G�#�z�z�U�2�2�)�)r@c���t|��r|j|jk7St|t�st|t�r|j|k7StSr�r�r�s  �r?rKzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ne__2r�r@c���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r?rTzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__lt__8�H���!�%��+�#�z�z�E�K�K�7�7�!�%��-��E�3�1G�#�z�z�E�1�1�)�)r@c���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r?rRzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__le__>r�r@c���t|��r|j|jkDSt|t�st|t�r|j|kDStSr�r�r�s  �r?rOzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__gt__Dr�r@c���t|��r|j|jk\St|t�st|t�r|j|k\StSr�r�r�s  �r?rMzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ge__Jr�r@N)
r�r�r�r4rArKrTrRrOrMrLs�r?r�r�)s&���,�*�*�*�*�*�*r@r�rfrgrkrj�r r"r$r%r&r'�c[x] %s c[y]�x %s y�
x=%d, y=%d�	c[x] %s y�	x %s c[y])r-r`rErF)r:r�r�r�r]�c3rXr��y�opr�s          @r?�test_classic_comparisonsz2ClassPropertiesAndMethods.test_classic_comparisons#s���	�	��c�6�*�D�&
*�D�&
*�P�1��B��1��B��1��B����R��#��2�"�%�A��� �A�>���(�(��n�r�.A�)B�%)�(�R�-�%8�%1�Q��F�%:�<��(�(��k�B�.>�)?�%)�(�R�-�%8�%1�Q��F�%:�<��(�(��k�B�.>�)?�%)�(�R�-�%8�%1�Q��F�%:�<�?�!��]+r@c����Gd�dt�}|d�}�j|d��jd|�Gd�dt�}|d�}�j|d��jd|�Gd�d	�}|tttfD]�}G��fd
�d|���d�}�d�}�d
�}	�j|d�|||	d�}
dD]�}dD]�}dD]�}
�jtd|
z�td|
z�d||fz��jtd|
z�td|
z�d||fz��jtd|
z�td|
z�d||fz���������y)Nc��eZdZy)�:ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZNrMr�r@r?r�r�erOr@r�rfy�?c��eZdZd�Zy)�;ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZc�@�	t||z
�dkS#tcYSxYw)Ng���ư>)r+r�r�s  r?rAzBClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZ.__eq__ks(��*��t�e�|�,��4�4��*�)�)�s��NrBr�r@r?�ZZr�js��
*r@r�g�ׇP�?c��eZdZy)�@ClassPropertiesAndMethods.test_rich_comparisons.<locals>.classicNrMr�r@r?r�r�trOr@r�c�Z��eZdZd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z�fd�Z	�fd�Z
y	)
�:ClassPropertiesAndMethods.test_rich_comparisons.<locals>.Cc�$�t|�|_yr�r�rs  r?r4zCClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__init__xr�r@c�(���jd�y)Nzshouldn't call __cmp__)r�)rHr�r:s  �r?�__cmp__zBClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__cmp__zs����I�I�6�7r@c���t|��r|j|jk(St|t�st|t�r|j|k(StSr�r�r�s  �r?rAzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__eq__|r�r@c���t|��r|j|jk7St|t�st|t�r|j|k7StSr�r�r�s  �r?rKzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ne__�r�r@c���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r?rTzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__lt__�r�r@c���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r?rRzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__le__�r�r@c���t|��r|j|jkDSt|t�st|t�r|j|kDStSr�r�r�s  �r?rOzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__gt__�r�r@c���t|��r|j|jk\St|t�st|t�r|j|k\StSr�r�r�s  �r?rMzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ge__�r�r@N)r�r�r�r4r�rArKrTrRrOrM)r�r:s��r?r�r�ws+���,�8�*�*�*�*�*�*r@r�rgrkrjr�r�r�r�r�r�)r�rEr-r`r6rF)r:r�rWr��zzr�r�r�r]r�rXr�r�r�r�s`             @r?�test_rich_comparisonsz/ClassPropertiesAndMethods.test_rich_comparisonscs����	��	�
�a�D������D�!�����q�!�	*��	*��	�]������T�"�����r�"�	�	��c�6�4�0�D�(
*�D�(
*�R�1��B��1��B��1��B����R��#��2�"�%�A��� �A�>���(�(��n�r�.A�)B�)-�h��m�)<�)5��A��)>�@��(�(��k�B�.>�)?�)-�h��m�)<�)5��A��)>�@��(�(��k�B�.>�)?�)-�h��m�)<�)5��A��)>�@�?�!��_1r@c�p��ddlm}�fd�}||jd�|tjd�y)Nr)�FileIOc�>���j|j|�yr�)rEr)�descr�whatr:s  �r?�checkz6ClassPropertiesAndMethods.test_descrdoc.<locals>.check�s������U�]�]�D�1r@zTrue if the file is closedz!the real part of a complex number)�_ior��closedr�r�)r:r�r�s`  r?�
test_descrdocz'ClassPropertiesAndMethods.test_descrdoc�s)����	2�
�f�m�m�9�:�
�g�l�l�?�@r@c���Gd�dt��G�fd�d�}|j|jd�|j|�jd�y)Nc��eZdZd�Zy)�?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescrc�d�|r|jjdz}|r|j}d|�d|��S)Nz	 instancezobject=z; type=)rr�)r:r`�otypes   r?rezGClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescr.__get__�s3���#�-�-�6�6��D�F��!�N�N�E��/5�u�=�=r@Nrr�r@r?�DocDescrr��s��
>r@r�c���eZdZW��Zy)�?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.NewClassNr�)r�s�r?�NewClassr��s
����j�Gr@r�zobject=None; type=NewClassz'object=NewClass instance; type=NewClass)r`rEr)r:r�r�s  @r?�test_doc_descriptorz-ClassPropertiesAndMethods.test_doc_descriptor�sI���	>�v�	>�	!�	!�����)�)�+G�H������+�+�-V�Wr@c�N���Gd�dt�}Gd�dt�}Gd�dt�}Gd�d||�}||||fD]Z}||||fD]O}|�}||_�j|j|�||_�j|j|��Q�\�fd	�}||�t�|t�|�||�d
�||�t�|t�t�|t�t�Gd�dt�}	|d
t�|dt
�t�}
||
t�||
t
d��~
Gd�dt�}Gd�dt�}Gd�dt�}
Gd�dt�}Gd�dt�}Gd�d|�}Gd�d|
�}Gd�d|�}Gd�d |�}Gd!�d"|�}Gd#�d$|�}||f||
f|
|f||f||ffD]�\}}|�}d
|_||_�j|j|d%|�d&|�d'���j|jd
�||_�j|j|d%|�d&|�d'���j|jd
���||||||||t|	f
D]*}||||||||t|	f
D]}||ur�||�|���,Gd(�d)t��G�fd*�d+t�}td,�D�cgc]	}|���}}~ycc}w)-Nc��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.CNrMr�r@r?r�r��r�r@r�c��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.DNrMr�r@r?rNr�r�r@rNc��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.ENrMr�r@r?r�r�r�r@r�c��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.FNrMr�r@r?rr�r�r@rc����	||_�jd|�d|���	t|d��jd|z�y#t$rY�-wxYw#ttf$rYywxYw)N�shouldn't allow z
.__class__ = rz shouldn't allow del %r.__class__)rr�r�r,r�)r�r�r:s  �r?�cantz6ClassPropertiesAndMethods.test_set_class.<locals>.cant�ss���
H�����	�	��A�F�G�
B���;�'��	�	�<�q�@�A���
��
���~�.�
��
�s"�A�A�	A�A�A$�#A$rfc��eZdZgZy)�5ClassPropertiesAndMethods.test_set_class.<locals>.IntNr�r�r@r?�Intr
�s��B�	r@rTrgc��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.GrBrTNr�r�r@r?rvr
�r<r@rvc��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.HrTrBNr�r�r@r?rIr�r<r@rIc��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.IrBrTNr�r�r@r?r�r�r<r@r�c��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.JrXrTNr�r�r@r?�Jr�r<r@rc��eZdZgd�Zy)�3ClassPropertiesAndMethods.test_set_class.<locals>.K)rBrTrMNr�r�r@r?�Kr�r	r@rc��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.Lr9Nr�r�r@r?r�r�rr@r�c��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.Mr9Nr�r�r@r?r�r�rr@r�c��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.NrfNr�r�r@r?r!r�rjr@r!c��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.PrINr�r�r@r?�Pr
rer@r c��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.QNrMr�r@r?�Qr"
rOr@r#c��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.RrIrfNr�r�r@r?�Rr%
s��#�]�3�Ir@r&z
assigning z as __class__ for z silently failedc��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.ONrMr�r@r?�Or(
rOr@r)c���eZdZ�fd�Zy)�3ClassPropertiesAndMethods.test_set_class.<locals>.Ac����|_yr�r)r:r)s �r?r3z;ClassPropertiesAndMethods.test_set_class.<locals>.A.__del__
s
���!"��r@N�r�r�r�r3)r)s�r?r}r+
s���
#r@r}r�)
r`rrr6r-r�rGrBrEr�)r:r�rNr�rr��cls2r�rr�orvrIr�rrr�r�r!r r#r&r}r�r)s`                       @r?�test_set_classz(ClassPropertiesAndMethods.test_set_class�s���������������1���a��A�:�C��1�a��
���E��"����
�
�a�k�k�4�0�!����
�
�a�k�k�3�/�#��	B�	
�Q�S�$���T�V�Q���Q�S�!���Q�S�&���V�X�t���T�V�V��&�#�&��T�3���Q��
��H���Q����Q��T�
��
�	#��	#�	#��	#�	#��	#�	#��	#�	(��	(�	��	�	��	�	(��	(�	%��	%�	��	�	4��	4��a�&�1�a�&�1�a�&�1�a�&�1�a�&�A�I�C����A��A�C��A�K��M�M�!�+�+�t�IM�q�Q�
S����Q�S�S�!�$��A�K��M�M�!�+�+�s�IL�a�P�
R����Q�S�S�!�$�B��a��A�q�!�Q��4��4�C��1�a��A�q�!�Q��c�9���$�;���S�U�D�!�:�5�	��	�	#��	#� ��*�%�*�Q�Q�S�*��%�
��
&s�L"c������Gd�dt�}|�}ddi|_�j|jd��fd���|d��|g��|d�|`Gd�dt�����fd�}Gd	�d
t��}Gd�d�t�}Gd
�dt|��}Gd�dt|��}|||fD]0}||�|j}		d|	d<�jd|z��2Gd�dtj��}
Gd�d�tj�}|
|fD]!}|d�}
||
�d|
jd<�#d�}Gd�dt��}Gd�d�t�}t||fD]T}|�}ddi|_�j|jd��j||�|t����Vy#t$rY��wxYw)Nc��eZdZy)�2ClassPropertiesAndMethods.test_set_dict.<locals>.CNrMr�r@r?r�r3$
r�r@r�rTrfc�n��	||_�jd|�d|���y#ttf$rYywxYw)Nrz.__dict__ = )rIr�r�r�)r�r�r:s  �r?rz5ClassPropertiesAndMethods.test_set_dict.<locals>.cant(
s<���
J�!��
��	�	��4�H�I��#�I�.�
��
�s�"�4�4c��eZdZy)�5ClassPropertiesAndMethods.test_set_dict.<locals>.BaseNrMr�r@r?rAr64
rOr@rAc����|i�	|`�jd|z��jd}	|j	|i��jd|z�y#ttf$rY�HwxYw#ttf$rYywxYw)zR
            x has to be an instance of a class inheriting from Base.
            zshouldn't allow del %r.__dict__rIz&dict_descr allowed access to %r's dictN)rIr�r�r�r�)r��
dict_descrrArr:s  ���r?�verify_dict_readonlyzEClassPropertiesAndMethods.test_set_dict.<locals>.verify_dict_readonly6
s����
��B�K�
A��J��	�	�;�a�?�@����z�2�J�
H��"�"�1�b�)��	�	�B�Q�F�G��#�I�.�
��
��#�I�.�
��
�s"�A�A.�A+�*A+�.B�?Bc��eZdZy)�6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta1NrMr�r@r?�Meta1r;J
rOr@r<c��eZdZy)�6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta2NrMr�r@r?�Meta2r>L
rOr@r?c��eZdZy)�2ClassPropertiesAndMethods.test_set_dict.<locals>.DNrMr�r@r?rNrAN
rOr@rNrBc��eZdZy)�2ClassPropertiesAndMethods.test_set_dict.<locals>.ENrMr�r@r?r�rCP
rOr@r��eggsr�z%r's __dict__ can be modifiedc��eZdZy)�8ClassPropertiesAndMethods.test_set_dict.<locals>.Module1NrMr�r@r?�Module1rF]
rOr@rGc��eZdZy)�8ClassPropertiesAndMethods.test_set_dict.<locals>.Module2NrMr�r@r?�Module2rI_
rOr@rJc�4�	|`y#ttf$rYywxYw)NTF)rIr�r�)r9s r?�can_delete_dictz@ClassPropertiesAndMethods.test_set_dict.<locals>.can_delete_dictj
s*��
��J����~�.�
��
�s���c��eZdZy)�;ClassPropertiesAndMethods.test_set_dict.<locals>.Exception1NrMr�r@r?�
Exception1rNq
rOr@rOc��eZdZy)�;ClassPropertiesAndMethods.test_set_dict.<locals>.Exception2NrMr�r@r?�
Exception2rQs
rOr@rRrB)r`rIrErTrGr�r�r<r=r/rBr�)r:r�rBr9r<r?rNr�r��
class_dictrGrJr=r�rLrOrR�
ExceptionTyper9rArs`                  @@r?�
test_set_dictz'ClassPropertiesAndMethods.test_set_dict"
s�������
�C���1�X��
�������a� �	J�	
�Q��
��Q����Q��
�
�J�	�6�	�	H�(	�D�$�	�	�D�$�	�	��%�	�	��%�	��a��7�C� ��%����J�
A�%+�
�6�"��	�	�9�C�?�@��	�e�&�&��	�	�d�E�,�,�	�!�7�*�J��V�$�C� ��%�#)�C�L�L�� �+�	�	��D�	�	��y�	�&�
�J�>�M���A��q��A�J����Q�S�S�!�$����_�Q�/����1N�O�	?��=�
��
�s�G�	G�Gc�~��G�fd�dt��|jt�d��d�z�d�|jt�d�dz�d�|jtd�d�z�d�|jt�d��d�z�d�|jtd�d�z�d�|jt�d�dz�d�|jtt�d��d��d���d�Gd	�d
t�}y)Nc�:��eZdZd�Z�fd�ZeZd�fd�	Zd�fd�	Zy)�BClassPropertiesAndMethods.test_binary_operator_override.<locals>.Ic��dt|�zS)NzI(%r)�r-r�s r?r�zKClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__repr__~
s����T��*�*r@c�>���t|�t|�z�Sr�rZ)r:r�r�s  �r?rizJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__add__�
s�����T��S��Z�/�0�0r@Nc	���|�$�tt|�t|���S�tt|�t|�t|���Sr��rr-�r:r�r�r�s   �r?�__pow__zJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__pow__�
sB����;��S��T��C��J�7�8�8��S��T��C��J��C��A�B�Br@c	���|�%�tt|�t|�|��S�tt|�t|�t|���Sr�r]r^s   �r?�__rpow__zKClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__rpow__�
sD����;��S��U��S��Y��<�=�=��S��U��S��Y��C��A�B�Br@r�)r�r�r�r�rir�r_ra)r�s�r?r�rX}
s���
+�
1��H�
C�

Cr@r�rfrgzI(3)rkzI(8)r�c��eZdZd�Zy)�BClassPropertiesAndMethods.test_binary_operator_override.<locals>.Sc�D�|j�|j�k(Sr�)r�r�s  r?rAzIClassPropertiesAndMethods.test_binary_operator_override.<locals>.S.__eq__�
s���z�z�|�u�{�{�}�4�4r@NrBr�r@r?�Src�
r�r@re)r-rEr�rr>)r:rer�s  @r?�test_binary_operator_overridez7ClassPropertiesAndMethods.test_binary_operator_override{
s����	C��	C�"	
����a��d�Q�q�T�k�*�F�3�����a��d�Q�h���0�����a�!�A�$�h���0�����a��d�a��d�l�+�V�4�����a�1�Q�4�i��&�1�����a��d�a�i��&�1�����c�!�A�$��!��a��d�3�4�f�=�	5��	5r@c���Gd�dt�}Gd�d|�}Gd�d|�}Gd�d||�}|�}t|�}d	�|_|jt|�d
�d�|_|jt|�d�d
�|_|jt|�d�d�|_|jt|�d�d|_|j	t
t|�|`|jt|�d�d|_|j	t
t|�|`|jt|�d�d|_|j	t
t|�|`|jt|�d
�d|_|j	t
t|�|`|jt|�|�d
|_d
|_|j|jd
�|j|jd
�d�}||_|j|jd�|j|jd
�d�}||_	|j|jd�|j|jd�|j|jd
�|`|j|jd
�|`|j|jd�|j|jd
�|`		|j|jd�Gd�dt�}Gd�d|�}~tj�d�|_y#t$rY�CwxYw)Nc��eZdZy��>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.ANrMr�r@r?r}rj�
rOr@r}c��eZdZy��>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.BNrMr�r@r?r�rm�
rOr@r�c��eZdZy)�>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.CNrMr�r@r?r�ro�
rOr@r�c��eZdZy)�>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.DNrMr�r@r?rNrq�
rOr@rNc��yrlr�r�s r?r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
s��"r@r�c��y)N�:r�r�s r?r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
rir@rtc��y)N�r�r�s r?r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
rir@rvc��yr(r�r�s r?r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
rir@r�c�:�|dk(rytj||�S)Nr�r)r`r&r�s  r?r&zMClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattribute__�
s���u�}���*�*�4��6�6r@rc�"�|dvryt|��)N)r�r�r�rNr�r�s  r?r�zHClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattr__�
s���-�-�� ��&�&r@rNzd.foo should be undefined nowc��eZdZyrirMr�r@r?r}z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.A�
rOr@c��eZdZyrlrMr�r@r?r�z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.B�
rOr@c��yr�r�r�s r?r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
s��4r@)r`rFrGrErr�r�r�r&r�r�r�r�rrVr~)	r:r}r�r�rNrM�	orig_hashr&r�s	         r?�test_subclass_propagationz3ClassPropertiesAndMethods.test_subclass_propagation�
s���	��	�	��	�	��	�	��1�	�
�C����G�	�$��
�����a��"�%�%��
�����a��#�&�%��
�����a��#�&�%��
�����a��#�&���
����)�T�1�-�
�J�����a��#�&���
����)�T�1�-�
�J�����a��#�&���
����)�T�1�-�
�J�����a��"�%���
����)�T�1�-�
�J�����a��)�,��������������#��������#�	7�.����������#��������#�	'�$��
��������)��������#��������#�
���������#�
�E��������(��������#�
�M�	7�
�E�E�
�I�I�5�6�	��	�	��	�
�����'��
���	��	�s�
M"�"	M.�-M.c�0�ddl}Gd�dt�}d}||�}|j|j|�|j|��Gd�dt�}|d�}	|j|�|jd�y#t$rYywxYw)	Nrc��eZdZy)�BClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyBytesNrMr�r@r?r�r��
rOr@r�r�c��eZdZy)�@ClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyIntNrMr�r@r?r�r��
rOr@r�r�z2subclass of int should not have a buffer interface)�binasciir�rE�b2a_hexr-r�r�)r:r�r�r�rOr�s      r?�test_buffer_inheritancez1ClassPropertiesAndMethods.test_buffer_inheritance�
s���	�	�e�	����D�M��	
����)�)�!�,�h�.>�.>�t�.D�E�	�C�	��"�I��	����Q���I�I�J�K���	��	�s�&"B	�		B�Bc�8��ddl�G�fd�dt�}|d�}|jt|�|�|jtt|��t�|jtt	|��t�|jt|�d�|jt|�d�|jt	|�d�|j|j
�d�|j|j�d�y)Nrc���eZdZ�fd�Zd�Zy)�GClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstringc�b���j|jd��jd�S)N�ascii)r��encode�decode)r:r�s �r?r�zOClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__str__s(����'�'����G�(<�=�D�D�W�M�Mr@c��|dzS)Nz reprr�r�s r?r�zPClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__repr__s���g�~�%r@N)r�r�r�r�r�)r�s�r?�octetstringr�s���
N�
&r@r�r}�A�41zA repr)r�r>rErGr��ordr�r�)r:r�r/r�s   @r?�test_str_of_str_subclassz2ClassPropertiesAndMethods.test_str_of_str_subclass�
s�����	&�#�	&�
��������a��+�.�����c�!�f��s�+�����d�1�g���,�����Q���&�����Q���&�����a��(�+��������d�+��������x�0r@c���Gd�dt�}Gd�d�}|d�|_|jt|�t�|jt|��t�y)Nc��eZdZy)�LClassPropertiesAndMethods.test_repr_with_module_str_subclass.<locals>.StrSubNrMr�r@r?�StrSubr�rOr@r�c��eZdZy)�JClassPropertiesAndMethods.test_repr_with_module_str_subclass.<locals>.SomeNrMr�r@r?�Somer�rOr@r��example)r>r�rr�)r:r�r�s   r?�"test_repr_with_module_str_subclassz<ClassPropertiesAndMethods.test_repr_with_module_str_subclasssN��	�S�	�	�	� ��+������d�4�j�#�.����d�4�6�l�C�0r@c��d�}|j|jd��d�t�}tj|ddd��|j|d�y)	Nc��|Sr�r�r�s r?r�z;ClassPropertiesAndMethods.test_keyword_arguments.<locals>.fs���(r@r�r�uabc½€�latin1r�)�encodingr�sabc�?)rErg�	bytearrayr4)r:r��bas   r?�test_keyword_argumentsz0ClassPropertiesAndMethods.test_keyword_argumentssT���������b��)�2�.�
�[�����2��$,�Y�	�	@�����[�)r@c��Gd�dt�}|�|_|jt�5|��ddd�y#1swYyxYw)Nc��eZdZy)�8ClassPropertiesAndMethods.test_recursive_call.<locals>.ANrMr�r@r?r}r�&rOr@r})r`rgr�RecursionErrorr_s  r?�test_recursive_callz-ClassPropertiesAndMethods.test_recursive_call$s<��	��	��S��
�
�
�
�~�
.��A�C�E�/�
.�
.�s�
A�Ac� ��g�G�fd�dt�}|�}|j�g�~tj�|j�dg�Gd�dt�}|�}|d=|j	d�y#t
$rYywxYw)Nc���eZdZ�fd�Zy)�5ClassPropertiesAndMethods.test_delete_hook.<locals>.Cc�(���jd�yr�r)r:r(s �r?r3z=ClassPropertiesAndMethods.test_delete_hook.<locals>.C.__del__1s����
�
�1�
r@Nr-)r(s�r?r�r�0s���
r@r�rfc��eZdZy)�5ClassPropertiesAndMethods.test_delete_hook.<locals>.DNrMr�r@r?rNr�9r�r@rNrz$invalid del() didn't raise TypeError)r`rErrVr�r�)r:r�rXrNrMr(s     @r?�test_delete_hookz*ClassPropertiesAndMethods.test_delete_hook-s������	��	�
�C������b�!�
���������q�c�"����
�C���1���i�i�>�?����$��s�,B�	B
�B
c��Gd�dt�}|�}	t|�|jd�Gd�dt�}|�}	t|�|jd�y#t$rY�?wxYw#t$rYywxYw)Nc��eZdZy)�?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mydictNrMr�r@r?�mydictr�BrOr@r�z#hash() of dict subclass should failc��eZdZy)�?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mylistNrMr�r@r?�mylistr�LrOr@r�z#hash() of list subclass should fail)r�rFr�r�r6)r:r�rMr�s    r?�test_hash_inheritancez/ClassPropertiesAndMethods.test_hash_inheritance?s���	�T�	��H��	=���G�
�I�I�;�<�	�T�	��H��	=���G�
�I�I�;�<���	��	���	��	�s#�A(�A7�(	A4�3A4�7	B�Bc��ddz|jd�djd�|jd�dj	dg�|jd�djd�|jd	�d
dz|jd�diz|jd
�ddz|jd�ddz|jd�ddz|jd�ddz|jd�|j
dj�d�|j
dj�d�|j
ddzd�|j
ddzd�y#t$rY��bwxYw#t$rY��PwxYw#t$rY��=wxYw#t$rY��+wxYw#t$rY��%wxYw#t$rY��wxYw#t$rY��wxYw#t$rY��wxYw#t$rY��
wxYw#t$rY��wxYw)NrBr�z'' + 5 doesn't raise TypeErrorr�z%''.split('') doesn't raise ValueErrorrz$''.join([0]) doesn't raise TypeError�5z'''.rindex('5') doesn't raise ValueErrorz%(n)sz&'%(n)s' % None doesn't raise TypeErrorz%(nz&'%(n' % {} '' doesn't raise ValueErrorz%*sr$z''%*s' % ('abc') doesn't raise TypeErrorz%*.*s)r$r�z,'%*.*s' % ('abc', 5) doesn't raise TypeErrorz%s�rfrgz%'%s' % (1, 2) doesn't raise TypeError�%z#'%' % None doesn't raise ValueError�534253rf�534253xz%c�)r�r��splitr�r4�rindexrE�isdigitr�s r?�test_str_operationsz-ClassPropertiesAndMethods.test_str_operationsVs���
�1�W��i�i�8�9�
�X�X�b�\��i�i�?�@�
�W�W�a�S�\��i�i�>�?�
�Y�Y�s�^��i�i�A�B�
�t�^��i�i�@�A�
�R�Z��i�i�@�A�
�e�_��i�i�A�B�
�z�
!��i�i�F�G�
�F�]��i�i�?�@�
�4�Z��i�i�=�>�����)�)�+�Q�/�����*�*�,�a�0�������6�*�������S�)��U��$�����4�����$�����4�����$�����4�����$�����$�����$�����4��s��E-�E=�F
�F�>F-�F=�*G
�G�G-�,G=�-	E:�9E:�=	F
�	F
�
	F�F�	F*�)F*�-	F:�9F:�=	G
�	G
�
	G�G�	G*�)G*�-	G:�9G:�=	H
�	H
c�f�Gd�d�}|�}|�}||_||_t|�}y)Nc��eZdZy)�?ClassPropertiesAndMethods.test_deepcopy_recursive.<locals>.NodeNrMr�r@r?rVr��rOr@rV)rTrBr)r:rVrBrTrWs     r?�test_deepcopy_recursivez1ClassPropertiesAndMethods.test_deepcopy_recursive�s1��	�	��F���F���������Q�K�r@c�4�ddlm}|j|�}t|�|j	|d�|j	|d�|j	|d�|j|j�d|_|j|jddi�y)Nr)r=r��__file__r�rf)	r<r=r�r>rrrIr�rE)r:r�rOs   r?�test_uninitialized_modulesz4ClassPropertiesAndMethods.test_uninitialized_modules�sz��)�
�I�I�a�L���A�����a��,����a��,����a��'�������$����������e�Q�Z�0r@c���G�fd�dt�}Gd�d|��|j|d�gd��|j�d�gd���d�}|j|jd�|d�}|j|��|j|jd��d�}|j|��|j|jd�Gd�dt�}|j|dd	�|dd	f�Gd
�d|��|j�dd	��dd	f�Gd�dt�}|j|dd	�||dd	f�Gd�d|��|j�dd	���dd	f�y)
Nc���eZdZ�fd�Zy)�3ClassPropertiesAndMethods.test_funny_new.<locals>.Cc���t|t�rgd�St|t�rtj	��Stj	|�S)Nrj)r)r>r-r`r�)r�r�rNs  �r?r�z;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__�s9����c�3�'�	�)9���S�)�&�.�.��2C�+C�#�^�^�C�0�0r@NrV)rNs�r?r�r��s���
1r@r�c��eZdZd�Zy)�3ClassPropertiesAndMethods.test_funny_new.<locals>.Dc��||_yr�rD�r:r�s  r?r4z<ClassPropertiesAndMethods.test_funny_new.<locals>.D.__init__�rUr@NrKr�r@r?rNr��rVr@rNrrjrfc��eZdZed��Zy)r�c��|Sr�r�r�s r?r�z;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__�����r@N)r�r�r�rhr�r�r@r?r�z3ClassPropertiesAndMethods.test_funny_new.<locals>.C�s��
�
��
r@rgc��eZdZy�r�NrMr�r@r?rNz3ClassPropertiesAndMethods.test_funny_new.<locals>.D�rOr@c��eZdZed��Zy)r�c��|Sr�r�r�s r?r�z;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__�r�r@N)r�r�r�r�r�r�r@r?r�z3ClassPropertiesAndMethods.test_funny_new.<locals>.C�s��
�
��
r@c��eZdZyr�rMr�r@r?rNz3ClassPropertiesAndMethods.test_funny_new.<locals>.D�rOr@)r`rEr�r)r:r�rMrNs   @r?�test_funny_newz(ClassPropertiesAndMethods.test_funny_new�sd���	1��	1�
	��	�	
����3���+�����3���+�
�d�G���������%�
�a�D�����a��#��������"�
�a�D�����a��#��������"�	��	�	
����1�a��1�a��)�,�	��	�����1�a��1�a��)�,�	��	�	
����1�a��1�a��A�,�/�	��	�����1�a��1�a��A�,�/r@c�t�Gd�dt�}|�}|}|dz}|j||df�|}|dz}|j||df�|}|dz}|j||df�|}|dz}|j||df�|}|dz}|j||df�|}|dz}|j||df�y)Nc��eZdZd�Zy)�2ClassPropertiesAndMethods.test_imul_bug.<locals>.Cc�
�||fSr�r�r�s  r?rvz;ClassPropertiesAndMethods.test_imul_bug.<locals>.C.__imul__�s���e�}�$r@N)r�r�r�rvr�r@r?r�r��rgr@r�r�rgrklr��r`rE)r:r�r�r�s    r?�
test_imul_bugz'ClassPropertiesAndMethods.test_imul_bug�s���	%��	%�
�C��
��	�S�������Q��H�%�
��	�Q�������Q��F�#�
��	�Q�������Q��F�#�
��	�V�������Q��K�(�
��	�T�	������Q��I�&�
��	�U�
������Q��J�'r@c���ddl}G�fd�dt�}|d�}|jd��j|jd��j|j�d�|j|�}�j|jd��j|j�d�|j
|�}�j|jd��j|j�d�y)Nrc�4��eZdZdd�Zdd�Zd�Zd�Z�fd�Zy)�7ClassPropertiesAndMethods.test_copy_setstate.<locals>.CNc� �||_||_yr�)r��_C__foorTs  r?r4z@ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__init__�s����� ��
r@c��||_yr�rDrTs  r?�setfooz>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.setfoo�rUr@c��|jSr�)r�r�s r?�getfooz>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.getfoo�rr@c��|jgSr�rDr�s r?�__getstate__zDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__getstate__�s�����z�!r@c�^���jt|�d�|dx|_|_yr)rEr	r�r�)rH�lstr:s  �r?�__setstate__zDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__setstate__�s)���� � ��S��1�-�*-�a�&�0���e�ir@r�)r�r�r�r4r�r�r�r�r�s�r?r�r��s���
!�
�
"�
"�
1r@r�r�r)r�r`r�rEr�r�r)r:r�r�rBrTs`    r?�test_copy_setstatez,ClassPropertiesAndMethods.test_copy_setstate�s�����	1��	1�
�b�E��	������������#��������R�(��I�I�a�L���������#��������R�(��M�M�!����������#��������R�(r@c���|jdddd�|jdtd�d�|jtjdtd��d�Gd�dt�}|j|d�ddd�|j|d�td�d�|j|d�jtd��d�|jdddd�|jdtd�d�|jtjdtd��d�Gd	�d
t�}|j|d�ddd�|j|d�td�d�|j|d�jtd��d�|jgd�ddddg�|jgd�td�ddg�|jt
jgd�td��ddg�Gd�d
t
�}|j|gd��ddddg�|j|gd��td�ddg�|j|gd��jtd��ddg�|gd��}ddg|tdd�<|j|gd��ddg|tddd�<|j|gd��|j
tdd�ddg�|j|gd��|j
tddd�ddg�|j|gd��y)NrNrn�hellc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_slices.<locals>.Sc�.�tj||�Sr�)r>rpr�s  r?rpz<ClassPropertiesAndMethods.test_slices.<locals>.S.__getitem__�s�����t�Q�/�/r@Nr-r�r@r?rer��s��
0r@rerjrgr�c��eZdZd�Zy)�0ClassPropertiesAndMethods.test_slices.<locals>.Tc�.�tj||�Sr�)r�rpr�s  r?rpz<ClassPropertiesAndMethods.test_slices.<locals>.T.__getitem__s���(�(��q�1�1r@Nr-r�r@r?r�r����
2r@r�rfc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_slices.<locals>.Lc�.�tj||�Sr�)r6rpr�s  r?rpz<ClassPropertiesAndMethods.test_slices.<locals>.L.__getitem__s���'�'��a�0�0r@Nr-r�r@r?r�r�r�r@r�rk)rfrkrgr)rkrfrg)rkrgrf)rgrkrf)rErYr>rpr�r6r~)r:rer�r�rBs     r?�test_slicesz%ClassPropertiesAndMethods.test_slices�s���	
�����!��f�-������q��*�F�3��������%��(�;�V�D�	0��	0�	
����7��B�Q���0�����7��E�!�H�-�v�6�����7��/�/��a��9�6�B������!��e�,������q��*�E�2�����*�*�7�E�!�H�=�u�E�	2��	2�	
����7��B�Q���/�����7��E�!�H�-�u�5�����7��/�/��a��9�5�A������!��q��e�,������q��*�Q�q�E�2�����)�)�'�5��8�<�q��e�D�	1��	1�	
����7��B�Q��!�A��/�����7��E�!�H�-��!�u�5�����7��/�/��a��9�A�a�5�A�
�g�J���A���%��1�+������G�$��q�E��%��1�a�.������G�$�	�
�
�e�A�q�k�A�a�5�)�����G�$�	�
�
�e�A�q�!�n�q��e�,�����G�$r@c���G�fd�dt����}d|_~tj�|j	t�j�d��`y)Nc���eZdZgZ�fd�Zy)�>ClassPropertiesAndMethods.test_subtype_resurrection.<locals>.Cc�<���jj|�yr�)�	containerr�r�s �r?r3zFClassPropertiesAndMethods.test_subtype_resurrection.<locals>.C.__del__(s������"�"�4�(r@N)r�r�r�rr3rLs�r?r�r�%s
����I�
)r@r�r�rf)r`rurrVrEr	rr3)r:rXr�s  @r?�test_subtype_resurrectionz3ClassPropertiesAndMethods.test_subtype_resurrection"sP���	)��	)�
�C�����

���������Q�[�[�)�1�-�
�Ir@c�X�Gd�dt�}d}td�D]
}||�}�~y)Nc��eZdZdgZd�Zy)�9ClassPropertiesAndMethods.test_slots_trash.<locals>.trashr�c��||_yr�r�r�s  r?r4zBClassPropertiesAndMethods.test_slots_trash.<locals>.trash.__init__@r�r@N)r�r�r�r�r4r�r@r?�trashr>s����I�
r@riP�)r`r�)r:rr/r�s    r?�test_slots_trashz*ClassPropertiesAndMethods.test_slots_trash;s/��	�F�	�
���u��A��a��A��
r@c�,�Gd�dt�}Gd�dt�}Gd�d||�}tj�r&|j|j|j�|j|d�|j|d�d	|�_y)
Nc��eZdZdZy)�DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.Ar�Nr�r�r@r?r}rI����Ir@r}c��eZdZy)�DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.BNrMr�r@r?r�rKrOr@r�c��eZdZdZy)�DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.Cr�Nr�r�r@r?r�rMrr@r�rIrfrg)r`rr�rE�
__basicsize__r�r�)r:r}r�r�s    r?�test_slots_multiple_inheritancez9ClassPropertiesAndMethods.test_slots_multiple_inheritanceGsu��	��	�	��	�	��!�	��$�$�&����Q�_�_�a�o�o�>����1�j�)����1�m�,����r@c���Gd�dt�}|�}|j|dzd�|j|dzd�|jd|zd�|jd|zd�y)Nc��eZdZd�Zd�Zy)�.ClassPropertiesAndMethods.test_rmul.<locals>.Cc��y)Nr
r�r�s  r?rzz6ClassPropertiesAndMethods.test_rmul.<locals>.C.__mul__Y���r@c��y)N�rmulr�r�s  r?r|z7ClassPropertiesAndMethods.test_rmul.<locals>.C.__rmul__[s��r@N)r�r�r�rzr|r�r@r?r�rXs��
�
r@r�rgr
g������@rr�r3s   r?�	test_rmulz#ClassPropertiesAndMethods.test_rmulUsg��	��	�

�C������1��e�$�����3���&�����1��f�%�����Q���'r@c�:�Gd�dt�}|�}|dz}y)Nc��eZdZd�Zy)�.ClassPropertiesAndMethods.test_ipow.<locals>.Cc��yr�r�r�s  r?�__ipow__z7ClassPropertiesAndMethods.test_ipow.<locals>.C.__ipow__g���r@N�r�r�r�rr�r@r?r�rf���
r@r�rgr�r3s   r?�	test_ipowz#ClassPropertiesAndMethods.test_ipowcs ��	��	�
�C��	�a��r@c���Gd�d�}Gd�d|�}Gd�d|�}|�}|�}|�}||z}|j|d�||z}|j|d�y)	Nc��eZdZd�Zy)�FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.Ac��tSr�r�r�s  r?rzOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.A.__ipow__nr�r@Nr!r�r@r?r}r&mr�r@r}c��eZdZd�Zy)�FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.Bc��yr�r�r�s  r?razOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.B.__rpow__r���r@N�r�r�r�rar�r@r?r�r)q���
r@r�c��eZdZd�Zy)�FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.Cc��yrCr�r�s  r?r_zNClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.C.__pow__vr+r@N�r�r�r�r_r�r@r?r�r/ur-r@r�rfrgr�)r:r}r�r�rBrTrXs       r?�!test_ipow_returns_not_implementedz;ClassPropertiesAndMethods.test_ipow_returns_not_implementedlsm��	&�	&�	��	�	��	�
�C��
�C��
�C��	�a�������A��	�a�������A�r@c�h�Gd�d�}t�}|�}||z}|j|d�y)Nc��eZdZd�Zy)�1ClassPropertiesAndMethods.test_no_ipow.<locals>.Bc��yr�r�r�s  r?raz:ClassPropertiesAndMethods.test_no_ipow.<locals>.B.__rpow__�r+r@Nr,r�r@r?r�r5�r-r@r�rfr�)r:r�rBrTs    r?�test_no_ipowz&ClassPropertiesAndMethods.test_no_ipow�s5��	�	�
�H��
�C��	�a�������A�r@c�X�d}|jt�5}|dz}ddd�|jdtj��|jt�5}|dz}ddd�|jdt|j��y#1swY�wxYw#1swY�;xYw)Nrgz#unsupported operand type(s) for **=z"unsupported operand type(s) for **)rr�rr>r�)r:r�r�r�s    r?�test_ipow_exception_textz2ClassPropertiesAndMethods.test_ipow_exception_text�s�����
�
�
�y�
)�R�
�!�G�A�*��
�
�;�S����=N�O�
�
�
�y�
)�R��Q��A�*��
�
�:�C����<M�N�
*�
)��*�
)�s�B� B �B� B)c����Gd�dt�}G�fd�dt��Gd�d|�}Gd�d|�}|�}|�}|f|_�f|_|j|j�d	�|j|j�d	�|j|jd
�|j|jd
�|j�j�|g�	|`|j
d�	d|_|j
d
�	|f|_|j
d�	||f|_|j
d�	|f|_|j
d�y#ttf$rY�zwxYw#t$r)}t|�dk(r|j
d�Yd}~��d}~wwxYw#t$rY��wxYw#t$rY�wxYw#t$rYywxYw)Nc��eZdZy)�7ClassPropertiesAndMethods.test_mutable_bases.<locals>.CNrMr�r@r?r�r<�rOr@r�c�(���eZdZ��fd�Zd�Z�xZS)�8ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2c�.��|dk(ryt�|�|�S)NrBrg)rur&)r:rur�rs  ��r?r&zIClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.__getattribute__�s����3�;�� ��T�;�D�A�Ar@c��yr�r�r�s r?rLz=ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.meth�r+r@)r�r�r�r&rLrx)rr�s@�r?r�r>�s���
B�

r@r�c��eZdZy)�7ClassPropertiesAndMethods.test_mutable_bases.<locals>.DNrMr�r@r?rNrB�rOr@rNc��eZdZy)�7ClassPropertiesAndMethods.test_mutable_bases.<locals>.ENrMr�r@r?r�rD�rOr@r�rfrgz&shouldn't be able to delete .__bases__r�z)shouldn't be able to set .__bases__ to ()z/a new-style class can't have only classic basesz'wrong error message for .__bases__ = ()z.shouldn't be able to create inheritance cyclesz#didn't detect repeated base classes)
r`rJrErLrBr?r�r�r�r>)r:r�rNr�rMr9r�r�s       @r?�test_mutable_basesz,ClassPropertiesAndMethods.test_mutable_bases�s����	��	�	��	�	��	�	��	�
�C��
�C���d����e����������1�%��������1�%�������a� �������a� �����*�*�,�q�c�2�	@���
�I�I�>�?�	C��A�K�

�I�I�A�B�	H��$�A�K�

�I�I�F�G�	=��a�&�A�K�
�I�I�;�<�	H��$�A�K�
�I�I�F�G��C�>�*�	��	���	E��3�x�L�L��	�	�C�D���	E���	��	���	��	���	��	�s`�0E,�F�F6�7	G�G�,E>�=E>�	F3�
F.�.F3�6	G�G�	G�G�	G �G c��tjj�D�cgc]}t|t�r|��}}|D]T}t
j
|d�|t
us�"|turd}nd}|jt|j�||��VGd�dt�}Gd�dt
�}Gd�d	|�}	tf|_
|jd
�	tft_
|jd�	|tf|_
|jd�ycc}w#t$rY�RwxYw#t$rY�?wxYw#t$rYywxYw)
NrJrgrfc��eZdZy)�7ClassPropertiesAndMethods.test_builtin_bases.<locals>.LNrMr�r@r?r�rH�rOr@r�c��eZdZy)�7ClassPropertiesAndMethods.test_builtin_bases.<locals>.CNrMr�r@r?r�rJ�rOr@r�c��eZdZy)�7ClassPropertiesAndMethods.test_builtin_bases.<locals>.DNrMr�r@r?rNrL�rOr@rNz/shouldn't turn list subclass into dict subclassz-shouldn't be able to assign to list.__bases__z#best_base calculation found wanting)�builtinsrI�valuesr)rGr`r&�ExceptionGrouprEr	rJr6r�r�r�)r:�tp�
builtin_types�	num_basesr�r�rNs       r?�test_builtin_basesz,ClassPropertiesAndMethods.test_builtin_bases�sH��'/�&7�&7�&>�&>�&@�2�&@��&�r�4�0��&@�
�2��B��#�#�B��4������'� !�I� !�I�� � ��R�\�\�!2�I�r�B� �	��	�	��	�	��	�	I��'�A�K�
�I�I�G�H�	G�"�W�D�N�
�I�I�E�F�	=��d�)�A�K�
�I�I�;�<��O2��,�	��	���	��	���	��	�s;�D�?D#�D2�?
E�#	D/�.D/�2	D>�=D>�	E
�E
c	�6�|jt�5Gd�dtd��}ddd�|jt�5Gd�dttd��}ddd�|jt�5Gd�dtd�t�}ddd�Gd�dt�}|jt�5Gd�d|td��}ddd�|jt�5Gd�dtd�|�}ddd�Gd	�dt�}|jt�5td�f|_ddd�|jt�5ttd�f|_ddd�|jt�5td�tf|_ddd�|jt�5|td�f|_ddd�|jt�5td�|f|_ddd�y#1swY���xYw#1swY���xYw#1swY���xYw#1swY��kxYw#1swY��ExYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)
Nc��eZdZy��>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XNrMr�r@r?r�rWrr@r�c��eZdZyrVrMr�r@r?r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@c��eZdZyrVrMr�r@r?r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@c��eZdZy)�>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.ONrMr�r@r?r)r[
rOr@r)c��eZdZyrVrMr�r@r?r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@c��eZdZyrVrMr�r@r?r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@c��eZdZyrVrMr�r@r?r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XrOr@)rr�rGr`rJ)r:r�r)s   r?�test_unsubclassable_typesz3ClassPropertiesAndMethods.test_unsubclassable_typess���
�
�
�y�
)�
�D��J�
�*��
�
�y�
)�
�F�D��J�
�*��
�
�y�
)�
�D��J��
�*�	��	�
�
�
�y�
)�
�A�t�D�z�
�*��
�
�y�
)�
�D��J��
�*�	��	�
�
�
�y�
)��t�*�+�A�K�*�
�
�
�y�
)� �$�t�*�,�A�K�*�
�
�
�y�
)��t�*�f�,�A�K�*�
�
�
�y�
)��T�$�Z�-�A�K�*�
�
�
�y�
)��t�*�a�-�A�K�*�
)�9*�
)��*�
)��*�
)��
*�
)��*�
)��*�
)��
)�
)��
)�
)��
)�
)��
)�
)�sw�H�H*�?H7�I�8I�:I�)I+�I7�J�J�H'�*H4�7I�I�I�I(�+I4�7J�J�Jc���
�G�
fd�dt��
Gd�dt�}Gd�dt�}Gd�dt�}Gd	�d
|�}Gd�d|�}Gd
�d|�
��}Gd�d||��}|j}|j}		|f|_|j	d�y#t
$r;|j
|j|�|j
|j|	�YywxYw)Nc�(���eZdZ��fd�Zd�Z�xZS)�OClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOncec�6��d|_t�|��|||�Sr�)�flagrur�)r:r=rUr��WorkOncers    ��r?r�zWClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.__new__&s"�����	��X�t�4�X�t�U�B�O�Or@c��|jdkDrtd��|xjdz
c_tj|�S)Nr�bozorf)rdr�rGr�r�s r?r�zSClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.mro)s3���9�9�q�=�&�v�.�.��I�I��N�I��8�8�D�>�)r@)r�r�r�r�r�rx)rres@�r?rerb%s���
P�
*r@rec��eZdZd�Zy)�QClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlwaysc�,�tj|�Sr�)rGr�r�s r?r�zUClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlways.mro1s��
�x�x��~�%r@Nr�r�r@r?�
WorkAlwaysri0s��
&r@rkc��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.CNrMr�r@r?r�rm8rOr@r�c��eZdZy)�IClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.C2NrMr�r@r?r�ro;rOr@r�c��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.DNrMr�r@r?rNrq>rOr@rNc��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.ENrMr�r@r?r�rsArOr@r�c��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.FNrMr�r@r?rruDrOr@rrBc��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.GNrMr�r@r?rvrwGrOr@rvzexception not propagated)rGr`r^rJr�r�rE)r:rkr�r�rNr�rrv�E_mro_before�D_mro_beforeres          @r?�#test_mutable_bases_with_failing_mroz=ClassPropertiesAndMethods.test_mutable_bases_with_failing_mro#s����		*�t�		*�	&��	&�	��	�	��	�	��	�	��	�	��X�	�	��Z�	��y�y���y�y��	2��%�A�K�

�I�I�0�1��	�	6����Q�Y�Y��5����Q�Y�Y��5�	6�s�	B#�#AC'�&C'c���Gd�dt�}Gd�dt�}Gd�d||�}Gd�d||�}Gd	�d
||�}	||f|_|jd�y#t$rYywxYw)Nc��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ANrMr�r@r?r}r}[rOr@r}c��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.BNrMr�r@r?r�r^rOr@r�c��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.CNrMr�r@r?r�r�arOr@r�c��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.DNrMr�r@r?rNr�drOr@rNc��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ENrMr�r@r?r�r�grOr@r�zdidn't catch MRO conflict)r`rJr�r�)r:r}r�r�rNr�s      r?�%test_mutable_bases_catch_mro_conflictz?ClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflictYsw��	��	�	��	�	��1�	�	��1�	�	��1�	�	3��a�&�A�K�
�I�I�1�2���	��	�s�	A�	A+�*A+c��Gd�dt�}|j}d|_|j|j|jf|df�d|_|j|j|jf|df�y)Nc��eZdZy)�7ClassPropertiesAndMethods.test_mutable_names.<locals>.CNrMr�r@r?r�r�srOr@r�rNzD.E)r`r�r�rE)r:r�r�s   r?�test_mutable_namesz,ClassPropertiesAndMethods.test_mutable_namesqsi��	��	��l�l����
����!�,�,��
�
�3�c�3�Z�@���
����!�,�,��
�
�3�c�5�\�Br@c�d��G�fd�dt�}Gd�d��|d��_d�_y)Nc���eZdZ�fd�Zy)�<ClassPropertiesAndMethods.test_evil_type_name.<locals>.Nastyc���d�_y)Nr�)r�r�s �r?r3zDClassPropertiesAndMethods.test_evil_type_name.<locals>.Nasty.__del__�s
���$��
r@Nr-rLs�r?�Nastyr��s���
%r@r�c��eZdZy)�8ClassPropertiesAndMethods.test_evil_type_name.<locals>.CNrMr�r@r?r�r��rOr@r�r$�normal)r>r�)r:r�r�s  @r?�test_evil_type_namez-ClassPropertiesAndMethods.test_evil_type_names-���	%�C�	%�	�	��5�\��
���
r@c���Gd�dt�}|j|d�dzd�|jd|d�zd�Gd�dt�}|j|�dzd�|jd|�zd	�Gd
�d|�}|j|�|�zd�|j|�|�zd
�Gd�d|�}|j|j|j�|j|�dzd�|jd|�zd	�|j|�|�zd�|j|�|�zd�y)Nc��eZdZd�Zd�Zy)�;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.Bc��y)N�B.__floordiv__r�r�s  r?�__floordiv__zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__floordiv__����'r@c��y)N�B.__rfloordiv__r�r�s  r?�
__rfloordiv__zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__rfloordiv__����(r@N�r�r�r�r�r�r�r@r?r�r�����
(�
)r@r�rfr�r�c��eZdZd�Zd�Zy)�;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.Cc��y)N�C.__floordiv__r�r�s  r?r�zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__floordiv__�r�r@c��y)N�C.__rfloordiv__r�r�s  r?r�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__rfloordiv__�r�r@Nr�r�r@r?r�r��r�r@r�r�r�c��eZdZd�Zd�Zy)�;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.Dc��y)N�D.__floordiv__r�r�s  r?r�zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__floordiv__�r�r@c��y)N�D.__rfloordiv__r�r�s  r?r�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__rfloordiv__�r�r@Nr�r�r@r?rNr��r�r@rNr�r�c��eZdZy)�;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.ENrMr�r@r?r�r��rOr@r�)r-rEr`r�)r:r�r�rNr�s     r?�test_subclass_right_opz0ClassPropertiesAndMethods.test_subclass_right_op�sD��	)��	)�	
����1����$4�5�����a��d��$5�6�	)��	)�	
�������#3�4�����a�c��#4�5�	)��	)�	
��������%5�6���������%6�7�	��	�	
������!�/�/�:��������#3�4�����a�c��#4�5���������%5�6���������%5�6r@z)testing an internal kind of method objectc��gd�}dddd�}|jtj|�|�|jij|�|�tjd}|j|j	dt�|�|�|j|j	i�|�|�	|j	dd�|jd�	|j	d�|jd�	|j	dd�|jd�	|j	dt�|jd�y#t$rY�{wxYw#t$rY�gwxYw#t$rY�RwxYw#t$rYywxYw)Nrj�fromkeysz0shouldn't have allowed descr.__get__(None, None)r�z(shouldn't have allowed descr.__get__(42)z.shouldn't have allowed descr.__get__(None, 42)z/shouldn't have allowed descr.__get__(None, int))rEr�r�rIrer�r�r-)r:r�rKr�s    r?�test_meth_class_getz-ClassPropertiesAndMethods.test_meth_class_get�st�����4�D�)��������s�+�S�1�������S�)�3�/��
�
�j�)��	
���2����t�T�2�3�7��=����*����r�*�3�/��5�	J��M�M�$��%�
�I�I�H�I�	B��M�M�"��
�I�I�@�A�	H��M�M�$��#�
�I�I�F�G�	I��M�M�$��$�
�I�I�G�H��+�	��	���	��	���	��	���	��	�sH�8E�E�?E)�#E8�	E�E�	E&�%E&�)	E5�4E5�8	F�Fc��Gd�dt�}Gd�d�}|�}||�}|j||�|j||�Gd�d|�}|�}||�}|j||�|j||�Gd�dt�}|�}||�}|j||�|j||�Gd�d|�}|�}||�}|j||�|j||�y)	Nc��eZdZd�Zd�Zy)�<ClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxyc��||_yr���_Proxy__objr*s  r?r4zEClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__init__�rr@c�|�|jd�rtj||�St|j|�S�N�_Proxy__�rcr`r&rHr�r�s  r?r&zMClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__getattribute__��2���?�?�:�.�!�2�2�4��>�>�"�4�:�:�t�4�4r@N�r�r�r�r4r&r�r@r?rXr�����
!�
5r@rXc��eZdZy��8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.CNrMr�r@r?r�r��rOr@r�c��eZdZy��8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DNrMr�r@r?rNr��rOr@rNc��eZdZyr�rMr�r@r?r�z8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.CrOr@c��eZdZyr�rMr�r@r?rNz8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DrOr@)r`r)r:rXr�rB�parNs      r?�test_isinst_isclassz-ClassPropertiesAndMethods.test_isinst_isclass�s���	5�F�	5�	�	�
�C��
�1�X�����a��#����b�!�$�	��	�
�C��
�1�X�����a��#����b�!�$�	��	�
�C��
�1�X�����a��#����b�!�$�	��	�
�C��
�1�X�����a��#����b�!�$r@c����Gd�dt�}Gd�dt�}G�fd�d|����}||�}|j�jd|�d�y)	Nc��eZdZd�Zd�Zy)�9ClassPropertiesAndMethods.test_proxy_super.<locals>.Proxyc��||_yr�r�r*s  r?r4zBClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__init__rr@c�|�|jd�rtj||�St|j|�Sr�r�r�s  r?r&zJClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__getattribute__r�r@Nr�r�r@r?rXr�r�r@rXc��eZdZd�Zy)�5ClassPropertiesAndMethods.test_proxy_super.<locals>.Bc��y)NzB.fr�r�s r?r�z7ClassPropertiesAndMethods.test_proxy_super.<locals>.B.frr@Nrvr�r@r?r�r�s��
r@r�c�"���eZdZ��fd�Z�xZS)�5ClassPropertiesAndMethods.test_proxy_super.<locals>.Cc�&��t�|��dzS)Nz->C.f)rur�)r:r�rs ��r?r�z7ClassPropertiesAndMethods.test_proxy_super.<locals>.C.f#s����Q��'�)�G�3�3r@)r�r�r�r�rx)rr�s@�r?r�r�"s
���
4�
4r@r�r�zB.f->C.f)r`rErI)r:rXr�r�r�r�s     @r?�test_proxy_superz*ClassPropertiesAndMethods.test_proxy_supersX���	5�F�	5�	��	�	4��	4��c���#�J���������C���+�Z�8r@c���	tjtdd�|jd�	tjtd�|jd�y#t$rY�8wxYw#t$rYywxYw)Nr�r�z"Carlo Verre __setattr__ succeeded!r�z"Carlo Verre __delattr__ succeeded!)r`r*r>r�r�r-r�s r?�test_carloverrez)ClassPropertiesAndMethods.test_carloverre*ss��	<����s�E�2�.�
�I�I�:�;�	<����s�G�,�
�I�I�:�;���	��	���	��	�s"�A�A*�	A'�&A'�*	A6�5A6c��Gd�dt�}Gd�d�}Gd�d||�}|dtfi�}	d|_y#t$r|j	d	�YywxYw)
Nc��eZdZd�Zy)�HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.Ac�2�tj|||�yr�)rGr*�r�rrs   r?r*zTClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.A.__setattr__;s��� � ��c�5�1r@N�r�r�r�r*r�r@r?r}r�:r�r@r}c��eZdZy)�HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.BNrMr�r@r?r�r�>rOr@r�c��eZdZy)�HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.CNrMr�r@r?r�r�ArOr@r�rNTz1setattr through direct base types should be legal)rGr`rr�r��r:r}r�r�r�s     r?�#test_carloverre_multi_inherit_validz=ClassPropertiesAndMethods.test_carloverre_multi_inherit_valid9sc��	2��	2�	�	�	��1�	���f�Y��#��	K��C�H���	K��I�I�I�J�	K�s�>�A�Ac��Gd�dt�}Gd�d�}Gd�d||�}|dtfi�}	d|_|jd	�y#t$rYywxYw)
Nc��eZdZd�Zy)�JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.Ac�2�tj|||�yr�)r`r*r�s   r?r*zVClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.A.__setattr__Ls���"�"�3��U�3r@Nr�r�r@r?r}r�Ks��
4r@r}c��eZdZy)�JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.BNrMr�r@r?r�r�OrOr@r�c��eZdZy)�JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.CNrMr�r@r?r�r�RrOr@r�rNTz6setattr through indirect base types should be rejected)rGr`rr�r�r�s     r?�%test_carloverre_multi_inherit_invalidz?ClassPropertiesAndMethods.test_carloverre_multi_inherit_invalidJsh��	4��	4�	�	�	��1�	���f�Y��#��	P��C�H�
�I�I�N�O���	��	�s�A�	A�Ac�n��ddl�G�fd�d�}Gd�dt�}|�}||�|_~y)Nrc���eZdZ�fd�Zd�Zy)�AClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provokerc�4���j|�|_yr��rm)r:�	referrentrls  �r?r4zJClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__init__cs���&�7�;�;�y�1��r@c�$�|j�}yr�r�r�s  r?r3zIClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__del__fs
���H�H�J�r@N)r�r�r�r4r3)rls�r?�Provokerr�bs
���
2�
r@r�c��eZdZy)�=ClassPropertiesAndMethods.test_weakref_segfault.<locals>.OopsNrMr�r@r?�Oopsr�irOr@r�)rlr`�whatever)r:r�r�r/rls    @r?�test_weakref_segfaultz/ClassPropertiesAndMethods.test_weakref_segfault]s5���	�	�	�	�6�	�
�F���a�[��
�
r@�cpuc�F�d�}td�D]}|j}�d}y)Nc��yr�r�r�r@r?r�zAClassPropertiesAndMethods.test_wrapper_segfault.<locals>.<lambda>ss��4r@i@B)r�rg)r:r�r�s   r?�test_wrapper_segfaultz/ClassPropertiesAndMethods.test_wrapper_segfaultps%��
���w��A��
�
�A� ��r@c���Gd�d�}t|��5|jt�5td�ddd�ddd�y#1swY�xYw#1swYyxYw)Nc��eZdZd�Zy)�>ClassPropertiesAndMethods.test_file_fault.<locals>.StdoutGuardc�P�tjt_td|����)NzPremature access to sys.stdout.)r��
__stdout__�stdoutr�r�s  r?r�zJClassPropertiesAndMethods.test_file_fault.<locals>.StdoutGuard.__getattr__{s �� �^�^��
�"�%D�T�F�#K�L�Lr@Nr�r�r@r?�StdoutGuardr	zs��
Mr@r	zOops!)rrr��print)r:r	s  r?�test_file_faultz)ClassPropertiesAndMethods.test_file_faultxsL��	M�	M�
�[�]�
+��"�"�<�0��g��1�,�
+�0�0��,�
+�s!�A�A�A�A	�A�A#c�$���G�fd�dt�}Gd�dt��G�fd�dt����}d|j|�<|j|jd�t	j
�|j
|d	�y)
Nc���eZdZd�Z�fd�Zy)�HClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evilc��td�S)Nru�rFr�s r?rGzQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__hash__�s���F�|�#r@c�*��	�`y#t$rYywxYwr�)rur�r�s  �r?rAzOClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__eq__�s)��������&�����s��	�N�r�r�r�rGrArLs�r?�Evilr		�s
���
$�
r@r	c��eZdZdd�Zy)�IClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.DescrNc��yr�r�)r:�obrGs   r?rezQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Descr.__get__�r+r@r�rr�r@r?�Descrr	�s��
r@r	c���eZdZW��Zy)�EClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.CN)r�r�r�ru�r	s�r?r�r	�s
����7�Dr@r�rrfru)r`rIrErurrVr)r:r	rXr�r	s   @@r?� test_vicious_descriptor_nonsensez:ClassPropertiesAndMethods.test_vicious_descriptor_nonsense�sp���		�6�		�	�F�	�	��	�
�C����
�
�4�6���������#��������a��(r@c�r�Gd�dt�}	|�|jd�y#t$rYywxYw)Nc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_init.<locals>.Fooc��y)Nrr�r�s r?r4z9ClassPropertiesAndMethods.test_init.<locals>.Foo.__init__�rmr@NrKr�r@r?�Foor	�ror@r	z'did not test __init__() for None return)r`r�r�)r:r	s  r?�	test_initz#ClassPropertiesAndMethods.test_init�s<��	�&�	�	A��E�
�I�I�?�@���	��	�s�*�	6�6c�|�|jt�5||kddd�|jt�5||kDddd�|jt�5||kddd�|jt�5||k\ddd�y#1swY�sxYw#1swY�\xYw#1swY�ExYw#1swYyxYwr��rr��r:rBrTs   r?�assertNotOrderablez,ClassPropertiesAndMethods.assertNotOrderable�s���
�
�
�y�
)�
��E�*�
�
�
�y�
)�
��E�*�
�
�
�y�
)�
��F�*�
�
�
�y�
)�
��F�*�
)�
*�
)��
)�
)��
)�
)��
)�
)�s.�B�B�B&�?B2�B�B#�&B/�2B;c���g}|j|j|jk(�|j|j|jk7�|j|jgjk(�|j|jgjk7�|j|j|jk(�|j|j|jk7�|j	|j|j�|j|jjd�|j|jj|�|j|jjt�|j|jjtjj�t|j�y)Nri)
r�rirrzr!	rEr�rr��__objclass__r6rrF�r:r�s  r?�test_method_wrapperz-ClassPropertiesAndMethods.test_method_wrapper�s6��
������	�	�Q�Y�Y�.�/�������a�i�i�/�0�������b�j�j�0�1�����	�	�R�Z�Z�/�0�������a�i�i�/�0�����	�	�Q�Y�Y�.�/�����	�	�1�9�9�5�������+�+�Y�7��
�
�a�i�i�(�(�!�,��
�
�a�i�i�,�,�d�3�������*�*�D�L�L�,@�,@�A��Q�Y�Y�r@c�r�g}|j|j|jk(�|j|j|jk7�|j|jgjk(�|j|jgjk7�|j|j|jk(�|j|j|jk7�|j	|j|j�|j|jjd�|j|jj|�|j|jjtjj�t|j�y)Nr�)r�r�r�popr!	rEr�rr�rr6rFr$	s  r?�test_builtin_function_or_methodz9ClassPropertiesAndMethods.test_builtin_function_or_method�s��
��������A�H�H�,�-�������Q�X�X�-�.�������R�Y�Y�.�/�������B�I�I�-�.�������Q�U�U�*�+�������A�E�E�)�*�������!�(�(�3�������*�*�H�5��
�
�a�h�h�'�'��+�������)�)�4�;�;�+>�+>�?��Q�X�X�r@c��|jtjtjk(�|jtjtjk7�|jtjtjk(�|jtjtjk7�|jtjtj�|j
tjjd�|jtjjt�|jtjtjk(�|jtjtjk7�|jtjtjk(�|jtjtjk7�|jtjtj�|j
tjjd�|jtjjt�y)Nrir�)r�r6rirrzr!	rEr�rr#	r�r'	r�s r?�!test_special_unbound_method_typesz;ClassPropertiesAndMethods.test_special_unbound_method_types�sh�����������4�5����������5�6����������5�6����������4�5�������d�l�l�;�������.�.�	�:��
�
�d�l�l�/�/��6�	
������t�{�{�2�3����������3�4����������0�1�������t�x�x�/�0�������T�[�[�9�������-�-�x�8��
�
�d�k�k�.�.��5r@c�\��d�}�fd�}tjdz}tj}dD]�\}}}tdd||i�}|�}	|||	|	�|||	|�|||	|�d|ddz}
td	d|
|i�}|�}||||�|||	|�||||	�||||�||||�||||�||||�|s��|||	|	�|||	|�|||	|�d
|ddz}
tdd|
|i�}|�}||||	�||||�||||���y)Nc��tSr�r�r�s  r?�
specialmethodzEClassPropertiesAndMethods.test_not_implemented.<locals>.specialmethod�s��!�!r@c�����j|||��5�jt�5t|||d��ddd�ddd�y#1swY�xYw#1swYyxYw)N)r>r�r�)r�r�)�subTestrr�r])r>r�r�r:s   �r?r�z=ClassPropertiesAndMethods.test_not_implemented.<locals>.check�sO������$�!�q��1��!�!�)�,��T���+�,�-�2�1�,�,��2�1�s!�A�A
�A�
A	�A�A"rf))rizx + yzx += y)�__sub__zx - yzx -= y)rzzx * yzx *= y)�
__matmul__zx @ yzx @= y)�__truediv__zx / yzx /= y)r�zx // yzx //= y)�__mod__zx % yzx %= y)�
__divmod__zdivmod(x, y)N)r_zx ** yzx **= y)�
__lshift__zx << yzx <<= y)�
__rshift__zx >> yzx >>= y)�__and__zx & yzx &= y)�__or__zx | yzx |= y)�__xor__zx ^ yzx ^= yr}r��__rrgr��__ir�)r�r�rG)r:r-	r��N1�N2r=r>�iexprr}rB�rnamer�rT�inamer�rXs`               r?�test_not_implementedz.ClassPropertiesAndMethods.test_not_implemented�sn���	"�	-��[�[�1�_��
�[�[��"G��D�$�� �S�"�t�]�3�4�A���A��$��1���$��2���$��2���D���H�$�E��S�"�u�m�4�5�A���A��$��1���$��1���$��1���$��2���$��2���$��A���$��A����e�Q��"��e�Q��#��e�Q��#���Q�R��(����b�5�-�"8�9���C���e�Q��"��e�Q��#��e�Q��#�S"Gr@c�r�Gd�dt�}|�}d|dd|j|jd�y)Nc��eZdZd�Zy)�6ClassPropertiesAndMethods.test_assign_slice.<locals>.Cc��||_yr��r)r:�idxrs   r?r~zBClassPropertiesAndMethods.test_assign_slice.<locals>.C.__setitem__5rr@N)r�r�r�r~r�r@r?r�rD	4rr@r�rkrfrg)r`rEr)r:r�rXs   r?�test_assign_slicez+ClassPropertiesAndMethods.test_assign_slice/s6��
	#��	#�
�C����!�A��������!�$r@c�x��Gd�dt�}|d��G�fd�dt�}|�}|j|j��d|_|j|jd�Gd�dt�}Gd	�d|�
�}d|_|d�|_|j|jd�y)Nc��eZdZd�Zd�Zy)�<ClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descrc��||_yr�)r=r�s  r?r4zEClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__init__Arr@c�6�||j|j<yr�)rIr=r(s   r?r�zDClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__set__Ds��*/����T�Y�Y�'r@N)r�r�r�r4r�r�r@r?r	rK	?s��
!�
0r@r	rBc���eZdZW�Zy��8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XNr��r�s�r?r�rP	Hs����Ar@r�r�c��eZdZy)�;ClassPropertiesAndMethods.test_set_and_no_get.<locals>.MetaNrMr�r@r?rwrS	QrOr@rwc��eZdZyrO	rMr�r@r?r�z8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XSrOr@rB)r`rrBrErG)r:r	r�r�rwr�s     @r?�test_set_and_no_getz-ClassPropertiesAndMethods.test_set_and_no_get<s����	0�F�	0��c�
��	��	�
�C���
�
�a�c�c�5�!����������b�!�	�4�	�	�$�	�����s����������b�!r@c�l���Gd�dt�}|��G�fd�dt�}G�fd�dt�}G�fd�dt�}|jtt|�d	�|j	�j
d
�|jtt|�d	�|j	�j
d�|jtt|�d	�|j	�j
d�G�fd
�dt��|jtt��d	�y)Nc��eZdZdZdd�Zy)�@ClassPropertiesAndMethods.test_getattr_hooks.<locals>.DescriptorrNc����fd�}|S)Nc�D���xjdz
c_t|��r�)r�r�)r=r:s �r?r�zXClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__.<locals>.getter_s����L�L�A�%�L�(��.�.r@r�)r:r��objtyper�s`   r?rezHClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__^s���/��
r@r�)r�r�r�r�rer�r@r?�
DescriptorrX	\s���G�
r@r\	c���eZdZW�Zy)�7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.AN)r�r�r�r&rQ	s�r?r}r^	es	���$�r@r}c���eZdZW�Zy)�7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.BNr�rQ	s�r?r�r`	gs����Kr@r�c���eZdZW�ZW�Zy)�7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.CN)r�r�r�r&r�rQ	s�r?r�rb	is���$���Kr@r�rurfrgrnc���eZdZd�Z�fd�Zy)�FClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattributec��t|��r�r�r�s  r?r�zRClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattr__vs
��$�T�*�*r@c�f���`td�D]}tj��t	|���Nr�)r�r�rX�collectr�)r:r=r��EvilGetattributes   �r?r&zWClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattribute__xs+���$�0��q��A��J�J�L�"�$�T�*�*r@Nr)ri	s�r?ri	rd	ts
���
+�
+r@ri	)r`rr�rHrEr�)r:r\	r}r�r�ri	r�s     @@r?�test_getattr_hooksz,ClassPropertiesAndMethods.test_getattr_hooksYs����	��	����	%��	%�	 ��	 �	 ��	 �	
���.�'�1�3��?��������*����.�'�1�3��?��������*����.�'�1�3��?��������*�	+�v�	+�	
���.�'�3C�3E�v�Nr@c�`�|jttjtt�yr�)rr�rGr&r6r�s r?�test_type___getattribute__z4ClassPropertiesAndMethods.test_type___getattribute__�s�����)�T�%:�%:�D�$�Gr@c��|jtttd�Gd�dt�}|jtt|d�Gd�dt�}|jt�5|`ddd�y#1swYyxYw)N�__abstractmethods__c��eZdZy)�<ClassPropertiesAndMethods.test_abstractmethods.<locals>.metaNrMr�r@r?�metarp	�rOr@rq	c��eZdZy)�9ClassPropertiesAndMethods.test_abstractmethods.<locals>.XNrMr�r@r?r�rs	�rOr@r�)rr�rHrGr`rn	)r:rq	r�s   r?�test_abstractmethodsz.ClassPropertiesAndMethods.test_abstractmethods�sd�����.�'�4�9N�O�	�4�	����.�'�4�9N�O�	��	�
�
�
�~�
.��%�/�
.�
.�s�0A<�<Bc�P�Gd�d�}|�}|j|t�|jt�5tj	|�ddd�|jt�5tj|d�ddd�y#1swY�>xYw#1swYyxYw)Nc��eZdZeZy)�:ClassPropertiesAndMethods.test_proxy_call.<locals>.FakeStrN)r�r�r�r>rr�r@r?�FakeStrrw	�rNr@rx	r$)rr>rr�r�ri)r:rx	�fake_strs   r?�test_proxy_callz)ClassPropertiesAndMethods.test_proxy_call�s~��	�	��9�����h��,��
�
�y�
)��I�I�h��*��
�
�y�
)��K�K��%�(�*�
)�	*�
)��*�
)�s�B�0B�B�B%c�F�Gd�d�}|�}td�D]5}|jt�5tj	|�ddd��7td�D]5}|jt�5t
j
|�ddd��7td�D]5}|jt�5t
j|�ddd��7td�D]5}|jt�5t
j|�ddd��7ddl	m
}td�D]2}|jt�5|j||�ddd��4y#1swY��RxYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�qxYw)Nc��eZdZy)�RClassPropertiesAndMethods.test_specialized_method_calls_check_types.<locals>.ThingNrMr�r@r?�Thingr}	�rOr@r~	r�r)�deque)r�rr�r6�sortr>r�r�r��collectionsr	r�)r:r~	r�r�r	s     r?�)test_specialized_method_calls_check_typeszCClassPropertiesAndMethods.test_specialized_method_calls_check_types�s=��	�	�����r��A��"�"�9�-��	�	�%� �.�-���r��A��"�"�9�-��	�	�%� �.�-���r��A��"�"�9�-��	�	�%� �.�-���r��A��"�"�9�-��	�	�%� �.�-��	&��r��A��"�"�9�-����U�E�*�.�-��!.�-��.�-��.�-��.�-��
.�-�s;�E%�8E2�;E?�>F�F�%E/	�2E<	�?F	�F	�F 	c��Gd�d�}|j|_|�}|jtt|�|jtt
|�y)Nc��eZdZy)�7ClassPropertiesAndMethods.test_repr_as_str.<locals>.FooNrMr�r@r?r	r�	�rOr@r	)r�r�rr�r>r�)r:r	r�s   r?�test_repr_as_strz*ClassPropertiesAndMethods.test_repr_as_str�sB��	�	��{�{����e�����.�#�s�3����.�$��4r@c��Gd�dt�}|�}d|_|j|dd�|j||�y)Nc�<�eZdZejZejZy)�>ClassPropertiesAndMethods.test_mixing_slot_wrappers.<locals>.XN)r�r�r�r�r~r*r��__neg__r�r@r?r�r�	�s���*�*�K��i�i�Gr@r�r�r�)r�r�rE)r:r�r�s   r?�test_mixing_slot_wrappersz3ClassPropertiesAndMethods.test_mixing_slot_wrappers�sD��	 ��	 �
�C���������3���$�����Q�B�r@c���Gd�dt�}|�}|jt�5||k(ddd�|jt�5||zddd�y#1swY�-xYw#1swYyxYw)Nc�<�eZdZejZej
Zy)�BClassPropertiesAndMethods.test_wrong_class_slot_wrapper.<locals>.AN)r�r�r�r>rArir�r@r?r}r�	�s���Z�Z�F��k�k�Gr@r})r-rr�)r:r}rBs   r?�test_wrong_class_slot_wrapperz7ClassPropertiesAndMethods.test_wrong_class_slot_wrapper�s^��	"��	"�
�C��
�
�
�y�
)�
��F�*�
�
�
�y�
)�
��E�*�
)�*�
)��
)�
)�s�A�A*�A'�*A3c��|jt�5}Gd�d�}ddd�tj�}|j	d|�y#1swY�1xYw)Nc��eZdZdgZdZy)�EClassPropertiesAndMethods.test_slot_shadows_class_variable.<locals>.Xr�N)r�r�r�r�r�r�r@r?r�r�	�s��"�G�	��r@r�z0'foo' in __slots__ conflicts with class variable)rr�r>r�rE)r:r�r�rOs    r?� test_slot_shadows_class_variablez:ClassPropertiesAndMethods.test_slot_shadows_class_variable�sK��
�
�
�z�
*�b�
�
�+�
���������K�Q�O�+�
*�s�A�Ac��Gd�d�}d|_|j|jd�|jt�5}t	t
�jdjt
d�ddd�|jdtj��|jt�5}t	|�jdj|�ddd�|jdt|j��|j|jd�y#1swY��xYw#1swY�WxYw)Nc��eZdZdZy)�1ClassPropertiesAndMethods.test_set_doc.<locals>.X�elephantNr�r�r@r?r�r�	�s��r@r��bananar�blahz7cannot set '__doc__' attribute of immutable type 'list'z7cannot delete '__doc__' attribute of immutable type 'X')rrErr�rGr6rIr�rr>r�r+)r:r�r�s   r?�test_set_docz&ClassPropertiesAndMethods.test_set_doc�s���	�	���	�������H�-�
�
�
�y�
)�R���J���	�*�2�2�4��@�*��
�
�O�QT�UW�Ua�Ua�Qb�c�
�
�
�y�
)�R���G���Y�'�2�2�1�5�*��
�
�O�QT�UW�Ua�Ua�Qb�c�������H�-�*�
)��*�
)�s�1D(�6(D4�(D1�4D=c�d�tjtjtjt
jg}gd�}t||�D]-\}}|jt|�j|dz��/|D]D}|jjdz|jz}|j|j|��F|jtjjd�|jtjjd�|jtjjd�|jt
jjd�Gd�d	�}|jt�5|`ddd�|jttjd
j td�Gd�d
�a|jt"jd
�|jt"j$jd�y#1swY��xYw)N)r��member�getset�wrapper�_descriptor�.z	str.lowerzcomplex.realz
float.realzint.__add__c��eZdZy)�2ClassPropertiesAndMethods.test_qualname.<locals>.XNrMr�r@r?r�r�	rOr@r�r��Oinkc� �eZdZGd�d�Zy)r�c��eZdZy)�Y.InsideNrMr�r@r?�Insider�	
rr@r�	N)r�r�r�r�	r�r@r?r�r�	s��
�
r@r�r�	)r>r�r�r�r.r-rir�rErGr�r#	r�rr�rIr�r�r�	)r:�descriptorsr<rMr��qualnamer�s       r?�
test_qualnamez'ClassPropertiesAndMethods.test_qualname�s����y�y�'�,�,��
�
�C�K�K�H��9����U�+�D�A�q����T�!�W�-�-�q�=�/@�A�,��A��~�~�2�2�S�8�1�:�:�E�H����Q�^�^�X�6��	
������/�/��=�������2�2�N�C�������0�0�,�?�������1�1�=�A�	�	�
�
�
�y�
)���*�	
���)�T�]�]�>�%B�%J�%J��v�	'�	�	�	
�������-�������.�.�
�;�*�
)�s�H&�&H/c��ddi}tdd|�}|j|jd�|jd|j�|j|ddi�ddi}|jttdd|�y)Nr�z	some.namer	r�rf)rGrEr�r\rIrr�)r:r�rPs   r?�test_qualname_dictz,ClassPropertiesAndMethods.test_qualname_dictsw���k�
*��
�%��R�
 ��������+�6��������5�����n�k�:�;��a�
 �����)�T�5�"�b�9r@c�&�Gd�dt�}|�}d|_tj|�}~t	j
�|j
|��tj�D]}|jt|�|��y)Nc��eZdZd�Zy)�<ClassPropertiesAndMethods.test_cycle_through_dict.<locals>.Xc�<�tj|�||_yr�)r�r4rIr�s r?r4zEClassPropertiesAndMethods.test_cycle_through_dict.<locals>.X.__init__s���
�
�d�#� $��
r@NrKr�r@r?r�r�	s��
%r@r�r�)r�rurlrmrrV�assertIsNonerXr=�assertIsNotrG)r:r�r��wrr/s     r?�test_cycle_through_dictz1ClassPropertiesAndMethods.test_cycle_through_dictso��	%��	%�
�C�����
�[�[��^��
��������"�$�����!�A����T�!�W�a�(�"r@c�T�Gd�d�}|jt|d�|jt|d��Gd�d�}Gd�d�}Gd	�d
||�}|||fD]G}|d�|dd��|jt|ddd�|jt|ddd�
��Iy)Nc��eZdZy)�[ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNeitherNrMr�r@r?�OverrideNeitherr�	*rOr@r�	rfr�c��eZdZdd�Zy)�WClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNewc�4�tj|g|��i|��Sr�rY)r�r�rr;r�s     r?r�z_ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNew.__new__/s���~�~�c�9�D�9�D�9�9r@Nr�rVr�r@r?�OverrideNewr�	.s��
:r@r�	c��eZdZdd�Zy)�XClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInitc�4�tj|g|��i|��Sr�)r`r4)r:r�rr;r<s     r?r4zaClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInit.__init__2s�����t�=�d�=�f�=�=r@Nr�rKr�r@r?�OverrideInitr�	1s��
>r@r�	c��eZdZy)�XClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideBothNrMr�r@r?�OverrideBothr�	4rOr@r�	rgrkrDr	)r:r�	r�	r�	r�	�cases      r?�(test_object_new_and_init_with_parameterszBClassPropertiesAndMethods.test_object_new_and_init_with_parameters(s���	�	����)�_�a�8����)�_���;�	:�	:�	>�	>�	�;��	���|�;�D���G���q�M����i��q�!�Q�7����i��q�!���;�	<r@c��Gd�d�}Gd�d|�}|jd|j�|jd|j�y)Nc��eZdZy)�\ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.BaseNrMr�r@r?rAr�	=rOr@rAc��eZdZy)�[ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.SubNrMr�r@r?rFr�	?rOr@rFrI)rrIr\)r:rArFs   r?�4test_subclassing_does_not_duplicate_dict_descriptorszNClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors<s>��	�	�	�$�	��
�
�j�$�-�-�0�����S�\�\�2r@c����Gd�d�}|jt|�j�d�Gd�d�}Gd�d|�}Gd�d	|�}|�}|�}|�}t||�}|jt|j�d
�|jt|j�d�|jt|j�d�|jt|j�d
�Gd�d�}|�}	|jt|	j�d�|jt|j�d�Gd�d�}
|
�}t	�}tj||�}
|jt|
�d�d|_|jt|
�d�d|_|jt|
�d�y)Nc��eZdZd�Zy)�=ClassPropertiesAndMethods.test_bound_method_repr.<locals>.Fooc��yr�r�r�s r?r�zDClassPropertiesAndMethods.test_bound_method_repr.<locals>.Foo.methodFr r@N�r�r�r�r�r�r@r?r	r�	Er"r@r	z4<bound method .*Foo\.method of <.*Foo object at .*>>c��eZdZd�Zy)�>ClassPropertiesAndMethods.test_bound_method_repr.<locals>.Basec��yr�r�r�s r?r�zEClassPropertiesAndMethods.test_bound_method_repr.<locals>.Base.methodMr r@Nr�	r�r@r?rAr�	Lr"r@rAc��eZdZy)�BClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived1NrMr�r@r?�Derived1r�	OrOr@r�	c��eZdZd�Zy)�BClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2c��yr�r�r�s r?r�zIClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2.methodRr r@Nr�	r�r@r?�Derived2r�	Qr"r@r�	z6<bound method .*Base\.method of <.*Base object at .*>>z:<bound method .*Base\.method of <.*Derived1 object at .*>>z><bound method .*Derived2\.method of <.*Derived2 object at .*>>z:<bound method .*Base\.method of <.*Derived2 object at .*>>c��eZdZed��Zy)r�	c��yr�r�rGs r?r�zDClassPropertiesAndMethods.test_bound_method_repr.<locals>.Foo.methodbr�r@N)r�r�r�r�r�r�r@r?r	z=ClassPropertiesAndMethods.test_bound_method_repr.<locals>.Fooas��
�
��
r@z/<bound method .*Foo\.method of <class '.*Foo'>>c��eZdZd�Zy)�DClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallablec��yr�r�r�s  r?rgzMClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallable.__call__mr r@N)r�r�r�rgr�r@r?�
MyCallabler�	lr"r@r�	z*<bound method \? of <object object at .*>>r=z,<bound method name of <object object at .*>>r�	z0<bound method qualname of <object object at .*>>)	�assertRegexr�r�rur`r<�
MethodTyper�r�)r:r	rAr�	r�	r��derived1�derived2�super_d2r�r�	r��instancer�rs              �r?�test_bound_method_reprz0ClassPropertiesAndMethods.test_bound_method_reprDs����	�	�	
����c�e�l�l�+�C�	E�	�	�	�t�	�	�t�	��v���:���:����8�,������d�k�k�*�E�	G�����h�o�o�.�I�	K�����h�o�o�.�M�	O�����h�o�o�.�I�	K�	�	��e������c�j�j�)�>�	@�����c�j�j�)�>�	@�	�	��|���8���!�!�$��1������f��9�	;���
�����f��;�	=�&�������f��?�	Ar@zneed the _testcapi modulec�J��Gd�d��G�fd�d�}|jy)Nc�$�eZdZejZy)�6ClassPropertiesAndMethods.test_bpo25750.<locals>.DescrN)r�r�r�r��bad_getrer�r@r?r	r�	�s
���'�'�Gr@r	c�$��eZdZW��Zd�Zy)�2ClassPropertiesAndMethods.test_bpo25750.<locals>.Xc�^�d|_td�D�cgc]}d|z��	c}|_ycc}w)Ni'rg)r�r�r�)r�r�s  r?r�z:ClassPropertiesAndMethods.test_bpo25750.<locals>.X.__new__�s*�� ��	�).�u��6��A�1�a�4��6����6s�*N)r�r�r�r�r�r	s�r?r�r�	�s����G�E�
7r@r�rQ	)r:r�r	s  @r?�
test_bpo25750z'ClassPropertiesAndMethods.test_bpo25750{s ���
	(�	(�	7�	7�	
��r@c��Gd�d�}|j|j�g�Gd�d|�}|j|j�|g�~tj�|j|j�g�y)Nc��eZdZy)�>ClassPropertiesAndMethods.test_remove_subclass.<locals>.ParentNrMr�r@r?�Parentr�	�rOr@r�	c��eZdZy)�=ClassPropertiesAndMethods.test_remove_subclass.<locals>.ChildNrMr�r@r?�Childr�	�rOr@r�	)rEr?rXrh	)r:r�	r�	s   r?�test_remove_subclassz.ClassPropertiesAndMethods.test_remove_subclass�sq��
	�	�����.�.�0�"�5�	�F�	�����.�.�0�5�'�:��
�
�
������.�.�0�"�5r@c��Gd�d�}|jtd�5|�jddd�Gd�d�}|jtd�5|�jddd�y#1swY�DxYw#1swYyxYw)Nc�"�eZdZd�Zed��Zy)�EClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.Ac��td���N�FOO�r�r�s  r?r�zQClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.A.__getattr__�s
�� ��'�'r@c�$�|jd�S)N�asdf)r�r�s r?r�zIClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.A.foo�s���'�'��/�/r@N)r�r�r�r�r�r�r�r@r?r}r�	�s��
(��
0��
0r@r}r�	c�,�eZdZed��Zed��Zy)�EClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.Bc��td��r�	r�	r�s  r?r�zQClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.B.__getattr__�s
�� ��'�'r@c��td��)N�BAR)�NotImplementedErrorr�s r?r�zIClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.B.foo�s
��)�%�0�0r@N)r�r�r�r�r�r�r�r@r?r�r
�s(��
�
(��
(��
1��
1r@r�r
)r[r�r�r
)r:r}r�s   r?� test_attr_raise_through_propertyz:ClassPropertiesAndMethods.test_attr_raise_through_property�sn��	0�	0��
#�
#�J��
6�
�C�G�G�7�	1�	1��
#�
#�$7��
?�
�C�G�G�@�
?�7�
6��@�
?�s�A6�B�6A?�B)�r�r�r�r�rr#r4rrAr_rwr�r�r�r�r�r�raror�r�r�r�r�r�
refcount_testr�r�r2r�r�rr
rrrr<rH�expectedFailurerNr`rpr�r�r�r�r�r4rbrqr�r��flags�optimizer��cpython_onlyr�r�r�rrHr�r�r�r�r�r�r�r0rUrfr~r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr#r2r7r9rErSr_rzr�r�r�r�r�r�r�r�r�r�r��requires_resourcer�r	r	r	r!	r%	r(	r*	rA	rH	rU	rj	rl	rt	rz	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�r�	r�	r
rxrs@r?r�r��sX���@�I�2/�h0�T�l
(9�T'*�R"=�J@�B�*7�#;�J1�0;0�zW�r$2�L&-�P<�"A/�F:O�x<'�|
���N��N��W���=�>��X�_�_�Y�$�&�(C�D�/=�E�?�/=�b'�0
���N��N��W���=�>��X�_�_�Y�$�&�(C�D� �E�?� �O�* &�D)�$���
(��
(� ?�D���)��)�.E>�N/4�bH�P�*�W���D�E�@�F�@�,f8�P`"�D�>=F�~�X�_�_�S�Y�Y�'�'�1�,�@�B�2�B�2�
���<��<�A�FM?�^Z�xn�`_0�X
+�63�@><�@M@�^A�
X�W�rWP�r5�<K(�Z�.1�(1�*��@�$=�.,*�\�
1�%0�N(�4)�6*%�X�2
��(���,�O�?H�B*=�X(�@42�l3�0C��17�f�W���D�E�)I�F�)I�V%%�N9�.
<�K�"P�&�&�W���u�%��&��	�)�B
A���$�&6�&;$�z%�"�:%O�NH�	&�)� +�65� �
�P�
.�<�@:�
)�<�(3�5A�n�X�_�_�Y�$�&�(C�D�
�E�
�6�"r@r�c�P�eZdZd�Zej
eed�xrej�d�d��Z	ej
eed�xrej�d�d��Z
ej
eed�xrej�d�d��Zd�Zd�Z
y	)
�DictProxyTestsc�0�Gd�dt�}||_y)Nc��eZdZd�Zy)�DictProxyTests.setUp.<locals>.Cc��yr�r�r�s r?rLz$DictProxyTests.setUp.<locals>.C.meth�r r@Nrr�r@r?r�r
�r"r@r�)r`r�r�s  r?�setUpzDictProxyTests.setUp�s��	��	���r@�gettracez#trace function introduces __local__c���|jjj�}|j|t�t	|�}|j�|j
|gd��y)N�rIrr�rfrL)r�rIr��assertNotIsInstancer6r�	rE)r:rfr�s   r?�test_iter_keyszDictProxyTests.test_iter_keys�sQ���V�V�_�_�
!�
!�
#��� � ��T�*��B�x���	�	������ 7�	8r@c���|jjj�}|j|t�t	|�}|jt
|�d�yrg	)r�rIrNr
r6rEr	)r:rfrNs   r?�test_iter_valueszDictProxyTests.test_iter_values�sG���V�V�_�_�
#�
#�
%��� � ��T�*��b�������V��a�(r@c���|jjj�}|j|t�|D�cgc]}|d��	}}|j�|j
|gd��ycc}w)Nrr
)r�rIr7r
r6r�	rE)r:rf�itemr�s    r?�test_iter_itemszDictProxyTests.test_iter_items�se���V�V�_�_�
"�
"�
$��� � ��T�*�$&�'�B�D��Q��B��'��	�	������ 7�	8��(s�A2c���Gd�dt�}Gd�dt�}Gd�d|��}|jt|j�t|j��y)Nc��eZdZy)�7DictProxyTests.test_dict_type_with_metaclass.<locals>.BNrMr�r@r?r�r!
�rOr@r�c��eZdZy)�7DictProxyTests.test_dict_type_with_metaclass.<locals>.MNrMr�r@r?r�r#
�rOr@r�c��eZdZy)�7DictProxyTests.test_dict_type_with_metaclass.<locals>.CNrMr�r@r?r�r%
�r�r@r�rB)r`rGrErI)r:r�r�r�s    r?�test_dict_type_with_metaclassz,DictProxyTests.test_dict_type_with_metaclass�sJ��	��	�	��	�	�!�	�	
����a�j�j�)�4��
�
�+;�<r@c�b�t|jj�}|j|j	d�|�|j|jd�|�|jjj
�D]'\}}|jdj||�|��)y)Nz
mappingproxy(�)z
{!r}: {!r})	r�r�rIr�rc�endswithr7rr
)r:rnr�r�s    r?�	test_reprzDictProxyTests.test_repr�s}��
������!��������_�5�q�9�����
�
�3���+��F�F�O�O�)�)�+�D�A�q��M�M�,�-�-�a��3�Q�7�,r@N)r�r�r�r
r2r�r�r�r
r
r
r
r&
r*
r�r@r?r
r
�s�����X�_�_�W�S�*�-�@�,�#�,�,�.�=�?�8�?�8��X�_�_�W�S�*�-�@�,�#�,�,�.�=�?�)�?�)��X�_�_�W�S�*�-�@�,�#�,�,�.�=�?�8�?�8�	=�8r@r
c��eZdZd�Zy)�AAAPTypesLongInitTestc��Gd�dt�}	td|�d�tjt�y#Y�xYw)Nc��eZdZd�Zy)�>AAAPTypesLongInitTest.test_pytype_long_ready.<locals>.UserLongc��yr�r��r:r;s  r?r_zFAAAPTypesLongInitTest.test_pytype_long_ready.<locals>.UserLong.__pow__r r@Nr1r�r@r?�UserLongr/
�r"r@r2
r)r`rrGr�r�)r:r2
s  r?�test_pytype_long_readyz,AAAPTypesLongInitTest.test_pytype_long_ready�s8��	�v�	�	���8�:�q�!�	
������	��s	�=�AN)r�r�r�r3
r�r@r?r,
r,
�s��
r@r,
c��eZdZd�Zy)�	MiscTestsc����G��fd�dt�}Gd�dt�}Gd�dt��td|f|�di��|j�jd	�|j�jd
�y)Nc� ��eZdZd�Z��fd�Zy)�7MiscTests.test_type_lookup_mro_reference.<locals>.MyKeyc��td�S)N�mykeyr	r�s r?rGz@MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__hash__s���G�}�$r@c����f�_yr�r�)r:r��Base2r�s  ��r?rAz>MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__eq__s���$�h��r@Nr
	)r<
r�s��r?�MyKeyr8
s
���
%�
'r@r=
c��eZdZdZdZy)�6MiscTests.test_type_lookup_mro_reference.<locals>.Base�	from BaseN�r�r�r�r:
�mykey2r�r@r?rAr?
s���E� �Fr@rAc��eZdZdZdZy)�7MiscTests.test_type_lookup_mro_reference.<locals>.Base2�
from Base2NrA
r�r@r?r<
rD
s�� �E�!�Fr@r<
r�r�r@
rE
)r`rGrEr:
rB
)r:r=
rAr<
r�s   @@r?�test_type_lookup_mro_referencez(MiscTests.test_type_lookup_mro_reference
sg���	'�F�	'�	!�6�	!�	"�F�	"�
��t�g����|�,��������+�.�������<�0r@N)r�r�r�rF
r�r@r?r5
r5
s��1r@r5
c�Z�eZdZdidddfd�Zd�Zd�Zdd�Zed��Zd�Z	d	�Z
d
�Zd�Zy)
�
PicklingTestsr�Nc�b�|dk\�r|j|�}|rE|j|dtj�|j|dt	|�||f�nE|j|dtj
�|j|dt	|�f|z�|j|d|�|�|j
t|d�|�n|j|d�|�|jt|d�|�y|j|d�yt	|�j}	tjt	|�|	|	turdn|	|�ff}|�||fz
}|j|j|�|�|j|j�|�y)Nrgrrfrkrn)�
__reduce_ex__rE�copyreg�
__newobj_ex__rG�
__newobj__�assertListEqualr6r�	�assertDictEqualr��__base__�_reconstructorr`�
__reduce__)
r:�protor�r;r<r
�	listitems�	dictitems�reduce_value�	base_types
          r?�
_check_reducezPicklingTests._check_reduce)s����A�:��,�,�U�3�L��� � ��a��'�2G�2G�H�� � ��a��4��9�d�F�2K�L�� � ��a��'�2D�2D�E�� � ��a��4��9�,��2E�F����\�!�_�e�4��$��$�$�T�,�q�/�%:�I�F��!�!�,�q�/�2��$��$�$�T�,�q�/�%:�I�F��!�!�,�q�/�2��S�	�*�*�I�#�2�2�!�#�Y�&�%.�&�%8�T�i��n�N�O�L�� ����(�����S�.�.�u�5�|�D����S�^�^�-�|�<r@c�����ttjdz�}d�ddd��ddi�G�fd�d	�}|�}|D]}|j||����j	�D]\}}t|||��|D]}|j||���
��Gd�d�}|�}|D]7}|d
k\s�	|j
t�5|j|�ddd��9G��fd�d�}|�}|D]}|d
k\s�	|j||����G�fd�d�}	G�fd�d�}
Gd�d�}Gd�d�}|D]O}|	|
||fD]D}
|
�}|d
k\s�|j
ttf�5|j|�ddd��F�QG�fd�d�}|�}|D]}|j||���Gd�d�}|�}|D]7}|d
k\s�	|j
t�5|j|�ddd��9G�fd�d�}|�}|D]}|j||��
��Gd�d�}|�}|D]}|j||d �
��Gd!�d"�}|�}|D]e}|j
t�5|j|�ddd�|d
ks�8|j
t�5|j�ddd��gG�fd#�d$�}|�}|D]{}|d
k\r|j||d�f�
��|j
t�5|j|�ddd�|j
t�5|j�ddd��}Gd%�d&t�}|d'd(i�}|D]}|j||t|��)��!Gd*�d+t�}|d,g�}|D]}|j||t|��-��!y#1swY��UxYw#1swY���xYw#1swY��@xYw#1swY��txYw#1swY���xYw#1swY��xYw#1swY��OxYw).Nrf)i����r�i7���i���)�bacon�fish�cheeseio���c���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C1c����Sr�r�r1
s �r?�__getnewargs__z4PicklingTests.test_reduce.<locals>.C1.__getnewargs__Ns����r@N�r�r�r�r`
r�s�r?rr^
Ms���
r@rrc��eZdZd�Zy)�%PicklingTests.test_reduce.<locals>.C2c��y�Nzbad argsr�r�s r?r`
z4PicklingTests.test_reduce.<locals>.C2.__getnewargs__Z���!r@Nra
r�r@r?r�rc
Y���
"r@r�rgc���eZdZ��fd�Zy)�%PicklingTests.test_reduce.<locals>.C3c�����fSr�r�)r:r;r<s ��r?�__getnewargs_ex__z7PicklingTests.test_reduce.<locals>.C3.__getnewargs_ex__cs
����f�~�%r@N�r�r�r�rk
r�s��r?rri
bs���
&r@rc���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C4c����dfS)Nzbad dictr�r1
s �r?rk
z7PicklingTests.test_reduce.<locals>.C4.__getnewargs_ex__ks����j�)�)r@Nrl
r�s�r?rrn
js���
*r@rc���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C5c���d�fS)Nz	bad tupler�)r:r<s �r?rk
z7PicklingTests.test_reduce.<locals>.C5.__getnewargs_ex__ns���#�V�,�,r@Nrl
)r<s�r?�C5rq
ms���
-r@rs
c��eZdZd�Zy)�%PicklingTests.test_reduce.<locals>.C6c��y)Nr�r�r�s r?rk
z7PicklingTests.test_reduce.<locals>.C6.__getnewargs_ex__qrmr@Nrl
r�r@r?�C6ru
pror@rw
c��eZdZd�Zy)�%PicklingTests.test_reduce.<locals>.C7c��yre
r�r�s r?rk
z7PicklingTests.test_reduce.<locals>.C7.__getnewargs_ex__trf
r@Nrl
r�r@r?�C7ry
srg
r@r{
c���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C9c����ifSr�r�r1
s �r?rk
z7PicklingTests.test_reduce.<locals>.C9.__getnewargs_ex__~s
����b�z�!r@Nrl
r�s�r?�C9r}
}r!r@r
c��eZdZd�Zy)�&PicklingTests.test_reduce.<locals>.C10c��t�r�r:r�s r?rk
z8PicklingTests.test_reduce.<locals>.C10.__getnewargs_ex__���� � r@Nrl
r�r@r?�C10r�
����
!r@r�
c���eZdZ�fd�Zy)�&PicklingTests.test_reduce.<locals>.C11c����Sr�r�rs �r?r�z3PicklingTests.test_reduce.<locals>.C11.__getstate__�s����r@N�r�r�r�r�rs�r?�C11r�
�s���
r@r�
c��eZdZd�Zy)�&PicklingTests.test_reduce.<locals>.C12c��y)N�not dictr�r�s r?r�z3PicklingTests.test_reduce.<locals>.C12.__getstate__�rf
r@Nr�
r�r@r?�C12r�
�rg
r@r�
r�
c��eZdZd�Zy)�&PicklingTests.test_reduce.<locals>.C13c��t�r�r:r�s r?r�z3PicklingTests.test_reduce.<locals>.C13.__getstate__�r�
r@Nr�
r�r@r?�C13r�
�r�
r@r�
c�*��eZdZeW��Z�fd�Zy)�&PicklingTests.test_reduce.<locals>.C14c�P���j�D]\}}t|||��yr��r7rd)r:r=rr
s   �r?r4z/PicklingTests.test_reduce.<locals>.C14.__init__�s#���#(�;�;�=�K�D�%��D�$��.�$1r@N)r�r�r�r�r�r4rs�r?�C14r�
�s����e��I�
/r@r�
c��eZdZy)�&PicklingTests.test_reduce.<locals>.C15NrMr�r@r?�C15r�
�rOr@r�
�quebeci����)rU
c��eZdZy)�&PicklingTests.test_reduce.<locals>.C16NrMr�r@r?�C16r�
�rOr@r�
�yukon)rT
)r��pickle�HIGHEST_PROTOCOLrX
r7rdrr�rJ
r�r;rR
r�r6)r:�	protocolsrr�rS
r=rr�rrrs
rw
r{
r�r
r�
r�
r�
r�
r�
r�
r�
r;r<r
s                      @@@r?�test_reducezPicklingTests.test_reduceGs����&�1�1�A�5�6�	�����.���4� ��	�	��d���E����u�c�4�0��!�;�;�=�K�D�%��C��u�%�)��E����u�c�4�u��=��	"�	"��d���E���z��&�&�y�1��%�%�e�,�2�1��
	&�	&��d���E���z��"�"�5�#�t�V�<��	*�	*�	-�	-�	�	�	"�	"��E��2�r�2�~���e���A�:��*�*�I�z�+B�C��)�)�%�0�D�C�&��	"�	"��d���E����u�c�4�0��	!�	!��e���E���z��&�&�z�2��%�%�e�,�3�2��
	�	��e���E����u�c���7��	"�	"��e���E����u�c���<��	!�	!��e���E��"�"�:�.��!�!�%�(�/��q�y��&�&�z�2��N�N�$�3�2�	�	/�	/��e���E���z��"�"�5�#�d�E�]�"�C��&�&�y�1��%�%�e�,�2��&�&�y�1��N�N�$�2�1�
�	�$�	��8�T�"�#���E����u�c�T�#�Y��?��	�$�	��7�)�n���E����u�c�T�#�Y��?��A2�1��6D�C�� 3�2��,/�.��3�2��2�1��1�1�sT�
O7�=P�9P�P�P+�3P8�"Q�7P	�P�P	�P(	�+P5	�8Q	�Q	c��ttjdz�}Gd�d�}|D]$}|dk\rind}|j||�|���&y)Nrfc��eZdZd�Zd�Zy)�7PicklingTests.test_special_method_lookup.<locals>.Pickyc��iSr�r�r�s r?r�zDPicklingTests.test_special_method_lookup.<locals>.Picky.__getstate__�s���	r@c�"�|dvrt|��y)N)r`
rk
rer�s  r?r�zCPicklingTests.test_special_method_lookup.<locals>.Picky.__getattr__�s���B�B�(��.�.�r@N)r�r�r�r�r�r�r@r?�Pickyr�
�s��
�
r@r�
rgr)r�r�
r�
rX
)r:r�
r�
�protocolr
s     r?r4z(PicklingTests.test_special_method_lookup�sQ���&�1�1�A�5�6�	�	�	�"�H�"�a�-�B�T�E����x�����>�"r@c	�2�|�dj||�}t|�jtjurt	d��|j|||��|j
t|�t|�|��t|d�rP|j|j|j|��|j|j|j|��t|d�r�|j|j|j|��|jD]T}|jt||�t||�|��|jt||d�t||d�|���V|jt|�t|�|��y)zKUtility method to verify if two objects are copies of each others.
        Nz{!r} is not a copy of {!r}zCobject passed to _assert_is_copy must override the __repr__ method.)r�rIr�)r
rGr�r`r�r�	rr�rO
rIrN
r�rErHr�)r:r��objcopyr��slots     r?�_assert_is_copyzPicklingTests._assert_is_copy�sh���;�.�5�5�c�7�C�C���9������0�
�=�>�
>�����g�3��/��
�
�d�3�i��g��C�
�8��3�
�#�� � ����w�/?�/?�S� �I����S�\�\�7�+;�+;���E��3��$�� � �����0A�0A�s� �K��
�
��� � ��C��&����(>�C�!�I�� � ���d�D�!9�!(��$��!=�3�!�H�&�
	
����c��D��M�s��;r@c���Gd�d���fd�tjttjdz�tj
tjhtjtjh�D�S)zLUtility method to generate the many possible pickle configurations.
        c�"�eZdZdZd�Zd�Zd�Zy)�<PicklingTests._generate_pickle_copiers.<locals>.PickleCopierz&This class copies object using pickle.c�.�||_||_||_yr�)rS
�dumps�loads)r:rS
r�
r�
s    r?r4zEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__init__�s��"��
�"��
�"��
r@c�X�|j|j||j��Sr�)r�
r�
rS
r*s  r?r�zAPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.copy�s ���z�z�$�*�*�S�$�*�*�"=�>�>r@c���dj|j|jj|jj|j
j|j
j�S)Nz0PickleCopier(proto={}, dumps={}.{}, loads={}.{}))r
rS
r�
r�r�r�
r�s r?r�zEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__repr__�sQ��K����
�
� $�
�
� 5� 5�t�z�z�7N�7N� $�
�
� 5� 5�t�z�z�7N�7N�P�Qr@N)r�r�r�rr4r�r�r�r@r?�PickleCopierr�
�s��4�
#�
?�
Qr@r�
c3�(�K�|]	}�|����y�wr�r�)r�r;r�
s  �r?r�z9PicklingTests._generate_pickle_copiers.<locals>.<genexpr>�s%�����E�D�)-��d�#�D�s�rf)	�	itertools�productr�r�
r�
r�
�_dumpsr�
�_loads)r�
s@r?�_generate_pickle_copiersz&PicklingTests._generate_pickle_copiers�sb���	Q�	Q� E��$�$�U�6�+B�+B�Q�+F�%G�&,�l�l�F�M�M�%B�&,�l�l�F�M�M�%B�D�E�	Er@c��Gd�d�a|jt�5tjt�d�ddd�Gd�dt�a|jt�5tjt�d�ddd�Gd�d�aGd�dt�aGd�d	t�a|j�D]�}|j|�
�5t�}|j|�}|j||�d|_|j|�}|j||�t�}d|_d|_|j|�}|j||�t
�}d|_d
|_|j|�}|j||�ddd���y#1swY��{xYw#1swY��=xYw#1swY��xYw)Nc��eZdZdgZy)r�rBNr�r�r@r?r�r�	rr@r�rc��eZdZy)rNNrMr�r@r?rNrNrOr@rNc�(�eZdZdZdgZd�Zd�Zd�Zy)r�z7A class with __getstate__ and __setstate__ implemented.rBc���t|di�j�}t|�jD]3}|jjdd�D]}	t||�||<��5|S#t$rY�$wxYw)NrIr�r�)rHr�rGr^rIr�r�)r:r
r�r�
s    r?r�zC.__getstate__sy����j�"�5�:�:�<����:�-�-�C� #��� 0� 0��b� A��!�*1�$��*=�E�$�K�!B�.���� .�!� �!�s�A)�)	A5�4A5c�N�|j�D]\}}t|||��yr�r�
)r:r
r�r�s    r?r�zC.__setstate__ s"��!�K�K�M�D�A�q��D�!�Q�'�*r@c�T�t|�j�d|j��d�S)Nz()<r&)rGr�r�r�s r?r�z
C.__repr__#s ��%)�$�Z�%8�%8�$�:K�:K�:M�N�Nr@N)r�r�r�rr�r�r�r�r�r@r?r�r�s��E���I�
�
(�
Or@c��eZdZdZy)rNz!A subclass of a class with slots.Nr�r�r@r?rNrN&s��/�r@c��eZdZdZdgZy)r�zA subclass with an extra slot.rTN)r�r�r�rr�r�r@r?r�r�+s��,���Ir@r�)�
pickle_copierr�r�r�)
r�rr�r�
r�
rNr�r�
r/	r�r�
rBrT)r:r�
r�r�s    r?�test_pickle_slotszPicklingTests.test_pickle_slotss���	�	�
�
�
�y�
)��L�L���a� �*�	��	�
�
�
�y�
)��L�L���a� �*�	O�	O�$	��	�
	��	�
"�:�:�<�M����M��:��C��!�&�&�q�)���$�$�Q��*����!�&�&�q�)���$�$�Q��*��C��������!�&�&�q�)���$�$�Q��*��C��������!�&�&�q�)���$�$�Q��*�';�:�=�K*�
)��*�
)��@;�:�s$�F8�+G�CG�8G�G�G	c��Gd�d�aGd�dt�aGd�dt�aGd�dt�aGd	�d
t�atttt
tf}|j�}tj||�D]�\}}|j||��5t|di�}||ji|��}|j}|j|�}|j||�|d
k\rI|j s=|j"j%�|j|�}	|j||	�ddd���|D]�}|j|��5t|di�}||ji|��}t'|�}|j||�|j s7|j"j%�t'|�}	|j||	�ddd���y#1swY��lxYw#1swY��xYw)Nc�0��eZdZdZdZdZ�fd�Zd�Z�xZS)rz:The state of this class is copyable via its instance dict.r�Tc�>��t�|��||_||_yr�)rur4rBrT)r:rBrTrs   �r?r4zC1.__init__Ms����� �"������r@c�<�d|j�d|j�d�S)NzC1(r�r(
rSr�s r?r�zC1.__repr__Qs��'+�v�v�t�v�v�6�6r@)	r�r�r�r�ARGS�NEED_DICT_COPYINGr4r�rxrs@r?rrIs���H��D� $��
�
7r@rc�J��eZdZdZdZdZ�fd�Z�fd�Zed��Z	d�Z
�xZS)r�z,A list subclass copyable via __getnewargs__.r�Fc�B��t�|�|�}||_||_|Sr��rur�rBrT)r�rBrTr:rs    �r?r�z
C2.__new__Ys$����w��s�+���������r@c�D��t�|��|jd�y�Nr\
)rur4r�)r:r;rs  �r?r4zC2.__init__^s����� �"����H�%r@c��|jSr��r�
rGs r?r`
zC2.__getnewargs__c����x�x�r@c�T�d|j�d|j�dt|��d�S)NzC2(r��)<r&�rBrTr6r�s r?r�zC2.__repr__f���+/�6�6�4�6�6�4��:�F�Fr@)r�r�r�rr�
r�
r�r4r�r`
r�rxrs@r?r�r�Us5���:��D� %��
�

&�
�
 ��
 �
Gr@r�c�:�eZdZdZdZdZd�Zed��Zd�Z	d�Z
y)	rz*A list subclass copyable via __getstate__.r�Fc�B�||_||_|jd�yr�
)rBrTr�r 	s   r?r4zC3.__init__ns�����������H�%r@c��|jSr�r�
rGs r?r�zC3.__getstate__tr�
r@c�*�|\}}||_||_yr�rS)r:r
rBrTs    r?r�zC3.__setstate__ws�����1������r@c�T�d|j�d|j�dt|��d�S)NzC3(r�r�
r&r�
r�s r?r�zC3.__repr__{r�
r@N)r�r�r�rr�
r�
r4r�r�r�r�r�r@r?rrjs4��8��D� %��
&��
 ��
 �
�
Gr@rc�@��eZdZdZdZdZ�fd�Zed��Zd�Z	�xZ
S)rz,An int subclass copyable via __getnewargs__.)rNrMrfFc�D��t�|�||�}||_||_|Sr�r�
�r�rBrTrr:rs     �r?r�z
C4.__new__��&����w��s�E�2���������r@c��|jSr�r�
rGs r?r`
zC4.__getnewargs__�r�
r@c�T�d|j�d|j�dt|��d�S)NzC4(r�r�
r&�rBrTr-r�s r?r�zC4.__repr__����+/�6�6�4�6�6�3�t�9�E�Er@)r�r�r�rr�
r�
r�r�r`
r�rxrs@r?rrs0���:�(�D� %��
�
�
 ��
 �
Fr@rc�N��eZdZdZdZddiZdZdd��fd�
Zed	��Z	d
�Z
�xZS)rs
z/An int subclass copyable via __getnewargs_ex__.r�rrkFrrF	c�D��t�|�||�}||_||_|Sr�r�
r�
s     �r?r�z
C5.__new__�r�
r@c�2�|j|jfSr�)r�
�KWARGSrGs r?rk
zC5.__getnewargs_ex__�s�����#�*�*�-�-r@c�T�d|j�d|j�dt|��d�S)NzC5(r�r�
r&r�
r�s r?r�zC5.__repr__�r�
r@)r�r�r�rr�
r�
r�
r�r�rk
r�rxrs@r?rs
rs
�s<���=��D��q�\�F� %��,-�
�
�
.��
.�
Fr@rs
)r�r�
r�
rgrG)rr6r�rr-rrs
r�
r�
r�
r/	rHr�
rS
r�r�
r�
rIrr)
r:�test_classes�pickle_copiersr�r�
r<r�rS
r�
�objcopy2s
          r?�test_reduce_copyingz!PicklingTests.test_reduce_copyingFs���		7�		7�	G��	G�*	G��	G�*
	F��
	F� 	F��	F� �B��B��+���6�6�8��"+�"3�"3�L�.�"Q��C�����#�]��C� ��h��3���3�8�8�.�v�.��%�+�+��'�,�,�S�1���$�$�S�'�2�
�A�:�c�&;�&;��$�$�*�*�,�,�1�1�'�:�H��(�(��h�7�D�C�#R�" �C����#��&� ��h��3���3�8�8�.�v�.��"�3�-���$�$�S�'�2�
�,�,��$�$�*�*�,�'��0�H��(�(��h�7�'�&� �!D�C��"'�&�s�!BG*�BG7�*G4	�7H	c����Gd�dt��G��fd�d��ddl}|j�fdddifddf}|j��j	d�|�y)	Nc��eZdZy)�(PicklingTests.test_issue24097.<locals>.SNrMr�r@r?rer�
�rOr@rec�.��eZdZW�d�gZ��fd�Zy)�(PicklingTests.test_issue24097.<locals>.Ar�c�H��|dk(r�d�g�jddyt�)Nr�r�)�
__slotnames__r�)r:rur}res  ��r?r�z4PicklingTests.test_issue24097.<locals>.A.__getattr__�s'����6�>�*+�F�)��A�O�O�A�&��(�(r@N)r�r�r�r�
r�)r}res��r?r}r�
�s����v�Y�K�M�
)r@r}rr�r�rg)r>rK
rM
rErJ
)r:rK
r�r}res   @@r?�test_issue24097zPicklingTests.test_issue24097�s\���	��	�	)�	)�	��&�&���t�f�b�\�.B�D�$�O�������*�*�1�-�x�8r@c��t�j�|jt�5t�jd�ddd�t�j	d�|jt�5t�j	�ddd�|jt�5t�j	d�ddd�y#1swY��xYw#1swY�MxYw#1swYyxYwr�)r`rR
rr�rJ
r�s r?�test_object_reducez PicklingTests.test_object_reduce�s���	�����
�
�
�y�
)��H����"�*�	����q�!�
�
�
�y�
)��H�"�"�$�*�
�
�
�y�
)��H�"�"�4�(�*�
)�
*�
)��*�
)��
)�
)�s#�C�>C#�4C/�C �#C,�/C8r�)
r�r�r�rX
r�
r4r�
rhr�
r�
r�
r�
r�
r�r@r?rH
rH
'sS��-/��$� $��=�<y@�v?�<�4�E��E�0A+�Fz8�x9�")r@rH
c�0�eZdZejd��Zy)�SharedKeyTestsc�Z�Gd�d�}Gd�d|�}td�D�cgc]}|�|�f��c}|�|�}}|jtjt	|��tjt	|���|jtjt	|��tjddi��td�\|_|_|_|_	|_
|_|jtjt	|��tjt	|���|�}|jtjt	|��tjt	|���|jtjt	|��tjddi��|jtjt	|��tjddi��ycc}w)	Nc��eZdZy)�)SharedKeyTests.test_subclasses.<locals>.ANrMr�r@r?r}r�rOr@r}c��eZdZy)�)SharedKeyTests.test_subclasses.<locals>.BNrMr�r@r?r�r�rOr@r�r�rBrfr�)r�rEr�r(�vars�
assertLessr�r�rW�wr�r�r��
assertGreater)r:r}r�rsrBrTr s       r?�test_subclasseszSharedKeyTests.test_subclasses�sk��	�	�	��	�#�2�Y�'�Y��!�#�q�s��Y�'��s�A�C�1��������t�A�w�/����t�A�w�1G�H�����
�
�d�1�g�.��
�
�s�1�g�0F�G�(-�Q�x�$���Q�S�!�#�q�s�A�C������C�M�M�$�q�'�2�C�M�M�$�q�'�4J�K�
�S�����3�=�=��a��1�3�=�=��b��3J�K�����
�
�d�2�h�/�����A�w�1G�H�����
�
�d�1�g�.��
�
�s�1�g�0F�G��	(s�H(N)r�r�r�rr
rr�r@r?r�
r�
�s�����H��Hr@r�
c��eZdZdZd�Zd�Zy)�DebugHelperMetaz<
    Sets default __doc__ and simplifies repr() output.
    c�^�|jd��||d<tj||||�S)Nr)r�rGr�)r�r=rUr�s    r?r�zDebugHelperMeta.__new__�s0���9�9�Y��'�#�E�)���|�|�D�$��u�5�5r@c�,�t|j�Sr�)r�r�rGs r?r�zDebugHelperMeta.__repr__s���C�L�L�!�!r@N)r�r�r�rr�r�r�r@r?r	r	�s���6�"r@r	c�R�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�MroTestz�
    Regressions for some bugs revealed through
    mcsl.mro() customization (typeobject.c: mro_internal()) and
    cls.__bases__ assignment (typeobject.c: type_set_bases()).
    c� �d|_d|_y)NrF)�step�readyr�s r?r
z
MroTest.setUps����	���
r@c�R�|j|k}|r|xjdz
c_|Sr�)r)r:�limit�rets   r?�
step_untilzMroTest.step_untils%���y�y�5� ����I�I��N�I��
r@c�@��G�fd�dt�}Gd�d|��}y)zM
        type_set_bases must be aware that type->tp_mro can be NULL.
        c���eZdZ�fd�Zy)�4MroTest.test_incomplete_set_bases_on_self.<locals>.Mc�z���jd�r|xjdz
c_tj|�S)Nrfr�)rrJrGr�rAs �r?r�z8MroTest.test_incomplete_set_bases_on_self.<locals>.M.mros+����?�?�1�%��M�M�R�'�M��x�x��}�$r@Nr�r�s�r?r�rs���
%r@r�c��eZdZy)�4MroTest.test_incomplete_set_bases_on_self.<locals>.ANrMr�r@r?r}r$rOr@r}rBN�r	�r:r�r}s`  r?�!test_incomplete_set_bases_on_selfz)MroTest.test_incomplete_set_bases_on_selfs���	%��	%�	�!�	r@c����G��fd�dt�}Gd�d|���Gd�d��}|xjdz
c_y	)
z?
        Deep reentrancy must not over-decref old_mro.
        c���eZdZ��fd�Zy)�/MroTest.test_reent_set_bases_on_base.<locals>.Mc���|j�5|jdk(r&�jd�r�xjdz
c_tj|�S)Nr�rr�)r^r�rrJrGr�)r�r}r:s ��r?r�z3MroTest.test_reent_set_bases_on_base.<locals>.M.mro,s@����;�;�*�s�|�|�s�/B����r�*����r�)���x�x��}�$r@Nr�)r}r:s��r?r�r +s���
%r@r�c��eZdZy)�/MroTest.test_reent_set_bases_on_base.<locals>.ANrMr�r@r?r}r#4rOr@r}rBc��eZdZy)�/MroTest.test_reent_set_bases_on_base.<locals>.BNrMr�r@r?r�r%6rOr@r�r�N)r	rJ)r:r�r�r}s`  @r?�test_reent_set_bases_on_basez$MroTest.test_reent_set_bases_on_base's5���	%��	%�	�!�	�	��	�	���r��r@c�l��G�fd�dt�}Gd�d|��}Gd�d|�}Gd�d	|�}y
)zU
        Similar to test_reent_set_bases_on_base, but may crash differently.
        c���eZdZ�fd�Zy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.Mc���|jd}|tur&�jd�r|xjdz
c_tj	|�S)Nrr�r�)rJr`rrGr�)r�r�r:s  �r?r�z:MroTest.test_reent_set_bases_on_direct_base.<locals>.M.mro?sA����}�}�Q�'���v�%����q�)����"�,���x�x��}�$r@Nr�r�s�r?r�r)>����
%r@r�c��eZdZy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.ANrMr�r@r?r}r-GrOr@r}rBc��eZdZy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.BNrMr�r@r?r�r/IrOr@r�c��eZdZy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.CNrMr�r@r?r�r1KrOr@r�Nr)r:r�r}r�r�s`    r?�#test_reent_set_bases_on_direct_basez+MroTest.test_reent_set_bases_on_direct_base:s3���	%��	%�	�!�	�	��	�	��	r@c�����G���fd�dt�}Gd�d|��}Gd�d|��Gd�d	|��d
�_�jt�5�xjdz
c_ddd�y#1swYyxYw)
aM
        type_set_bases must check for an inheritance cycle not only through
        MRO of the type, which may be not yet updated in case of reentrance,
        but also through tp_base chain, which is assigned before diving into
        inner calls to mro().

        Otherwise, the following snippet can loop forever:
            do {
                // ...
                type = type->tp_base;
            } while (type != NULL);

        Functions that rely on tp_base (like solid_base and PyType_IsSubtype)
        would not be happy in that case, causing a stack overflow.
        c���eZdZ���fd�Zy)�5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.Mc����jr.|jdk(r�f�_|jdk(r�f�_tj	|�S)N�B1�B2�rr�rJrGr�)r�r7r8r:s ���r?r�z9MroTest.test_reent_set_bases_tp_base_cycle.<locals>.M.mro_sB����:�:��|�|�t�+�(*�u����|�|�t�+�(*�u����x�x��}�$r@Nr�)r7r8r:s���r?r�r5^s���
%r@r�c��eZdZy)�5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.ANrMr�r@r?r}r;grOr@r}rBc��eZdZy)�6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B1NrMr�r@r?r7r=irOr@r7c��eZdZy)�6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B2NrMr�r@r?r8r?krOr@r8Tr�N)r	rrr�rJ)r:r�r}r7r8s`  @@r?�"test_reent_set_bases_tp_base_cyclez*MroTest.test_reent_set_bases_tp_base_cycleNsi��� 	%�	%��	%�	�!�	�	��	�	��	���
�
�
�
�y�
)��L�L�B��L�*�
)�
)�s�A4�4A=c������G���fd�dt�}Gd�d|��}Gd�d|�}Gd�d	|��Gd
�d|��d�_|f�_�f|_�j�j�f��j�j	��g��j|j	�g��j|j�f��j�j	�|g�y
)a�
        type_set_bases must check for reentrancy upon finishing its job
        by updating tp_subclasses of old/new bases of the type.
        Otherwise, an implicit inheritance cycle through tp_subclasses
        can break functions that recurse on elements of that field
        (like recurse_down_subclasses and mro_hierarchy) eventually
        leading to a stack overflow.
        c���eZdZ���fd�Zy)�;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.Mc����jr|jdk(rd�_�f�_tj	|�S�Nr�Fr9)r�r8r�r:s ���r?r�z?MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.M.mro|s3����:�:�#�,�,�#�"5�!&�D�J�#%�%�A�K��x�x��}�$r@Nr�)r8r�r:s���r?r�rC{s���
%r@r�c��eZdZy)�;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.ANrMr�r@r?r}rG�rOr@r}rBc��eZdZy)�<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B1NrMr�r@r?r7rI�rOr@r7c��eZdZy)�<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B2NrMr�r@r?r8rK�rOr@r8c��eZdZy)�;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.CNrMr�r@r?r�rM�rOr@r�TN)r	rrJrEr?)r:r�r}r7r8r�s`   @@r?�(test_tp_subclasses_cycle_in_update_slotsz0MroTest.test_tp_subclasses_cycle_in_update_slotsrs����	%�	%��	%�	�!�	�	��	�	��	�	��	���
��e����t���������r�e�,�����*�*�,�q�c�2�����*�*�,�b�1��������t�,�����)�)�+�b�T�2r@c�������Gd�dt��G����fd�dt�}Gd�d|��}Gd�d	|�}Gd
�d|��Gd�d
|��d�_�j��5|f�_ddd��f|_�j�j�f��j�jttj����y#1swY�gxYw)z�
        The same as test_tp_subclasses_cycle_in_update_slots, but tests
        a code path executed on error (goto bail).
        c��eZdZy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ENrMr�r@r?r�rQ�rOr@r�c���eZdZ����fd�Zy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.Mc����jr1|jdk(r"�j�fk(rd�_n
�f�_��tj	|�SrEr9)r�r8r�r�r:s ����r?r�zAMroTest.test_tp_subclasses_cycle_error_return_path.<locals>.M.mro�sF����:�:�#�,�,�#�"5��{�{�r�e�+�%*��
�')�e������x�x��}�$r@Nr�)r8r�r�r:s����r?r�rS�s
���
%�
%r@r�c��eZdZy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ANrMr�r@r?r}rV�rOr@r}rBc��eZdZy)�>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B1NrMr�r@r?r7rX�rOr@r7c��eZdZy)�>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B2NrMr�r@r?r8rZ�rOr@r8c��eZdZy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.CNrMr�r@r?r�r\�rOr@r�TN)
r/r	rrrJrEr^r�rGr�)r:r�r}r7r8r�r�s`   @@@r?�*test_tp_subclasses_cycle_error_return_pathz2MroTest.test_tp_subclasses_cycle_error_return_path�s����
	�	�	�	%�	%��	%�	�!�	�	��	�	��	�	��	���
�
�
�
�q�
!��%�A�K�"��t���������r�e�,�������E�$�(�(�1�+�$6�7�"�
!�s�-	C�C%c�@��G�fd�dt�}Gd�d|��}y)z�
        Extending an uninitialized type with type->tp_mro == NULL must
        throw a reasonable TypeError exception, instead of failing
        with PyErr_BadInternalCall.
        c���eZdZ�fd�Zy)�)MroTest.test_incomplete_extend.<locals>.Mc����|j�8|jdk7r)�jt�5Gd�d|�}ddd�tj|�S#1swY�xYw)Nr�c��eZdZy)�8MroTest.test_incomplete_extend.<locals>.M.mro.<locals>.XNrMr�r@r?r�rc�s�� r@)r^r�rr�rGr�)r�r�r:s  �r?r�z-MroTest.test_incomplete_extend.<locals>.M.mro�sP����;�;�&�3�<�<�3�+>��*�*�9�5�!��!�6��x�x��}�$�	6�5�s�A�A$Nr�r�s�r?r�r`�r+r@r�c��eZdZy)�)MroTest.test_incomplete_extend.<locals>.ANrMr�r@r?r}re�rOr@r}rBNrrs`  r?�test_incomplete_extendzMroTest.test_incomplete_extend�s���	%��	%�	�!�	r@c�@��G�fd�dt�}Gd�d|��}y)z�
        Attribute lookup on a super object must be aware that
        its target type can be uninitialized (type->tp_mro == NULL).
        c�"���eZdZ��fd�Z�xZS)�(MroTest.test_incomplete_super.<locals>.Mc���|j�(�jt�5t||�ddd�t
j
|�S#1swY�xYwr�)r^rr�ru�xxxrGr�)r�rr:s ��r?r�z,MroTest.test_incomplete_super.<locals>.M.mro�sC����;�;�&��*�*�>�:��c�3�+�;��x�x��}�$�;�:�s�A�A)r�r�r�r�rxrvs@�r?r�ri�s
���
%�
%r@r�c��eZdZy)�(MroTest.test_incomplete_super.<locals>.ANrMr�r@r?r}rm�rOr@r}rBNrrs`  r?�test_incomplete_superzMroTest.test_incomplete_super�s���
	%��	%�	�!�	r@c����Gd�d��G��fd�dt��|jt�5Gd�d���}ddd�y#1swYyxYw)	z�
        gh-92112: A custom mro() returning a result conflicting with
        __bases__ and deleting itself caused a double free.
        c��eZdZy)�/MroTest.test_disappearing_custom_mro.<locals>.BNrMr�r@r?r�rq�rOr@r�c���eZdZ��fd�Zy)�/MroTest.test_disappearing_custom_mro.<locals>.Mc����`�fSr�)r�)r�r�r�s ��r?r�z3MroTest.test_disappearing_custom_mro.<locals>.M.mro�s����E��t�r@Nr�)r�r�s��r?r�rs�s���
r@r�c��eZdZy)�/MroTest.test_disappearing_custom_mro.<locals>.ANrMr�r@r?r}rv�rr@r}rBN)r	rr�)r:r}r�r�s  @@r?�test_disappearing_custom_mroz$MroTest.test_disappearing_custom_mro�sA���
	�	�	��	�
�
�
�y�
)�
�a�
�*�
)�
)�s�
A
�
AN)r�r�r�rr
rrr&r2r@rNr]rfrnrwr�r@r?r
r
sA�����
��&�("�H"3�H 8�D�$� r@r
�__main__)#rMrK
rXr�
r)r�
r5r7r�r<r2rlrlr�r�
contextlibrrrr�r�r�r3rr�r
r,
r5
rH
r�
rGr	r
r��mainr�r@r?�<module>r{s<����	���
�
�
�
������&������
uD�H�%�%�uD�p^H�� 1� 1�^H�BQ98�X�&�&�98�x�H�-�-��21��!�!�1�6w)�H�%�%�w)�t
H�X�&�&�H�4	"�d�	"�b�h���b�J�z���H�M�M�O���ov���I���
���I��s$�D�
D)�D&�%D&�)D3�2D3

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