403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/test/__pycache__/test_descr.cpython-312.opt-1.pyc
�

���g�'��z�ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZddlmZddlmZ	ddlZ	ddlZGd�de
j0�ZGd�d	e
j0e�ZGd
�de
j0�ZGd�d
e
j0�ZGd�de
j0�ZGd�de
j0�ZGd�de
j0�ZGd�de �Z!Gd�de
j0�Z"e#dk(re
jH�yy#e$rdZY��wxYw#e$rdZY��wxYw)�N)�deepcopy)�redirect_stdout)�support)�ExtraAssertionsc�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     �$C:\Python312\\Lib\test\test_descr.pyr5zOperatorsTest.__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;rC�resr?�meth�d�t�m�bms	         r@�	unop_testzOperatorsTest.unop_testQs���
�!�H������d�A���,���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D�����1��s�#�
�Q��
�������s�#rAc��||d�}|jt||�|�t|�}t||�}||jvr|j
d}||jvr�|jt|d|�|j|�|j|||�|�t||�}	|j|	|�|�y)N�rC�brrDrE)
r;rCrUrLr?rMrNrOrPrQs
          r@�
binop_testzOperatorsTest.binop_testas����!�������d�A���,���G���A�t����!�*�*�$����A��A��!�*�*�$�	
�����I�q�1�1�:�:�d�3C�D�����1�a��#�&�
�Q��
������A���$rAc	���|||d�}|jt||�|�t|�}t||�}	||jvr|j
d}||jvr�|jt|	d|	�|j|�|j|	|t
||��|�t||�}
|j|
t
||��|�y)N�rCrU�crrD)rFrGrHrIrJrK�slice)r;rCrUrYrLr?rMrNrOrPrQs           r@�sliceop_testzOperatorsTest.sliceop_testps����!�!�$������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��#�.rAc��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)NrTrCrrD�r�execrFrHrIrJrK)
r;rCrUrL�stmtrMrNrOrPrQs
          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���%rAc��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)NrXrCrrDr])r;rCrUrYrLr_rMrNrOrPrQs           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���%rAc�>�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)rCrUrYrNrCrrD)rr^rFrHrJrKrIrZ)r;rCrUrYrNrLr_rM�
dictionaryrOrPrQs            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��#�.rAc	�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__�rgrh��b in a�__contains__�r�a[b]�__getitem__�a[b:c]�a+=b�__iadd__rl�rgrhrgrhrgrh�a*=b�__imul__�len(a)�__len__�a*b�__mul__�b*a�__rmul__�a[b]=c�__setitem__�rgrhrlro���rgr�r�ro�a[b:c]=d)rVr[r`rRrbre�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�
�%�	'rAc	�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)Nrhro�rgrlrgrmrnrrprqrxryrlrkr~r)
rVr7�keys�append�iterrF�__iter__�dictrRrG�repr�__repr__rb)r;rN�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�-��%�	'rAc��||d�}|jj�D]=\}}||vs�d|z}t||�s�t||�}|j	|||||��?t|jj��D]<\}}||vs�d|z}t||�s�t||�}|j||||��>y)NrTz__%s__)r6r8�hasattrrGrVr7r:rR)r;rCrU�skipr�r>r?rLs        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�3rAc�L�|jdd�|jdj�d�|jdj�d�Gd�dt�}|j|d�d�	|�dz|j	d	�y#t
$rYywxYw)
N�drlrgrc��eZdZd�Zy)�"OperatorsTest.test_ints.<locals>.Cc��tS�N��NotImplemented�r;�others  r@rjz*OperatorsTest.test_ints.<locals>.C.__add__����%�%rAN)�__name__�
__module__�__qualname__rj�rAr@�Cr�����
&rAr�r��z+NotImplemented should have caused TypeError)r�rF�__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_floats	s�����e�S�)rAc���|jddgd���Gd�dt�}|dd�	�}|jt|�d
�|j|jd�||d�	�}|jt|�d�|j|jd�|d
�}|jt|�d�|j|jd�y)NyY@�@)	r r"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����
rAc���|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�JrAN)r�r�r��	__slots__r�r��__str__r�rAr@�Numberr�s����I�
�
K��GrAr�g��Q�	@r��r�z3.14rhz3.1gPm@z234.5r�)r�r�rFr�r�)r;r�rCs   r@�test_complexeszOperatorsTest.test_complexes
s������f�d�2O��	P�
	�W�
	�
�4�a� ������a��&�)��������#��1�1�������a��%�(��������#��5�M������a��'�*��������$rAc��|jtjdd�tdd��|jtj	dd�d�y)Nr�g@r�rgg�)rFr��__radd__r/�__rsub__r�s r@�test_explicit_reverse_methodsz+OperatorsTest.test_explicit_reverse_methods.sA������)�)�"�c�2�G�C��4E�F��������Q�/��6rA�"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>.spamlist9s��$��=�=��#�#rArgrhrirjrkrmrnrorprqrrrsrtrlrurvrwrxryrzr{r|r}r~rr�r�r�r�r�c��eZdZd�Zy)�(OperatorsTest.test_spam_lists.<locals>.Cc��y�Nrgr�r�s r@�fooz,OperatorsTest.test_spam_lists.<locals>.C.fooV���!rAN�r�r�r�r�r�rAr@r�r�U���#rAr�r��*r�)�copyr��_deepcopy_dispatchr�rVr[r`rRrbrerFr�r��getstate�setstate)r;r�r�r�r�rCs      r@�test_spam_listszOperatorsTest.test_spam_lists3sZ��	'�	$�
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�*rAc��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��spamdictr7r8)rNr�r��sd�k�vs      r@r�z/OperatorsTest.test_spam_dicts.<locals>.spamdictes6��$�����B��Q�W�W�Y����1���1��(��IrArhror�rgrmrnrprqrxryzrepr(a)r�rlrkr~rc��eZdZd�Zy)�(OperatorsTest.test_spam_dicts.<locals>.Cc��yr�r�r�s r@r�z,OperatorsTest.test_spam_dicts.<locals>.C.foo�r�rANr�r�rAr@r�r��r�rAr��barr��r�r�r�r�)r�r�r�r�rVr7r�r�r�rFr�rHrRr�rbr8r�r�r�)r;r�r�r�rNr�r�r��	straightd�spamdr�rCs            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�+rAc��|jttj�j	�tj�yr�)rF�range�sys�maxsizeryr�s r@�test_wrap_lenfunc_bad_castz(OperatorsTest.test_wrap_lenfunc_bad_cast�s(������s�{�{�+�3�3�5�s�{�{�CrA)rxry)rirj)rrrq)rsrt)r~r)r�r)r�r�r�r5rRrVr[r`rbrer�r�r�r�r�r�r�r�impl_detailr3�skipIfr�r�r�r�r�rAr@rrs���.$�`$� 
%�/�&�&&�&/�&'�"'�<+-�7�"E�$*�%�B7�
�W���=�>��X�_�_�Y�$�&�(C�D�)+�E�?�)+�V�W���=�>��X�_�_�Y�$�&�(C�D�/,�E�?�/,�bDrArc�T��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Z�fd�Zej.d��Zej2d�ej6edud�d���Zd�Zej.d��Zej2d�ej6edud�d���Z d�Z!d�Z"d�Z#ejHd��Z%d �Z&ejHd!��Z'd"�Z(d#�Z)d$�Z*d%�Z+ej2d&�d'��Z,d(�Z-d)�Z.d*�Z/d+�Z0ej6e1jdjfd,k\d-�d.��Z4ejjd/��Z6d0�Z7d1�Z8d2�Z9�fd3�Z:d4�Z;d5�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\�Zcej2d]�d^��Zdd_�Zed`�Zfda�Zgdb�Zhdc�Zidd�Zjej�de�df��Zldg�Zmdh�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��fd��Z�ej6e�dud��d���Z�d��Z�d��Z��xZ�S)��ClassPropertiesAndMethodsc����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�Nrgr)rF�len�stater7r8)�
self_localrC�kwr�r�r;s     �r@r5z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.__init__�sP�����$�$�S��V�Q�/�'(��t�J�$�� $�R�X�X�Z� 0���1�()�
�1�
�!1�rAc�&�|j|d�Sr�)r��r;�keys  r@rqzBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__getitem__�s���x�x��Q�'�'rAc�`���j|t�tj|||�yr�)�assertIsInstancer.r�r)rr�valuer;s   �r@rzBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__setitem__�s%����%�%�c�3�/�� � ��S�%�8rAc��||_yr��r�r;rs  r@r�z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.setstate��	��"��
rAc��|jSr�r
r�s r@r�z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.getstate�����z�z�!rAN)	r�r�r�rr5rqrr�r�r�s�r@r�r��s!����E�
*�
(�
9�
#�
"rAr�r�rgrhr�r�r�r�r�
r���2)�
assertTrue�
issubclassr�r
rF�assertIs�	__class__rr�r�r�)	r;rNr��a1�a2rC�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�#�.��rAc��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�)�
isinstancerZ�start�stopr7rq�r;r�s  r@rqzBClassPropertiesAndMethods.test_python_lists.<locals>.C.__getitem__�s6���a��'��7�7�A�F�F�?�*��'�'��a�0�3�6�6rAN�r�r�r�rqr�rAr@r�r �s��
7rAr��rrgrhrr�rg�erh�f��)r�r+)r7�extendrF�r;r�rCs   r@�test_python_listsz+ClassPropertiesAndMethods.test_python_lists�su��	7��	7�

�C��	���������1��s�#�����1��s�#�����1��s�#�����3�s��Y�/rAc���������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@r5z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.__init__��	�� ��rAc��|jSr�r3r�s r@r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.getstate�����|�|�#rAc��||_yr�r3rs  r@r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.setstate��	��$��rAN�r�r�r�r5r�r�r�rAr@r�r1����
!�
$�
%rAr���	metaclassrrc��eZdZd�Zy)�<ClassPropertiesAndMethods.test_metaclass.<locals>._metaclassc��|Sr�r��r�s r@�myselfzCClassPropertiesAndMethods.test_metaclass.<locals>._metaclass.myself�s��C�ZrAN)r�r�r�rBr�rAr@�
_metaclassr?�s��'rArCc��eZdZy��3ClassPropertiesAndMethods.test_metaclass.<locals>.DN�r�r�r�r�rAr@�DrF����rArHc��eZdZd�Zy)�4ClassPropertiesAndMethods.test_metaclass.<locals>.M1c�<�d|d<tj||||�S)Nrg�__spam__�rHr�)r�r>�basesr�s    r@r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.M1.__new__�s!��#$��Z� ��|�|�C��u�d�;�;rAN�r�r�r�r�r�rAr@�M1rK�s��
<rArQc��eZdZy�r1NrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rIrArgc��eZdZy)�;ClassPropertiesAndMethods.test_metaclass.<locals>._instanceNrGr�rAr@�	_instancerU�rIrArVc�(��eZdZed��Z�fd�Zy)�4ClassPropertiesAndMethods.test_metaclass.<locals>.M2c�Z�tj|�}||_||_||_|Sr�)�objectr�r>rOr�)r�r>rOr�r;s     r@r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__new__�s*���~�~�c�*�� ��	�"��
� ��	��rAc	�����}|jD]>}|jd�r�t|||j|j||���@|S)N�__)r��
startswith�setattr�__get__)r;�itrrVs   �r@�__call__z=ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__call__sO����[���9�9�C��~�~�d�+� ��B��T�Y�Y�s�^�%;�%;�B��%E�F�%��	rAN)r�r�r��staticmethodr�ra)rVs�r@�M2rX�s���
�
��
�
rArcc��eZdZd�Zy)r1c��y�Nr�r�r�s r@r�z8ClassPropertiesAndMethods.test_metaclass.<locals>.C.spam���rAN�r�r�r�r�r�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C���
rAr�r�r�c�"���eZdZ��fd�Z�xZS)�;ClassPropertiesAndMethods.test_metaclass.<locals>.autosuperc���t�|�||||�}|dddk(r|dd}|dddk(r�|rd|z}nd}t||t|��|S)Nrg�_z
_%s__super�__super)�superr�r^)r=r>rOr�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��:�.��
rA�r�r�r�r��
__classcell__)rrps@�r@rprks
���
�
rArpc��eZdZd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Ac��y�N�Ar�r�s r@rMz8ClassPropertiesAndMethods.test_metaclass.<locals>.A.meth&���rAN�r�r�r�rMr�rAr@rwrt%���
rArwc��eZdZd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Bc�<�d|jj�zS�N�B��	_B__superrMr�s r@rMz8ClassPropertiesAndMethods.test_metaclass.<locals>.B.meth)����T�\�\�.�.�0�0�0rANryr�rAr@rr|(���
1rArc��eZdZd�Zy)r1c�<�d|jj�zS�Nr���	_C__superrMr�s r@rMz8ClassPropertiesAndMethods.test_metaclass.<locals>.C.meth,r�rANryr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C+r�rAc��eZdZd�Zy)rFc�<�d|jj�zS�NrH)�	_D__superrMr�s r@rMz8ClassPropertiesAndMethods.test_metaclass.<locals>.D.meth/r�rANryr�rAr@rHz3ClassPropertiesAndMethods.test_metaclass.<locals>.D.r�rA�DCBAc��eZdZd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Ec�<�d|jj�zS)N�E)�	_E__superrMr�s r@rMz8ClassPropertiesAndMethods.test_metaclass.<locals>.E.meth3r�rANryr�rAr@r�r�2r�rAr��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_)r8r]r��propertyror�)r=r>rOr��hitsr�valr��setr�autopropertys         ��r@r�zFClassPropertiesAndMethods.test_metaclass.<locals>.autoproperty.__new__:s������ $�
�
��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�OrArq)rr�s@�r@r�r�7s���
O�
OrAr�c��eZdZd�Zd�Zy)rtc��|jSr���_A__xr�s r@�_get_xz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xLs�����y� rAc��||_yr�r��r;�xs  r@�_set_xz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._set_xNs���2��rAN)r�r�r�r�r�r�rAr@rwz3ClassPropertiesAndMethods.test_metaclass.<locals>.AKs��
!�
rAr�r�i�c��eZdZy)�@ClassPropertiesAndMethods.test_metaclass.<locals>.multimetaclassNrGr�rAr@�multimetaclassr�V���rAr�c��eZdZd�Zy)rtc��yrvr�r�s r@r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xZrxrAN�r�r�r�r�r�rAr@rwz3ClassPropertiesAndMethods.test_metaclass.<locals>.AYrzrAc��eZdZd�Zy)r|c�<�d|jj�zSr~)r�r�r�s r@r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.B._get_x]����T�\�\�0�0�2�2�2rANr�r�rAr@rz3ClassPropertiesAndMethods.test_metaclass.<locals>.B\���
3rAc��eZdZd�Zy)r1c�<�d|jj�zSr�)r�r�r�s r@r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.C._get_x`r�rANr�r�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C_r�rAc��eZdZd�Zy)rFc�<�d|jj�zSr�)r�r�r�s r@r�z:ClassPropertiesAndMethods.test_metaclass.<locals>.D._get_xcr�rANr�r�rAr@rHz3ClassPropertiesAndMethods.test_metaclass.<locals>.Dbr�rAc���eZdZdZ�fd�Zy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.Trc�0���xjdz
c_yr���counter)r;r<�Ts  �r@r5z<ClassPropertiesAndMethods.test_metaclass.<locals>.T.__init__js����	�	�Q��	rAN)r�r�r�r�r5)r�s�r@r�r�hs
����G�
rAr�c��eZdZyrSrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.ClrIrAc��eZdZyrSrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.Cs��rAz5calling object w/o call method should raise TypeErrorc��eZdZd�Zy)rtc�,�tj|i|��Sr�rN�r<r=s  r@r�z;ClassPropertiesAndMethods.test_metaclass.<locals>.A.__new__|s���|�|�T�4�V�4�4rANrPr�rAr@rwz3ClassPropertiesAndMethods.test_metaclass.<locals>.A{���
5rAc��eZdZy�r|NrGr�rAr@rz3ClassPropertiesAndMethods.test_metaclass.<locals>.BrIrAc��eZdZyrSrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rIrAc��eZdZyrErGr�rAr@rHz3ClassPropertiesAndMethods.test_metaclass.<locals>.D�rIrAc�<���eZdZe��fd��Zed��Z�xZS)�7ClassPropertiesAndMethods.test_metaclass.<locals>.AMetac�J���jd�t�|�	||||�S)N�AMeta�r�ror���mclsr>rO�nsr�	new_callss    ��r@r�z?ClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__new__��&���� � ��)��w��t�T�5�"�=�=rAc��iSr�r�)r�r>rOs   r@�__prepare__zCClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__prepare__�s���	rA�r�r�r�rbr��classmethodr�rr�rr�s@�r@r�r��s)���
�
>��
>��
��
rAr�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�rAc�2��t�|�||�}d|d<|S)NT�BMeta_was_here)ror�)r�r>rOr�rs    �r@r�zCClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__prepare__�s$����W�(��u�5��'+��#�$��	rAr�r�s@�r@r�r��s)���
�
>��
>��
��
rAr�c��eZdZy�rtNrGr�rAr@rwz3ClassPropertiesAndMethods.test_metaclass.<locals>.A�rIrAc��eZdZyr�rGr�rAr@rz3ClassPropertiesAndMethods.test_metaclass.<locals>.B�rIrAc��eZdZyrSrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rIrAr�c��eZdZy��4ClassPropertiesAndMethods.test_metaclass.<locals>.C2NrGr�rAr@�C2r��rIrAr�c��eZdZyrErGr�rAr@rHz3ClassPropertiesAndMethods.test_metaclass.<locals>.D�rIrAc��eZdZy�r�NrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.E�rIrAc����Sr�r�)r<r=�markers  �r@�funcz6ClassPropertiesAndMethods.test_metaclass.<locals>.func�s����MrAc��eZdZy��3ClassPropertiesAndMethods.test_metaclass.<locals>.XNrGr�rAr@�Xr��rIrAr�c��eZdZy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.YNrGr�rAr@�Yr��rIrAr�c��eZdZy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.ZNrGr�rAr@�Zr��rIrAr�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�,�,rAc�*���jd�iSr��r�)r�r>rO�
prepare_callss   �r@r�zFClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__prepare__�s����$�$�Z�0��	rA�r�r�r�r�r�r�rr�rr�r�s@��r@r�r��s���
-��
��
rAr�c�8���eZdZ��fd�Ze��fd��Z�xZS)�:ClassPropertiesAndMethods.test_metaclass.<locals>.BNotMetac�D���jd�t�|�	|�S�N�BNotMetar�r�s   ��r@r�zBClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__new__�r�rAc�F���jd�t�|�	||�Sr)r�ror�)r�r>rOrr�s   ��r@r�zFClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__prepare__�s#����$�$�Z�0��w�*�4��7�7rAr�rs@��r@rr�s���
-��
8��
8rArc��eZdZyr�rGr�rAr@rwz3ClassPropertiesAndMethods.test_metaclass.<locals>.A�rIrAc��eZdZyr�rGr�rAr@rz3ClassPropertiesAndMethods.test_metaclass.<locals>.B�rIrAc��eZdZyrSrGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.C�rIrAc��eZdZyr�rGr�rAr@r�z4ClassPropertiesAndMethods.test_metaclass.<locals>.C2rIrAc��eZdZyrErGr�rAr@rHz3ClassPropertiesAndMethods.test_metaclass.<locals>.D
���rAc��eZdZyr�rGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.ErIrAc��eZdZy)�3ClassPropertiesAndMethods.test_metaclass.<locals>.FNrGr�rAr@�FrrIrArc��eZdZy)�4ClassPropertiesAndMethods.test_metaclass.<locals>.F2NrGr�rAr@�F2r rIrArc��eZdZyr�rGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.X+rrAc��eZdZyr�rGr�rAr@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.X.rrA)rHrFr�r�rBrrMrZr>rO�assertInr�r�rM�assertNotHasAttrr�r�r�r�r�r�clearrJ�assertRaisesr.)r;r�rCrCrHrNrQrYrcrwrr�r�r�r�r�r�r�r�r�r�rrrr�rVr�rpr�r�r�s                        @@@@@@@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�)r5)r;r>�MTs  �r@r5zEClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__init__6s������D�$�'rAc�N���jd|f��j||�S)NrI)r��__getattribute__�r;r>r�logs  ��r@r!zMClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__getattribute__8s'����
�
�I�t�,�-��*�*�4��6�6rAc�T���jd||f��j|||�y)Nr^)r��__setattr__)r;r>rrr#s   ��r@r%zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__setattr__;s&����
�
�I�t�U�3�4����t�T�5�1rAc�P���jd|f��j||�y)N�delattr)r��__delattr__r"s  ��r@r(zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__delattr__>s"����
�
�I�t�,�-����t�T�*rAN)r�r�r�r5r!r%r()rr#s��r@�MMr5s���
(�
7�
2�
+rAr)rCr�))r^r�r��rIr�)r'r�c��eZdZy)�@ClassPropertiesAndMethods.test_module_subclasses.<locals>.ModuleNrGr�rAr@�Moduler,KrrAr-z?inheriting from ModuleType and str at the same time should failc�j�djtjtjd���S)Nr�r)r�)�join�random�choices�string�
ascii_lettersr�rAr@�random_namezEClassPropertiesAndMethods.test_module_subclasses.<locals>.random_nameTs"���7�7�6�>�>�&�*>�*>�"�E�F�FrAc��eZdZy)�;ClassPropertiesAndMethods.test_module_subclasses.<locals>.ANrGr�rAr@rwr6VrIrArwr�)rHr�r�rF�types�
ModuleType�strr�r�r��__subclasses__)r;r)rCr�r-r4rwr��
subclassesrr#s         @@r@�test_module_subclassesz0ClassPropertiesAndMethods.test_module_subclasses1s������
�#�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�r3r�s r@r5zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.__init__^r5rAc��|jSr�r3r�s r@r�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.getstate`r7rAc��||_yr�r3rs  r@r�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.setstatebr9rANr:r�rAr@r�r?]r;rAr�rrc���eZdZ�fd�Zy)�>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Dc�R��tj|��j|�yr�)r�r5r�s �r@r5zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.D.__init__is����
�
�d�#��
�
�4� rAN�r�r�r�r5�r�s�r@rHrDhs���
!rArH�world�hello)rIrHc��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__xs���4�8�8�:��&rAc��y)N�23r�r�s r@r�zEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.fooz���rAN)r�r�r�rMr�r�rAr@�NoderKws��
'�
rArQc��eZdZd�Zy)�AClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Fragc��y)N�42r�r�s r@r�zEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Frag.foo}rPrANr�r�rAr@�FragrS|���
rArV�r�)rZrFr�r�r�r7r�r8�__mro__rMr.)r;rCrHrNrQrVr�s      @r@�test_multiple_inheritancez3ClassPropertiesAndMethods.test_multiple_inheritance[s����	%��	%�
�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�)rAc�`�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��yrvr�r�s r@r�zBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.A.spam����3rANrhr�rAr@rwr]�s��&rArwc��eZdZd�Zd�Zy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.Bc��yr~r�r�s r@�boozAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.boo����#rAc��yr~r�r�s r@r�zBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.spam�r_rAN)r�r�r�rcr�r�rAr@rra�s��%�&rArc��eZdZd�Zy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.Cc��yr�r�r�s r@rczAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.C.boo�rdrAN)r�r�r�rcr�rAr@r�rg�s��%rAr�c��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.DNrGr�rAr@rHrj�r�rArHc��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.ENrGr�rAr@r�rl�r�rAr�c��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.FNrGr�rAr@rrn�r�rArz#expected MRO order disagreement (F)c��eZdZy)�=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.GNrGr�rAr@�Grp�r�rArqz#expected MRO order disagreement (G))rZrFr�rcrYr�r�)r;rwrr�rHr�rrqs        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>.ANrGr�rAr@rwru�r�rArwc��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.BNrGr�rAr@rrw�r�rArc��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.CNrGr�rAr@r�ry�r�rAr�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.XNrGr�rAr@r�r{�r�rAr�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.YNrGr�rAr@r�r}�r�rAr�c��eZdZy)�<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ZNrGr�rAr@r�r�r�rAr��rZrFrY)r;rwrr�r�r�r�s       r@�test_ex5_from_c3_switchz1ClassPropertiesAndMethods.test_ex5_from_c3_switch�s[�������������������!�A�a��������Q��1�a��A�v�$>�?rAc��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>.BoatNrGr�rAr@�Boatr��r�rAr�c��eZdZy)�<ClassPropertiesAndMethods.test_monotonicity.<locals>.DayBoatNrGr�rAr@�DayBoatr��r�rAr�c��eZdZy)�>ClassPropertiesAndMethods.test_monotonicity.<locals>.WheelBoatNrGr�rAr@�	WheelBoatr��r�rAr�c��eZdZy)�?ClassPropertiesAndMethods.test_monotonicity.<locals>.EngineLessNrGr�rAr@�
EngineLessr��r�rAr�c��eZdZy)�CClassPropertiesAndMethods.test_monotonicity.<locals>.SmallMultihullNrGr�rAr@�SmallMultihullr��r�rAr�c��eZdZy)�CClassPropertiesAndMethods.test_monotonicity.<locals>.PedalWheelBoatNrGr�rAr@�PedalWheelBoatr��r�rAr�c��eZdZy)�CClassPropertiesAndMethods.test_monotonicity.<locals>.SmallCatamaranNrGr�rAr@�SmallCatamaranr��r�rAr�c��eZdZy)�;ClassPropertiesAndMethods.test_monotonicity.<locals>.PedaloNrGr�rAr@�Pedalor��r�rAr�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�	BrAc
���Gd�dt�}Gd�dt�}Gd�dt�}Gd�d||�}Gd	�d
||�}Gd�d||�}|j|j||||||tf�y)
Nc��eZdZy)�AClassPropertiesAndMethods.test_consistency_with_epg.<locals>.PaneNrGr�rAr@�Paner��r�rAr�c��eZdZy)�KClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollingMixinNrGr�rAr@�ScrollingMixinr��r�rAr�c��eZdZy)�IClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditingMixinNrGr�rAr@�EditingMixinr��r�rAr�c��eZdZy)�KClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollablePaneNrGr�rAr@�ScrollablePaner��r�rAr�c��eZdZy)�IClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditablePaneNrGr�rAr@�EditablePaner��r�rAr�c��eZdZy)�SClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditableScrollablePaneNrGr�rAr@�EditableScrollablePaner��r�rAr�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�	7rAc	���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_detailr9r])�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>.ANrGr�rAr@rwr��r�rArwc��eZdZy)�:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.BNrGr�rAr@rr��r�rArc��eZdZy)�:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.CNrGr�rAr@r�r��r�rAr�zduplicate base class Ar�c��eZdZy)�CClassPropertiesAndMethods.test_mro_disagreement.<locals>.GridLayoutNrGr�rAr@�
GridLayoutr��r�rAr�c��eZdZy)�GClassPropertiesAndMethods.test_mro_disagreement.<locals>.HorizontalGridNrGr�rAr@�HorizontalGridr��r�rAr�c��eZdZy)�EClassPropertiesAndMethods.test_mro_disagreement.<locals>.VerticalGridNrGr�rAr@�VerticalGridr��r�rAr�c��eZdZy)�?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.HVGridNrGr�rAr@�HVGridr��r�rAr�c��eZdZy)�?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.VHGridNrGr�rAr@�VHGridr��r�rAr��ConfusedGrid)rZr�rH)r;�mro_err_msgr�rwrr�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�	;rAc�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 attributerJc��eZdZy)�:ClassPropertiesAndMethods.test_object_class.<locals>.CdictNrGr�rAr@�Cdictr�rIrAr�rg)rZrFrrH�assertNotEqualrr�r��AttributeErrorr�rJ)r;rCrUr�r�s     r@�test_object_classz+ClassPropertiesAndMethods.test_object_class�s����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>.SubTypergN�r�r�r�rCr�rAr@�SubTyper�s���ArAr�rPrCc��eZdZdZy)�hClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyIntr�N�r�r�r�r�r�rAr@�MyIntr�.����IrAr�rgc��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFloatr�Nr�r�rAr@�MyFloatr�3r�rAr���?c��eZdZdZy)�lClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyComplexr�Nr�r�rAr@�	MyComplexr�8r�rAr�y�?@c��eZdZdZy)�hClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyStrr�Nr�r�rAr@�MyStrr�=r�rAr�c��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyBytesr�Nr�r�rAr@�MyBytesr�Br�rAr��ac��eZdZdZy)�jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyTupler�Nr�r�rAr@�MyTupler�Gr�rAr�r�c��eZdZdZy)�nClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFrozenSetr�Nr�r�rAr@�MyFrozenSetr�Lr�rAr�)r7r8rr�assertFalser�r.rr�r/r�r9�bytes�tuple�	frozenset)
r;r�rPr�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�rAr@�C0r�Sr�rAr�rJr�c��eZdZdgZy)�0ClassPropertiesAndMethods.test_slots.<locals>.C1rCNr�r�rAr@�C1r�Y�	����IrArrCrgc��eZdZgd�Zy)�0ClassPropertiesAndMethods.test_slots.<locals>.C3rXNr�r�rAr@�C3re���'�IrArrUrYrhrlc�"�eZdZdZdgZd�Zd�Zy)�0ClassPropertiesAndMethods.test_slots.<locals>.C4zValidate name mangling�__ac��||_yr���_C4__a�r;rs  r@r5z9ClassPropertiesAndMethods.test_slots.<locals>.C4.__init__v�	�� ��rAc��|jSr�r
r�s r@r�z4ClassPropertiesAndMethods.test_slots.<locals>.C4.getx����x�x�rAN)r�r�r��__doc__r�r5r�r�rAr@�C4rss��(���I�
!�
 rArr�rr�z$Double underscored names not mangledc��eZdZdgZy��/ClassPropertiesAndMethods.test_slots.<locals>.CNr�r�rAr@r�r�s	��!�F�	rAr�z[None] slots not caughtc��eZdZdgZy)rzfoo barNr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	��&�K�	rAz['foo bar'] slots not caughtc��eZdZdgZy)rzfoobarNr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	��'�L�	rAz['foo\0bar'] slots not caughtc��eZdZdgZy)r�1Nr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	�� �E�	rAz['1'] slots not caughtc��eZdZdgZy)rr�Nr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s	���D�	rAz[''] slots not caughtc��eZdZgd�Zy)r)rC�a_b�_a�A0123456789ZNr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s��:�IrAc��eZdZdZy�r�abcNr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�����IrAc��eZdZdZyrr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�r!rAr�c���eZdZW�Zyrr�)�slotss�r@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s����IrArc��eZdZed�gZy)r�N)r�r�r��chrr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�s
�� ��X�J�	rAzhr(128)] slots not caughtc�&��eZdZdZ�fd�Z�fd�Zy)�5ClassPropertiesAndMethods.test_slots.<locals>.Countedrc�0���xjdz
c_yr�r��r;�Counteds �r@r5z>ClassPropertiesAndMethods.test_slots.<locals>.Counted.__init__��������1�$�rAc�0���xjdzc_yr�r�r+s �r@�__del__z=ClassPropertiesAndMethods.test_slots.<locals>.Counted.__del__�r-rAN)r�r�r�r�r5r/)r,s�r@r,r)�s����G�
%�
%rAr,c��eZdZgd�Zy)rrXNr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.C�rrAc��eZdZy)�/ClassPropertiesAndMethods.test_slots.<locals>.DNrGr�rAr@rHr2�rIrArHc��eZdZdgZy)�/ClassPropertiesAndMethods.test_slots.<locals>.E�eNr�r�rAr@r�r4�rrAr�c��eZdZddgZy)�/ClassPropertiesAndMethods.test_slots.<locals>.FrCrUNr�r�rAr@rr7�����c�
�IrAr�get_objectsc��eZdZd�Zy)�/ClassPropertiesAndMethods.test_slots.<locals>.Gc��y)NFr�r�s  r@�__eq__z6ClassPropertiesAndMethods.test_slots.<locals>.G.__eq__s�� rAN�r�r�r�r=r�rAr@rqr;�s��!rArqrc�&��eZdZddgZd�Z�fd�Zy)�/ClassPropertiesAndMethods.test_slots.<locals>.HrCrUc� �d|_d|_y�NrgrhrTr�s r@r5z8ClassPropertiesAndMethods.test_slots.<locals>.H.__init__s�������rAc�v���j|jd��j|jd�yrB)rFrCrU)�self_r;s �r@r/z7ClassPropertiesAndMethods.test_slots.<locals>.H.__del__s+���� � ����!�,�� � ����!�,rAN)r�r�r�r�r5r/r�s�r@�Hr@	s����c�
�I�
�
-rArE�stderrr�c��eZdZdZy��/ClassPropertiesAndMethods.test_slots.<locals>.XrCNr�r�rAr@r�rI����IrAr�c��eZdZdZyrHr�r�rAr@r�z/ClassPropertiesAndMethods.test_slots.<locals>.XrJrAz'X' object has no attribute 'a'c��eZdZy)�4ClassPropertiesAndMethods.test_slots.<locals>.SubStrNrGr�rAr@�SubStrrM"rIrArNc�"��eZdZW�d�fZy)rIr�Nr�)rNs�r@r�z/ClassPropertiesAndMethods.test_slots.<locals>.X$s�������IrA) rZrrCrFrUrYr��_ClassPropertiesAndMethods__ar�r�r�r r�rrHr9�UnicodeEncodeErrorr�r�
gc_collect�zr5r��gcrr9r��captured_output�getvaluer�assertRaisesRegexr�)r;r�r�rrrr�rYrHr�r�srq�g�orig_objectsr��new_objectsrE�hr�r,rNr$s`                   @@@r@�
test_slotsz$ClassPropertiesAndMethods.test_slotsQs����	��	��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>.DrJNr�r�rAr@rHr`,�	��#��IrArHrJ�__weakref__r�r�c��eZdZdgZy)�7ClassPropertiesAndMethods.test_slots_special.<locals>.WrbNr�r�rAr@�Wrd4�	��&��IrArez!shouldn't be allowed to set a.fooc��eZdZgZy)�8ClassPropertiesAndMethods.test_slots_special.<locals>.C1Nr�r�rAr@rrh@r�rArc��eZdZgZy)�8ClassPropertiesAndMethods.test_slots_special.<locals>.C2Nr�r�rAr@r�rjHr�rAr�)rZ�
assertHasAttrrr�rFrJr�r�)r;rHrCrerr�s      r@�test_slots_specialz,ClassPropertiesAndMethods.test_slots_special*s^��	%��	%�
�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�)rror�)r�r>rO�	namespace�attrrr;s     ��r@r�zCClassPropertiesAndMethods.test_slots_special2.<locals>.Meta.__new__Ss&����
�
�d�I�.��w��s�D�%��C�CrArq�rr;s@�r@�MetaroRs���
D�
DrArtc��eZdZd�Zy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.C1c��d|_yrf)rUr�s r@r5zBClassPropertiesAndMethods.test_slots_special2.<locals>.C1.__init__Xs	����rANrFr�rAr@rrvWrWrArc�$��eZdZdgZ�fd�Z�xZS)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.C2rrc�"��t�|��yr��ror5)r;rs �r@r5zBClassPropertiesAndMethods.test_slots_special2.<locals>.C2.__init__\s����� �"rA)r�r�r�r�r5rr�rs@r@r�ryZs���(�)�I�
#�
#rAr�rr)r=rrr�c��eZdZdZdgZy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.C3r�rrN)r�r�r�rrr�r�rAr@rr~fs�� "�
�,�-�	rArc��eZdZdgZy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q1r�Nr�r�rAr@�Q1r�js
��'�(�IrAr�r�����qc� �eZdZe�ZdgZy)�9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q2r�N)r�r�r�rZr�r�rAr@�Q2r�ts��%�x��+�,�	rAr�)rHr
rJr7�MemberDescriptorTyperFrUrrrrr�r�)	r;rtrr�rYrr�r�r�s	`        r@�test_slots_special2z-ClassPropertiesAndMethods.test_slots_special2Psj���	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>.MyABCrCNr�r�rAr@�MyABCr�|rJrAr�r<c��eZdZy)�BClassPropertiesAndMethods.test_slots_descriptor.<locals>.UnrelatedNrGr�rAr@�	Unrelatedr�rIrAr�rl)	r �ABCMetarZ�registerr
rr�rC�__set__)r;r r�r��us     r@�test_slots_descriptorz/ClassPropertiesAndMethods.test_slots_descriptorxsd��	�	�c�k�k�	�	��	�
���y�!��K�����a��'�	
���)�U�W�W�_�_�a��;rAc��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>.DNrGr�rAr@rHr��rIrArHc��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.ENrGr�rAr@r�r��rIrAr�c��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.FNrGr�rAr@rr��rIrArrgc��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.CNrGr�rAr@r�r��rIrAr��foobarrhc��yrfr�r�s r@�<lambda>z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>�s��rAr�c��y)N�C()r�r�s r@r�z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>�s��%rAr�c��yr"r�r�s r@r�z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>�s��rAr�r�c��|dk(ryt��Nr��r��r;r>s  r@�	mygetattrz:ClassPropertiesAndMethods.test_dynamics.<locals>.mygetattr�s���v�~�� � rAr�c�F�|dk(rt�tj|||�Sr�)r�rZr%)r;r>rs   r@�	mysetattrz:ClassPropertiesAndMethods.test_dynamics.<locals>.mysetattr�s$���v�~�$�$��%�%�d�D�%�8�8rAznot spamc��eZdZyr�rGr�rAr@rHz2ClassPropertiesAndMethods.test_dynamics.<locals>.D�rIrAc��eZdZy)�2ClassPropertiesAndMethods.test_dynamics.<locals>.INrGr�rAr@�Ir��rIrAr�rC�aarlr�c��eZdZy)�AClassPropertiesAndMethods.test_dynamics.<locals>.dynamicmetaclassNrGr�rAr@�dynamicmetaclassr��rIrAr�c��eZdZy)�:ClassPropertiesAndMethods.test_dynamics.<locals>.someclassNrGr�rAr@�	someclassr��rIrAr�r<)rZr�rFrr��methodr�r�rMr.�__getattr__r��newr%rr�rHr�)r;rHr�rr�rCr�r�rNr�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>.CNrGr�rAr@r�r��rrAr�z5inheritance from both list and dict should be illegalc��eZdZyr�rGr�rAr@r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�rrAz+inheritance from non-type should be illegalc��eZdZy)�6ClassPropertiesAndMethods.test_errors.<locals>.ClassicNrGr�rAr@�Classicr��rIrAr�c��eZdZyr�rGr�rAr@r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�rrAz,inheritance from CFunction should be illegalc��eZdZdZy�r�rgNr�r�rAr@r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�s���	rAz__slots__ = 1 should be illegalc��eZdZdgZyr�r�r�rAr@r�z0ClassPropertiesAndMethods.test_errors.<locals>.C�s	���C�	rAz!__slots__ = [1] should be illegalc��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.M1NrGr�rAr@rQr��rIrArQc��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.M2NrGr�rAr@rcr��rIrArcc��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.A1NrGr�rAr@�A1r��rIrAr�r<c��eZdZy)�1ClassPropertiesAndMethods.test_errors.<locals>.A2NrGr�rAr@�A2r��rIrAr�c��eZdZy)�0ClassPropertiesAndMethods.test_errors.<locals>.BNrGr�rAr@rr�rrArz5finding the most derived metaclass should have failed)r7r�r�r�rZrHr)r;r�r�rQrcr�r�rs        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��rCs r@r�z:ClassPropertiesAndMethods.test_classmethods.<locals>.C.foo����rAN�r�r�r�r�r��goor�rAr@r�r�
���!��c�"�CrAr�rgc��eZdZy)�6ClassPropertiesAndMethods.test_classmethods.<locals>.DNrGr�rAr@rHr�rIrArHc�
�||fS)�f docstringr�)r��args  r@�fz6ClassPropertiesAndMethods.test_classmethods.<locals>.fs����:�rArr��rz)classmethod shouldn't accept keyword argsr�r�)�__annotations__rr�r�r�r�)rZrFr�r�r�r_r.�__self__rorr�r�r�HAVE_DOCSTRINGSr�r�rJr�r)r;r�rYrHrNr��ffrM�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�r5�assertAlmostEqual)r;r�r��refs_beforer�s     r@�%test_refleaks_in_classmethod___init__z?ClassPropertiesAndMethods.test_refleaks_in_classmethod___init__Fs`��"�0�0��6H�I��
��
��&�(���s��A��K�K�������/�1�K�?��"��MrAr�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)Nrrkr �{�	classmethc��eZdZy)�AClassPropertiesAndMethods.test_classmethods_in_c.<locals>.SubSpamNrGr�rAr@�SubSpamr�cr�rAr�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�rFrJrr�r9�	exceptionr7r_)r;r�rCrNr�r�d1�spam_cm�x2r�d2r�r��expected_errmsgs              r@�test_classmethods_in_cz0ClassPropertiesAndMethods.test_classmethods_in_cOs���	!���
�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�rAN)r�r�r�r�rbr�r�rAr@r�r�s��!��s�#�CrAr�rg)rgc��eZdZy)�7ClassPropertiesAndMethods.test_staticmethods.<locals>.DNrGr�rAr@rHr�rIrArHrr�)r�rr�)rZrFr�r�rbrJr�r)r;r�rYrHrN�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�#�&rAc���tjtd�}td�}|�}t	d�D]}|jd��|j
|�|z
dd��yr�)rr�r�rbr�r5r�)r;r�rr�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�?��"��MrAc�x�ddl}d}ddi}|jj|i|��\}}}|j|d�|j||�|j||�|j�j|i|��\}}}|j|d�|j||�|j||�y)Nrrkr r�)r�r��
staticmethrF)r;r�rCrNr�rr�r�s        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�rAc�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�rANr�r�rAr@r�r�r�rAr�rgc��eZdZy)�1ClassPropertiesAndMethods.test_classic.<locals>.DNrGr�rAr@rHr�rIrArHc�(��eZdZW�jZy)�1ClassPropertiesAndMethods.test_classic.<locals>.ENr�rGs�r@r�r������%�%�CrAr��<bound method )rFr�r��__func__rr�r_r])r;rYrHrNr�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�NrAc�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@r5zNClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__init__�s��!$�D�J�!$�D�J�$*�D�MrAc�$�|j|�Sr�)r)r;�objrHs   r@r_zMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__get__�s���:�:�c�?�*rAc�&�|j||�Sr�)r �r;r$rs   r@r�zMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__set__�s���:�:�c�5�1�1rAc�$�|j|�Sr�)r!�r;r$s  r@�
__delete__zPClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__delete__�s���=�=��-�-rAr�r�)r�r�r�r5r_r�r)r�rAr@�computed_attributer�s��+�+�2�.rAr*c��d|_yr���_C__xr�s r@r5z;ClassPropertiesAndMethods.test_compattr.<locals>.C.__init__��	����rAc�2�|j}|dz|_|Sr�r,r�s  r@�__get_xz:ClassPropertiesAndMethods.test_compattr.<locals>.C.__get_x�s���H�H���Q�3����rAc��||_yr�r,r�s  r@�__set_xz:ClassPropertiesAndMethods.test_compattr.<locals>.C.__set_x�r.rAc��|`yr�r,r�s r@�
__delete_xz=ClassPropertiesAndMethods.test_compattr.<locals>.C.__delete_x�����HrAN)
r�r�r�rZr*r5�	_C__get_x�	_C__set_x�_C__delete_xr�r�rAr@r�r�s0��

.�V�

.�
�
�
�
�"�7�G�Z�@�ArAr�rrgr�r�)rZrFr�rr-s   r@�
test_compattrz'ClassPropertiesAndMethods.test_compattr�s���	A��	A�.
�C��������a� �������a� ����������b�!�������b�!�
�C����a��%rAc�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�)r7r�r��r�r;s  r@r�z:ClassPropertiesAndMethods.test_newslots.<locals>.C.__new__�s���|�|�C�(������rAc�,�|jdz|_y�Nrh�r�r�s r@r5z;ClassPropertiesAndMethods.test_newslots.<locals>.C.__init__�s���8�8�a�<��rAN�r�r�r�r�r5r�rAr@r�r=�s��
�
(rAr�rlc��eZdZy)�2ClassPropertiesAndMethods.test_newslots.<locals>.DNrGr�rAr@rHrE�rIrArH)r7rFr�r)r;r�rCrHrUs     r@�
test_newslotsz'ClassPropertiesAndMethods.test_newslots�sz��	(��	(�
�C���������"�������a�(�	��	�
�C���������"�������a�(rAc���|jttj�|jttjd�|jttjt�|jttjt�Gd�dt�}|jt|�Gd�dt�}|jt|�y)Nr�c�$�eZdZejZy��1ClassPropertiesAndMethods.test_bad_new.<locals>.CN)r�r�r�r7r�r�rAr@r�rJs���l�l�GrAr�c�$�eZdZejZyrI)r�r�r�rZr�r�rAr@r�z1ClassPropertiesAndMethods.test_bad_new.<locals>.Cs���n�n�GrA)rr�rZr�r7r�s  r@�test_bad_newz&ClassPropertiesAndMethods.test_bad_new�s������)�V�^�^�4����)�V�^�^�R�8����)�T�\�\�6�:����)�V�^�^�T�:�	#��	#����)�Q�'�	%��	%����)�Q�'rAc�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>.ANrGr�rAr@rwrO
rIrArwr�c��eZdZd�Zy)rOc��||_yr�rB�r;r�s  r@r5z=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__�	����rANrFr�rAr@rwz4ClassPropertiesAndMethods.test_object_new.<locals>.A���
rArlc��eZdZd�Zy)rOc�,�tj|�Sr��rZr��r�r�s  r@r�z<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__����~�~�c�*�*rANrPr�rAr@rwz4ClassPropertiesAndMethods.test_object_new.<locals>.As��
+rAc��eZdZd�Zd�Zy)rOc�,�tj|�Sr�rWrXs  r@r�z<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__"rYrAc��||_yr�rBrRs  r@r5z=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__$rSrANrCr�rAr@rwz4ClassPropertiesAndMethods.test_object_new.<locals>.A!s��
+�
rA)rZr�rr�r5�r;rws  r@�test_object_newz)ClassPropertiesAndMethods.test_object_new	s`��	��	����q�����)�V�^�^�Q��:����������)�V�_�_�a�c�1�=�	��	�	���q�����q�!������!������)�V�_�_�a��d�A�>�	+��	+�	���q�����)�V�^�^�Q��:�����!�������!��a� �	��	�
	���q�����)�V�^�^�Q��:�����!������)�V�_�_�a��d�A�>rAc��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__.s��$�$rANrPr�rAr@rwra-���
%rArwc�*�eZdZejZd�Zy)�=ClassPropertiesAndMethods.test_restored_object_new.<locals>.Bc��||_yr�rBrRs  r@r5zFClassPropertiesAndMethods.test_restored_object_new.<locals>.B.__init__3rSrAN)r�r�r�rZr�r5r�rAr@rrg1s���n�n�G�
rAr�errorrl)rZrrd�warnings�catch_warnings�simplefilter�DeprecationWarningrFr�rr�)r;rwrrUs    r@�test_restored_object_newz2ClassPropertiesAndMethods.test_restored_object_new+s��	%��	%�	
���.�!�,�	��	��
$�
$�
&��!�!�'�+=�>��!��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��yrvr�r�s r@r�z2ClassPropertiesAndMethods.test_altmro.<locals>.A.fF���rAN�r�r�r�r�r�rAr@rwrqEr�rArwc��eZdZy)�0ClassPropertiesAndMethods.test_altmro.<locals>.BNrGr�rAr@rrvGrIrArc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_altmro.<locals>.Cc��yr�r�r�s r@r�z2ClassPropertiesAndMethods.test_altmro.<locals>.C.fJrsrANrtr�rAr@r�rxIr�rAr�c��eZdZy)�0ClassPropertiesAndMethods.test_altmro.<locals>.DNrGr�rAr@rHr{KrIrArHc��eZdZd�Zy)�?ClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaTypec�P�tj|�}|j�|Sr�)rH�mro�reverse)r��Ls  r@rzCClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaType.mroXs���H�H�S�M���	�	���rAN�r�r�r�rr�rAr@�PerverseMetaTyper}Ws��
rAr�c��eZdZy��0ClassPropertiesAndMethods.test_altmro.<locals>.XNrGr�rAr@r�r�\rIrAr�r<c��eZdZd�Zy)�9ClassPropertiesAndMethods.test_altmro.<locals>._metaclassc��|ttgSr�)r�rZr�s r@rz=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mrocs�� �$��/�/rANr�r�rAr@rCr�bs��0rArCc��eZdZyr�rGr�rAr@r�z0ClassPropertiesAndMethods.test_altmro.<locals>.XerrAr�r�zdevious mro() return not caughtc��eZdZd�Zy)r�c��dgSr�r�r�s r@rz=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mrovs	���3�JrANr�r�rAr@rCz9ClassPropertiesAndMethods.test_altmro.<locals>._metaclassus��rAc��eZdZyr�rGr�rAr@r�z0ClassPropertiesAndMethods.test_altmro.<locals>.XxrrAz!non-class mro() return not caughtc��eZdZd�Zy)r�c��yr�r�r�s r@rz=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mro�s��rANr�r�rAr@rCz9ClassPropertiesAndMethods.test_altmro.<locals>._metaclass�s��rAc��eZdZyr�rGr�rAr@r�z0ClassPropertiesAndMethods.test_altmro.<locals>.X�rrAz$non-sequence mro() return not caught)	rZrFrrYr�rHr�r�r�)	r;rwrr�rHr�r�rCr�s	         r@�test_altmroz%ClassPropertiesAndMethods.test_altmroCsa��	$��	$�	��	�	$��	$�	��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�rAr@rr��s��JrArc�:��eZdZd�Z�fd�Z�fd�Zd�Zd�Zd�Zy)�5ClassPropertiesAndMethods.test_overloading.<locals>.Cc� �|dk(rd|fSt�)Nr�rIr�r�s  r@r�zAClassPropertiesAndMethods.test_overloading.<locals>.C.__getattr__�s���5�=�%�t�,�,�(�(rAc�H��|dk(r
||f|_y�j|||�S�Nr�)r^r%)r;r>rrs   �r@r%zAClassPropertiesAndMethods.test_overloading.<locals>.C.__setattr__�s(����5�=�$(�%�=�D�L��=�=��t�U�;�;rAc�B��|dk(r||_y�j||�Sr�)r'r()r;r>rs  �r@r(zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delattr__�s"����5�=�#'�D�L��=�=��t�4�4rAc�
�d|fS)N�getitemr�rs  r@rqzAClassPropertiesAndMethods.test_overloading.<locals>.C.__getitem__�s
��!�3�'�'rAc��||f|_yr�)�setitem)r;rrs   r@rzAClassPropertiesAndMethods.test_overloading.<locals>.C.__setitem__�s
�� #�U�|��rAc��||_yr�)�delitemrs  r@�__delitem__zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delitem__�s	��"��rAN)	r�r�r�r�r%r(rqrr�)rs�r@r�r��s!���
)�

<�

5�
(�
,�
#rAr�r*r�)r�r�r�)r�r��)r�r�rrr�)rZrFr�r^r'r�r�rZ)r;r�rCrs   @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�\�3rAc	�
�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�Nrm)r.�lstrip�r;rrs  r@r�zRClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.Numbers.__getattr__�s���4�;�;�s�+�,�,rAN�r�r�r�r�r�rAr@�Numbersr��s��
-rAr��, 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�)r/r�r^rFr7)r;r��attrs�coder�r�rms       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�rAc	�~���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@r5z:ClassPropertiesAndMethods.test_methods.<locals>.C.__init__��	����rAc��|jSr�r�r�s r@r�z5ClassPropertiesAndMethods.test_methods.<locals>.C.foo�s���v�v�
rAN)r�r�r�r5r�r�rAr@r�r��s��
�
rAr�rgc�B��eZdZW�jZW�jZy)�1ClassPropertiesAndMethods.test_methods.<locals>.DN)r�r�r�r�rcr�)r��c1s��r@rHr��s����%�%�C��&�&�CrArHrhc�(��eZdZW�jZy)�1ClassPropertiesAndMethods.test_methods.<locals>.ENr�rGs�r@r�r��rrAr�r)
rZrFr�rcr�rrr�r_r])r;rHr�r�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�OrAz)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�rFr�r<r_)r;�set_addr�r�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_context�s�������s��c��|Sr�r�r�s r@�idenzBClassPropertiesAndMethods.test_special_method_lookup.<locals>.iden�s���KrAc��y)Nshellor�r�s r@rIzCClassPropertiesAndMethods.test_special_method_lookup.<locals>.hello�s��rAc��gSr�r�r�s r@�	empty_seqzGClassPropertiesAndMethods.test_special_method_lookup.<locals>.empty_seqs���IrAc��yr�r�r�s r@�zerozBClassPropertiesAndMethods.test_special_method_lookup.<locals>.zeros��rAc��y)N��?r�r�s r@�complex_numzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.complex_nums��rAc��t�r�)�
StopIterationr�s r@r%zBClassPropertiesAndMethods.test_special_method_lookup.<locals>.stops���rAc��y)NTr�)r;�things  r@�return_truezIClassPropertiesAndMethods.test_special_method_lookup.<locals>.return_trues��rAc�"�tt|�Sr�)r#r.�r$s r@�
do_isinstancezKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_isinstance
����c�3�'�'rAc�"�tt|�Sr�)rr.r�s r@�
do_issubclasszKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_issubclassr�rAc�n��Gd�d|jt�}�j|�dd�y)Nc��eZdZy)�^ClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missing.<locals>.DictSubNrGr�rAr@�DictSubr�rrAr��hiro)rr�rF)�checkerr�r;s  �r@�do_dict_missingzMClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missings-���
�'�+�+�T�
����W�Y�t�_�a�0rAc�*���j|d�y)Nr�ro�rF)rDrr;s  �r@�some_numberzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.some_numbers������S�$�'�rAc��yr�r��r<s r@�swallowzEClassPropertiesAndMethods.test_special_method_lookup.<locals>.swallows��DrAc��y�NrIr�)r;�specs  r@�format_implzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.format_impls��rA�	__bytes__�__reversed__�__length_hint__)r��__next__�
__sizeof__�__instancecheck__�__missing__r|�__subclasscheck__�rK�	__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;rr�tests   r@r�zQClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattr__3s���	�	�7�>�>�t�D�ErAc�x��|�vr |jdj|��tj||�S)Nz __getattribute__ called with {0})r�rrZr!)r;rrr	�oks   �r@r!zVClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattribute__5s5����r�>��I�I�@�G�G��M�N��.�.�t�T�:�:rAN�r�r�r�r�r!)rr;s��r@�Checkerr2s���-1�
F�26�
;rAr
c���eZdZd�Z�fd�Zy)�JClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescrc��||_yr�)�impl)r;rs  r@r5zSClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__init__:�	�� ��	rAc�^���jd�|jj||�Sr�)r�rr_)r;r$�owner�records   �r@r_zRClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__get__<s&����
�
�a� ��y�y�(�(��e�4�4rAN)r�r�r�r5r_)rs�r@�SpecialDescrr9s
���
!�
5rArc��eZdZy)�IClassPropertiesAndMethods.test_special_method_lookup.<locals>.MyExceptionNrGr�rAr@�MyExceptionr?rIrArc���eZdZ�fd�Zy)�FClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescrc�����r�r�)r;r$rrs   �r@r_zNClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescr.__get__Bs	���!�!rAN�r�r�r�r_)rs�r@�ErrDescrrA����
"rArc��eZdZy��?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XNrGr�rAr@r�r"FrrAr�c��eZdZyr!rGr�rAr@r�z?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XNrrArgc��eZdZyr!rGr�rAr@r�z?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XVrrAr�)r�r��reversedr7r��	getsizeofr�r�math�floor�trunc�ceil�dir�roundrZ�	Exceptionr8r^rFr)r;r�r�rIr�r�r�r%r�r�r�r�r�r�r��specialsr
rrr>�runner�	meth_impl�envr�rrr$rrrs`                         @@@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�-19rAc�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@rqz>ClassPropertiesAndMethods.test_specials.<locals>.C.__getitem__c�����;�B�;�q��;� � �j� rANr'r�rAr@r�r5b���
!rAr�zC object at rr�rc��eZdZd�Zy)�2ClassPropertiesAndMethods.test_specials.<locals>.Dc�6�d|cxkrdkr	|St�t�r7r8r&s  r@rqz>ClassPropertiesAndMethods.test_specials.<locals>.D.__getitem__zr:rANr'r�rAr@rHr=yr;rArHz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@r5z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__init__�r�rAc��|jSr�r�r�s r@r�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__bool__�s��#�v�v�:�~�%rAc�,�t|j�Sr�)�hashr�r�s r@�__hash__z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__hash__�s���D�F�F�|�#rAc� �|j|k(Sr�r�r�s  r@r=z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__eq__�����v�v���&rAc� �|j|k7Sr�r�r�s  r@�__ne__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ne__�rGrAc� �|j|k\Sr�r�r�s  r@�__ge__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ge__�rGrAc� �|j|kDSr�r�r�s  r@�__gt__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__gt__�����v�v��~�%rAc� �|j|kSr�r�r�s  r@�__le__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__le__�rGrAc� �|j|kSr�r�r�s  r@�__lt__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__lt__�rNrAc� �d|jzS)NzProxy:%sr�r�s r@r�z>ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__str__�s��!�D�F�F�*�*rAc� �d|jzS)Nz	Proxy(%r)r�r�s r@r�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__repr__�s��"�T�V�V�+�+rAc��||jvSr�r�rs  r@rnzCClassPropertiesAndMethods.test_specials.<locals>.Proxy.__contains__�s�������&rAN)r�r�r�r5r�rEr=rIrKrMrPrRr�r�rnr�rAr@�Proxyr@�s>��
�
&�
$�
'�
'�
'�
&�
'�
&�
+�
,�
'rArVrgzProxy:0zProxy(0))rZr�r��idrDrFr�assertGreaterEqualr9�findr��assertNotInr�r)
r;r�r��c2r�rHr�r�rV�p0�p1�p_1�p10s
             r@�
test_specialsz'ClassPropertiesAndMethods.test_specials]si��
	!��	!��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�!rAc��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>.CNrGr�rAr@r�rc�rIrAr�c��eZdZdgZy)�7ClassPropertiesAndMethods.test_weakrefs.<locals>.NoWeakr�Nr�r�rAr@�NoWeakre�s	����IrArfz!weakref.ref(no) should be illegalzweak referencec��eZdZddgZy)�5ClassPropertiesAndMethods.test_weakrefs.<locals>.Weakr�rbNr�r�rAr@�Weakrh�s���
�.�IrAri)
�weakrefrZ�refrFrrRr�r�rr9)
r;rjr�rY�rrf�nor�ri�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�rrAc��||_yr�r,rs  r@�setxz9ClassPropertiesAndMethods.test_properties.<locals>.C.setx�r
rAc��|`yr�r,r�s r@�delxz9ClassPropertiesAndMethods.test_properties.<locals>.C.delx�r5rA�I'm the x property.��docN)r�r�r�rtrvrxr�r�r�rAr@r�rr�s"��
 �
!�
���t�T�/D�E�ArAr�r�r�r-r�r�fget�fset�fdelryrtrvrx)r|r}r~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�)rXs r@r�z=ClassPropertiesAndMethods.test_properties.<locals>.D.<lambda>	s��Q�q�SrAN)r�r�r�r�rqr�rAr@rHr�	s��"�=�1�KrArHz,expected ZeroDivisionError from bad property)rZrr�rFr-r�r_r)rJr
r�r+rrrr|r}r~r^r�r�r9rY�ZeroDivisionError)
r;r�rC�rawr�rrr�rHrNr�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�7K8rhz)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��rAc��y)z
setter methodNr�)rDrs  r@�setterzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.setter$	���rAr�)r}N)
r�r�r�r�r�r��proprFr�prop2r�s�r@r�r� 	sK���
�
��F�#�D����T�\�\�?�;��&�)�E����U�]�]�D�1rAr��rZ)r;r�s` r@�test_properties_doc_attribz4ClassPropertiesAndMethods.test_properties_doc_attrib	s���
	2��
	2rAc�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�4	s����Y�:�:�;�rAr�)r�rZ�ImportError)r;r�r�s  @r@�test_testcapi_no_segfaultz3ClassPropertiesAndMethods.test_testcapi_no_segfault,	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>.CrIrzc��|jSr���_foor�s r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foo:	����y�y� rAc�$�t|�|_yr��r,r�rs  r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foo=	�
����J��	rAc��|`yr�r�r�s r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foo@	����IrAN)r�r�r�r�r�r�r��deleterr�rAr@r�r�8	sN���w�'�C�
�Z�Z�
!��
!�
�Z�Z�
'��
'�
�[�[�
��
rAr�rIr�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.fooO	s����	��%����s��	�N)r�r�r�r�r�rGs�r@rHr�N	s���
�U�U�]�]�
��
rArHrc��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.foo\	r�rAc��t�r�)�RuntimeErrorrs  r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.foo_	s��"�"rAc�$�t|�|_yr�r�rs  r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.foob	r�rANc��|`yr�r�rs  r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.fooe	r�rAr�)r�r�r�r�r�r�r�r�rAr@r�r�[	sV��
�
!��
!�
�Z�Z�
#��
#�
�Z�Z�
'��
'�
�[�[�
��
rAr�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.fooo	r�rAc�&�td|�|_yr�)�maxr�rs  r@r�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.F.foor	s����5�M��	rAN)r�r�r�r�r�r�)r�s�r@rr�n	s3���
�U�U�]�]�
��
�
�Z�Z�
*��
*rAr���r)rZrFr�rrrkr�)	r;rYrHrNr5rr�r�r�s	       @@r@�test_properties_plusz.ClassPropertiesAndMethods.test_properties_plus7	sH���
	��
	�
�C�����������0����a��'�������1�f�%��������$��������#�
�E����a��(����a��'�	��	�
�C������������#�
�E�
�E�	��	�
�C������������#�
�E�	*��	*�
�C������������"�
�ErAc���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)#NrhrU)rgrCrg)�one�twor�)r�)r�rh)r�)r�r�)r�r+ry�0�rzno TypeError from dict(%r)c��eZdZdddd�Zy)�AClassPropertiesAndMethods.test_dict_constructors.<locals>.Mappingrhror�)rgrlrCN)r�r�r�r�r�rAr@�Mappingr��	s���1�"�%�DrAr�z*no TypeError from dict(incomplete mapping)c�H�t|jj��Sr�)r7r�r�r�s r@r�zBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>�	s��D������)9�$:rAc� �|j|Sr�)r�r&s  r@r�zBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>�	s��d�i�i��lrAc��eZdZd�Zd�Zy)�JClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntryc� �||_||_yr�)�first�last)r;r�r�s   r@r5zSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__init__�	s��"��
� ��	rAc�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�4rAN)r�r�r�r5r�r�rAr@�AddressBookEntryr��	s��
!�
5rAr��Tim�Warsaw�Barry�Peters)r�r�ror�)�tooshort)�too�longzby 1zno ValueError from dict(%r)r�)
r�rFr7r8r�r�r��
ValueErrorrr�rq�zipr�)r;rN�badargr�r�r��bads       r@�test_dict_constructorsz0ClassPropertiesAndMethods.test_dict_constructorsz	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;rhy@g@�2�2)rhc�P�|D�cgc]}|jd�r�|��c}Scc}wr�)r])�stringsrXs  r@�interestingz7ClassPropertiesAndMethods.test_dir.<locals>.interesting�	s%��&�@�w�!�a�l�l�3�.?�A�w�@�@��@s�#�#c��eZdZdZd�Zy)�-ClassPropertiesAndMethods.test_dir.<locals>.Crgc��yr�r�r�s r@�Cmethodz5ClassPropertiesAndMethods.test_dir.<locals>.C.Cmethod�	���trAN)r�r�r��Cdatar�r�rAr@r�r��	�
���E�#rAr�r�r�c��yr�r�r�s r@r�z4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>�	���rA�cdata�cmethodc��eZdZdZd�Zy)�-ClassPropertiesAndMethods.test_dir.<locals>.Argc��yr�r�r�s r@�Amethodz5ClassPropertiesAndMethods.test_dir.<locals>.A.Amethod�	r�rAN)r�r�r��Adatar�r�rAr@rwr��	r�rArwr�r�r�c��y)Nrlr�r�s r@r�z4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>�	r�rA�adata�amethodc��eZdZy)�-ClassPropertiesAndMethods.test_dir.<locals>.MNrGr�rAr@�Mr��	rIrAr�rPrg)r�r�__package__�
__loader__�__spec__rCrUc�"�eZdZd�Zee�Zy)�.ClassPropertiesAndMethods.test_dir.<locals>.M2c��y)N�Not a dict!r�r�s r@�getdictz6ClassPropertiesAndMethods.test_dir.<locals>.M2.getdict
s��$rAN)r�r�r�r�r�rJr�rAr@rcr�
s��
%���(�HrArc�m2r�c�4��eZdZd�Zd�Z�fd�Zd�Z�fd�Zy)�3ClassPropertiesAndMethods.test_dir.<locals>.Wrapperc��||_yr���
_Wrapper__objr(s  r@r5z<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__init__
�	�� ��
rAc�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�7rAc�.���|j|�Sr�r�)r;r�Wrappers  �r@rqz?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getitem__
s����t�z�z�#��/�/rAc�,�t|j�Sr�)rrr�s r@ryz;ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__len__
s���4�:�:��&rAc�<���t|j|��Sr�)rIr)r;r>rs  �r@r�z?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getattr__
s����w�t�z�z�4�8�9�9rAN)r�r�r�r5r�rqryr��rs�r@rr�
s���
!�
8�
0�
'�
:rArc�(��eZdZ�fd�Zee�Zy)r�c�&���t|��Sr�)rH)r;rs �r@�
__getclassz8ClassPropertiesAndMethods.test_dir.<locals>.C.__getclass
s����t�D�z�*�*rAN)r�r�r��_C__getclassr�rrs�r@r�z-ClassPropertiesAndMethods.test_dir.<locals>.C
s���
+� ��,�IrA)rFr+rH�test_dirrZr�r�r�r�r�rUrCrJrr��Ellipsis)r;r�r�r�r��cstuffrYrw�astuffrCr��	minstance�default_attributesr��namesrc�
m2instancers                 @r@rz"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;rCs  r@rMz5ClassPropertiesAndMethods.test_supers.<locals>.A.meth)
s����{�"rANryr�rAr@rwr(
���
#rArwrgzA(1)c�(���eZdZ��fd�Zd�Z�xZS)�0ClassPropertiesAndMethods.test_supers.<locals>.Bc�(��t�|�|_yr�)ror�)r;rrs ��r@r5z9ClassPropertiesAndMethods.test_supers.<locals>.B.__init__/
s���$�Q��~��rAc�D�d|z|jj|�zS)NzB(%r)r�rs  r@rMz5ClassPropertiesAndMethods.test_supers.<locals>.B.meth1
� ����{�T�\�\�%6�%6�q�%9�9�9rA)r�r�r�r5rMrr)rrs@�r@rr.
s
���
.�
:rArrhzB(2)A(2)c��eZdZd�Zy)�0ClassPropertiesAndMethods.test_supers.<locals>.Cc�D�d|z|jj|�zS)NzC(%r)r�rs  r@rMz5ClassPropertiesAndMethods.test_supers.<locals>.C.meth7
rrANryr�rAr@r�r 6
s��
:rAr�rlzC(3)A(3)c�"���eZdZ��fd�Z�xZS)�0ClassPropertiesAndMethods.test_supers.<locals>.Dc�.��d|zt�|�|�zS)NzD(%r))rorM)r;rCrHrs  ��r@rMz5ClassPropertiesAndMethods.test_supers.<locals>.D.meth>
s�����{�U�1�d�%8��%;�;�;rA)r�r�r�rMrr)rrHs@�r@rHr#=
�
���
<�
<rArHrozD(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@r5z?ClassPropertiesAndMethods.test_supers.<locals>.mysuper.__init__F
s����W�d�4�d�;�;rA)r�r�r�r5rr)rr)s@�r@r)r'E
r%rAr)c���eZdZ��fd�Zy)�0ClassPropertiesAndMethods.test_supers.<locals>.Ec�@��d|z��|�j|�zS)NzE(%r))rM)r;rCr�r)s  ��r@rMz5ClassPropertiesAndMethods.test_supers.<locals>.E.methJ
s$�����{�W�Q��%5�%:�%:�1�%=�=�=rANry)r�r)s��r@r�r+I
s���
>rAr�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�rM)r;rCrXs   r@rMz5ClassPropertiesAndMethods.test_supers.<locals>.F.methP
s-���L�L��&'����)=�)=�>������J�JrANryr�rAr@rr.O
s��
KrArr�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��yrfr�r�s r@rtz:ClassPropertiesAndMethods.test_supers.<locals>.DDbase.getxy
s��2rAN�r�r�r�rtr�r�r�rAr@�DDbaser3x
s��%����ArAr6c�"�eZdZd�Zee�Zy)�4ClassPropertiesAndMethods.test_supers.<locals>.DDsubc��yr�r�r�s r@rtz9ClassPropertiesAndMethods.test_supers.<locals>.DDsub.getx}
s��7rANr5r�rAr@�DDsubr8|
s��*����ArAr:rIc��eZdZed��Zy)�3ClassPropertiesAndMethods.test_supers.<locals>.Basec��yr�r�r�s r@r�z<ClassPropertiesAndMethods.test_supers.<locals>.Base.<lambda>�
s��%rAN)r�r�r�r��aPropr�rAr@�Baser<�
s
���/�0�ErAr?c�,���eZdZe��fd��Z�xZS)�2ClassPropertiesAndMethods.test_supers.<locals>.Subc���t�|�Sr�)ror>)�klass�Subrs ��r@r	z7ClassPropertiesAndMethods.test_supers.<locals>.Sub.test�
s����S��-�-rA)r�r�r�r�r	rr)rrDs@�r@rDrA�
s���
�
.��
.rArDr�)
rZrFrMror�r1r�r�r_r�r	r>r)r;rwr�rr6r:�ddr?rrHr�rDr)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� rAc�<���tj||��Sr�)r.rj)r;r��hexints  �r@rjzHClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__add__�
s����c�k�k�$��6�7�7rAN)r�r�r�r�rj)rNs�r@rNrI�
s
���
!�
8rArN��	�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__�
rLrAc�@��|jt�|�|��Sr�)rrorj)r;r�r�octlongs  ��r@rjzIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__add__�
s����~�~�e�G�T�&B�5�&I�J�JrA)r�r�r�r�r�rjr�rr)rrXs@�r@rXrT�
s����I�
!�
K��HrArXrlr��0o10i��0o5675rgr�c��eZdZy)�CClassPropertiesAndMethods.test_basic_inheritance.<locals>.longcloneNrGr�rAr@�	longcloner\�
rIrAr]c� �eZdZdgZdd�Zd�Zy)�CClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloatr�c�$�t|�|_yr�)r.r�)r;rr�s   r@r5zLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__init__�
s
����I��	rAc�$�d|j|fzS)Nr�r�r�s r@r�zLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__repr__�
s������D� 1�1�1rAN)r�r�)r�r�r�r�r5r�r�rAr@�	precfloatr_�
s����I�
&�
2rArbg�������?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�(>�>�>rAN)r�r�r�r�r�rAr@�
madcomplexrd�
s��
?rArg���roz4j-3c��eZdZdZd�Zy)�BClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtupleNc��|j�|jSt|�}|j�|j|�|_|jSr�)�_revr7r�r�r;r�s  r@�revzFClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtuple.revsB���9�9�(��9�9�$���J���	�	�� �N�N�1�-��	��y�y� rA�r�r�r�rlrnr�rAr@�madtuplerj����D�
!rArp)
rgrhrlror�r�rO�rPr)
rrPrrrOr�r�rorlrhrgi)rgrhrlror�r�rhc��eZdZdZd�Zy)�CClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstringNc���|j�|jSt|�}|j�|jdj	|��|_|jS�Nr��rlr7r�rr/rms  r@rnzGClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstring.rev'�J���9�9�(��9�9�$���J���	�	�� �N�N�2�7�7�1�:�6��	��y�y� rAror�rAr@�	madstringrt%rqrAry�abcdefghijklmnopqrstuvwxyz�zyxwvutsrqponmlkjihgfedcba�r��12345zr�c��eZdZdZd�Zy)�DClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicodeNc���|j�|jSt|�}|j�|jdj	|��|_|jSrvrwrms  r@rnzHClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicode.revgrxrAror�rAr@�
madunicodererqrAr��ABCDEF�FEDCBA�xyc��eZdZy)�AClassPropertiesAndMethods.test_basic_inheritance.<locals>.sublistNrGr�rAr@�sublistr��rIrAr�rIr������rr�)!r.rFr�rrrDr9r,rJr/r�r�rnr�r/�mapr'�stripr��rstrip�	translate�replace�ljustr�rjust�center�lower�upper�
capitalize�titler7r�r,)r;rCr]rbrg�baserpr�rOr�r�ryrX�identitytabr�r�rNrXs                @@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��/rAc��|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 argumentrgr�rhr�i�rfi�r��500�abc�strict)rZ�errorsr rl)�sequencer()�bogus_keyword_argz4expected TypeError from bogus keyword argument to %r)rWr�r.r/�boolrFr�r9r�r�r7r�)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��	canonicalrD�hashcoders  r@r5zOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__init__s��!&������ $�T�^�^� 4��
rAc�^��t|��s�|�}|j|jk(Sr�)r#r�)r;r��cistrs  �r@r=zMClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__eq__	s)���!�%��/�!�%�L�E��~�~����8�8rAc��|jSr�)r�r�s r@rEzOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__hash__s���}�}�$rAN)r�r�r�rr5r=rE)r�s�r@r�r��s���
�

5�
9�

%rAr��ABCr �aBcr�rgr�rh�tHreerl�tWo�THrEE�ONe�thrEE)r9rFrr�)r;rNr�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�~�.��2rAc��
�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>.classicNrGr�rAr@�classicr�rIrAr�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.rrs  r@r5zFClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__init__#�
��!$�U��D�JrAc���t|��r|j|jk(St|t�st|t�r|j|k(StSr��r#rr.r��r;r�r�s  �r@r=zDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__eq__%�H���!�%��+�#�z�z�U�[�[�8�8�!�%��-��E�3�1G�#�z�z�U�2�2�)�)rAc���t|��r|j|jk7St|t�st|t�r|j|k7StSr�r�r�s  �r@rIzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ne__+r�rAc���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r@rRzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__lt__1�H���!�%��+�#�z�z�E�K�K�7�7�!�%��-��E�3�1G�#�z�z�E�1�1�)�)rAc���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r@rPzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__le__7r�rAc���t|��r|j|jkDSt|t�st|t�r|j|kDStSr�r�r�s  �r@rMzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__gt__=r�rAc���t|��r|j|jk\St|t�st|t�r|j|k\StSr�r�r�s  �r@rKzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ge__Cr�rAN)
r�r�r�r5r=rIrRrPrMrKrGs�r@r�r�"s&���,�*�*�*�*�*�*rAr�rgrhrlrk�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.rZrFrG)r;r�r�r�r[�c3rYr��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�%:�<�?�!��]+rAc����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>.ZNrGr�rAr@r�r�^rIrAr�rgy�?c��eZdZd�Zy)�;ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZc�@�	t||z
�dkS#tcYSxYw)Ng���ư>)r,r�r�s  r@r=zBClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZ.__eq__ds(��*��t�e�|�,��4�4��*�)�)�s��Nr>r�rAr@�ZZr�cs��
*rAr�g�ׇP�?c��eZdZy)�@ClassPropertiesAndMethods.test_rich_comparisons.<locals>.classicNrGr�rAr@r�r�mrIrAr�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�rs  r@r5zCClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__init__qr�rAc�(���jd�y)Nzshouldn't call __cmp__)r�)rDr�r;s  �r@�__cmp__zBClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__cmp__ss����I�I�6�7rAc���t|��r|j|jk(St|t�st|t�r|j|k(StSr�r�r�s  �r@r=zAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__eq__ur�rAc���t|��r|j|jk7St|t�st|t�r|j|k7StSr�r�r�s  �r@rIzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ne__{r�rAc���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r@rRzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__lt__�r�rAc���t|��r|j|jkSt|t�st|t�r|j|kStSr�r�r�s  �r@rPzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__le__�r�rAc���t|��r|j|jkDSt|t�st|t�r|j|kDStSr�r�r�s  �r@rMzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__gt__�r�rAc���t|��r|j|jk\St|t�st|t�r|j|k\StSr�r�r�s  �r@rKzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ge__�r�rAN)r�r�r�r5r�r=rIrRrPrMrK)r�r;s��r@r�r�ps+���,�8�*�*�*�*�*�*rAr�rhrlrkr�r�r�r�r�r�)r�rFr.rZr7rG)r;r�rSr��zzr�r�r�r[r�rYr�r�r�r�s`             @r@�test_rich_comparisonsz/ClassPropertiesAndMethods.test_rich_comparisons\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��)>�@�?�!��_1rAc�p��ddlm}�fd�}||jd�|tjd�y)Nr)�FileIOc�>���j|j|�yr�)rFr)�descr�whatr;s  �r@�checkz6ClassPropertiesAndMethods.test_descrdoc.<locals>.check�s������U�]�]�D�1rAzTrue 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�?�@rAc���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;rZ�otypes   r@r_zGClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescr.__get__�s3���#�-�-�6�6��D�F��!�N�N�E��/5�u�=�=rANrr�rAr@�DocDescrr��s��
>rAr�c���eZdZW��Zy)�?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.NewClassNr�)r�s�r@�NewClassr��s
����j�GrAr�zobject=None; type=NewClassz'object=NewClass instance; type=NewClass)rZrFr)r;r�r�s  @r@�test_doc_descriptorz-ClassPropertiesAndMethods.test_doc_descriptor�sI���	>�v�	>�	!�	!�����)�)�+G�H������+�+�-V�WrAc�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>.CNrGr�rAr@r�r��r�rAr�c��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.DNrGr�rAr@rHr��r�rArHc��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.ENrGr�rAr@r�r�r�rAr�c��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.FNrGr�rAr@rr�r�rArc����	||_�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$rgc��eZdZgZy)�5ClassPropertiesAndMethods.test_set_class.<locals>.IntNr�r�rAr@�Intr�s��B�	rAr	Trhc��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.GrCrUNr�r�rAr@rqr�r8rArqc��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.HrUrCNr�r�rAr@rEr
�r8rArEc��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.IrCrUNr�r�rAr@r�r�r8rAr�c��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.JrYrUNr�r�rAr@�Jr�r8rArc��eZdZgd�Zy)�3ClassPropertiesAndMethods.test_set_class.<locals>.K)rCrUrNNr�r�rAr@�Kr�rrArc��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.Lr5Nr�r�rAr@r�r�rrAr�c��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.Mr5Nr�r�rAr@r�r�rrAr�c��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.NrbNr�r�rAr@rr�rfrArc��eZdZdgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.PrJNr�r�rAr@�Pr�rarArc��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.QNrGr�rAr@�Qr �rIrAr!c��eZdZddgZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.RrJrbNr�r�rAr@�Rr#�s��#�]�3�IrAr$z
assigning z as __class__ for z silently failedc��eZdZy)�3ClassPropertiesAndMethods.test_set_class.<locals>.ONrGr�rAr@�Or&
rIrAr'c���eZdZ�fd�Zy)�3ClassPropertiesAndMethods.test_set_class.<locals>.Ac����|_yr�r|)r;r's �r@r/z;ClassPropertiesAndMethods.test_set_class.<locals>.A.__del__
s
���!"��rAN�r�r�r�r/)r's�r@rwr)
s���
#rArwr�)
rZrrr7r.r�rHrCrFr�)r;r�rHr�rr��cls2r�rr	�orqrEr�rrr�r�rrr!r$rwr�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>.CNrGr�rAr@r�r1
r�rAr�rUrgc�n��	||_�jd|�d|���y#ttf$rYywxYw)Nrz.__dict__ = )rJr�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>.BaseNrGr�rAr@r?r4-
rIrAr?c����|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__rJz&dict_descr allowed access to %r's dictN)rJr�r�r�r�)r��
dict_descrr?rr;s  ���r@�verify_dict_readonlyzEClassPropertiesAndMethods.test_set_dict.<locals>.verify_dict_readonly/
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>.Meta1NrGr�rAr@�Meta1r9C
rIrAr:c��eZdZy)�6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta2NrGr�rAr@�Meta2r<E
rIrAr=c��eZdZy)�2ClassPropertiesAndMethods.test_set_dict.<locals>.DNrGr�rAr@rHr?G
rIrArHr<c��eZdZy)�2ClassPropertiesAndMethods.test_set_dict.<locals>.ENrGr�rAr@r�rAI
rIrAr��eggsr�z%r's __dict__ can be modifiedc��eZdZy)�8ClassPropertiesAndMethods.test_set_dict.<locals>.Module1NrGr�rAr@�Module1rDV
rIrArEc��eZdZy)�8ClassPropertiesAndMethods.test_set_dict.<locals>.Module2NrGr�rAr@�Module2rGX
rIrArHc�4�	|`y#ttf$rYywxYw)NTF)rJr�r�)r5s r@�can_delete_dictz@ClassPropertiesAndMethods.test_set_dict.<locals>.can_delete_dictc
s*��
��J����~�.�
��
�s���c��eZdZy)�;ClassPropertiesAndMethods.test_set_dict.<locals>.Exception1NrGr�rAr@�
Exception1rLj
rIrArMc��eZdZy)�;ClassPropertiesAndMethods.test_set_dict.<locals>.Exception2NrGr�rAr@�
Exception2rOl
rIrArPrC)rZrJrFrUrHr�r�r7r8r-rCr�)r;r�rCr7r:r=rHr�r��
class_dictrErHr8r�rJrMrP�
ExceptionTyper5r?rs`                  @@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__w
s����T��*�*rAc�>���t|�t|�z�Sr�rX)r;r�r�s  �r@rjzJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__add__y
s�����T��S��Z�/�0�0rANc	���|�$�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�BrAc	���|�%�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�BrAr�)r�r�r�r�rjr�r]r_)r�s�r@r�rVv
s���
+�
1��H�
C�

CrAr�rgrhzI(3)rlzI(8)r�c��eZdZd�Zy)�BClassPropertiesAndMethods.test_binary_operator_override.<locals>.Sc�D�|j�|j�k(Sr�)r�r�s  r@r=zIClassPropertiesAndMethods.test_binary_operator_override.<locals>.S.__eq__�
s���z�z�|�u�{�{�}�4�4rANr>r�rAr@�Sra�
r�rArc)r.rFr�rr9)r;rcr�s  @r@�test_binary_operator_overridez7ClassPropertiesAndMethods.test_binary_operator_overridet
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��	5rAc���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>.ANrGr�rAr@rwrh�
rIrArwc��eZdZy��>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.BNrGr�rAr@rrk�
rIrArc��eZdZy)�>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.CNrGr�rAr@r�rm�
rIrAr�c��eZdZy)�>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.DNrGr�rAr@rHro�
rIrArHc��yrfr�r�s r@r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
s��"rAr�c��y)N�:r�r�s r@r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
rdrArrc��y)N�r�r�s r@r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
rdrArtc��yr"r�r�s r@r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
rdrAr�c�:�|dk(rytj||�S)Nr�r)rZr!r�s  r@r!zMClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattribute__�
s���u�}���*�*�4��6�6rArc�"�|dvryt|��)N)r�r�r�rIr�r�s  r@r�zHClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattr__�
s���-�-�� ��&�&rArIzd.foo should be undefined nowc��eZdZyrgrGr�rAr@rwz>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.A�
rIrAc��eZdZyrjrGr�rAr@rz>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.B�
rIrAc��yr�r�r�s r@r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>�
s��4rA)rZrDrErFrr�r�r�r!r�r�r�r�rrRr)	r;rwrr�rHrN�	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>.MyBytesNrGr�rAr@r�r�
rIrAr�r�c��eZdZy)�@ClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyIntNrGr�rAr@r�r��
rIrAr�r�z2subclass of int should not have a buffer interface)�binasciir�rF�b2a_hexr.r�r�)r;r�r�r�rPr�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�MrAc��|dzS)Nz reprr�r�s r@r�zPClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__repr__�
s���g�~�%rAN)r�r�r�r�r�)r�s�r@�octetstringr��
s���
N�
&rAr�rw�A�41zA repr)r�r9rFrHr��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�0rAc���Gd�dt�}Gd�d�}|d�|_|jt|�t�|jt|��t�y)Nc��eZdZy)�LClassPropertiesAndMethods.test_repr_with_module_str_subclass.<locals>.StrSubNrGr�rAr@�StrSubr�rIrAr�c��eZdZy)�JClassPropertiesAndMethods.test_repr_with_module_str_subclass.<locals>.SomeNrGr�rAr@�Somer�rIrAr��example)r9r�r
r�)r;r�r�s   r@�"test_repr_with_module_str_subclassz<ClassPropertiesAndMethods.test_repr_with_module_str_subclass
sN��	�S�	�	�	� ��+������d�4�j�#�.����d�4�6�l�C�0rAc��d�}|j|jd��d�t�}tj|ddd��|j|d�y)	Nc��|Sr�r�r�s r@r�z;ClassPropertiesAndMethods.test_keyword_arguments.<locals>.fs���(rAr�r�uabc½€�latin1r�)�encodingr�sabc�?)rFra�	bytearrayr5)r;r��bas   r@�test_keyword_argumentsz0ClassPropertiesAndMethods.test_keyword_argumentssT���������b��)�2�.�
�[�����2��$,�Y�	�	@�����[�)rAc��Gd�dt�}|�|_|jt�5|��ddd�y#1swYyxYw)Nc��eZdZy)�8ClassPropertiesAndMethods.test_recursive_call.<locals>.ANrGr�rAr@rwr�rIrArw)rZrar�RecursionErrorr]s  r@�test_recursive_callz-ClassPropertiesAndMethods.test_recursive_calls<��	��	��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@r/z=ClassPropertiesAndMethods.test_delete_hook.<locals>.C.__del__*s����
�
�1�
rANr+)r#s�r@r�r�)s���
rAr�rgc��eZdZy)�5ClassPropertiesAndMethods.test_delete_hook.<locals>.DNrGr�rAr@rHr�2r�rArHrz$invalid del() didn't raise TypeError)rZrFrrRr�r�)r;r�rYrHrNr#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>.mydictNrGr�rAr@�mydictr�;rIrAr�z#hash() of dict subclass should failc��eZdZy)�?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mylistNrGr�rAr@�mylistr�ErIrAr�z#hash() of list subclass should fail)r�rDr�r�r7)r;r�rNr�s    r@�test_hash_inheritancez/ClassPropertiesAndMethods.test_hash_inheritance8s���	�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)NrCr�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�rgrhz%'%s' % (1, 2) doesn't raise TypeError�%z#'%' % None doesn't raise ValueError�534253rg�534253xz%c�)r�r��splitr�r/�rindexrF�isdigitr�s r@�test_str_operationsz-ClassPropertiesAndMethods.test_str_operationsOs���
�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>.NodeNrGr�rAr@rQr�rIrArQ)rUrCr)r;rQrCrUrSs     r@�test_deepcopy_recursivez1ClassPropertiesAndMethods.test_deepcopy_recursive}s1��	�	��F���F���������Q�K�rAc�4�ddlm}|j|�}t|�|j	|d�|j	|d�|j	|d�|j|j�d|_|j|jddi�y)Nr)r8r��__file__r�rg)	r7r8r�r9rr�rJr�rF)r;r�rPs   r@�test_uninitialized_modulesz4ClassPropertiesAndMethods.test_uninitialized_modules�sz��)�
�I�I�a�L���A�����a��,����a��,����a��'�������$����������e�Q�Z�0rAc���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)Nrk)r#r9r.rZr�)r�r�rHs  �r@r�z;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__�s9����c�3�'�	�)9���S�)�&�.�.��2C�+C�#�^�^�C�0�0rANrP)rHs�r@r�r��s���
1rAr�c��eZdZd�Zy)�3ClassPropertiesAndMethods.test_funny_new.<locals>.Dc��||_yr�rB�r;r�s  r@r5z<ClassPropertiesAndMethods.test_funny_new.<locals>.D.__init__�rSrANrFr�rAr@rHr��rTrArHrrkrgc��eZdZed��Zy)r�c��|Sr�r�r�s r@r�z;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__�����rAN)r�r�r�rbr�r�rAr@r�z3ClassPropertiesAndMethods.test_funny_new.<locals>.C�s��
�
��
rArhc��eZdZy�r�NrGr�rAr@rHz3ClassPropertiesAndMethods.test_funny_new.<locals>.D�rIrAc��eZdZed��Zy)r�c��|Sr�r�r�s r@r�z;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__�r�rAN)r�r�r�r�r�r�rAr@r�z3ClassPropertiesAndMethods.test_funny_new.<locals>.C�s��
�
��
rAc��eZdZyr�rGr�rAr@rHz3ClassPropertiesAndMethods.test_funny_new.<locals>.D�rIrA)rZrFr�r
)r;r�rNrHs   @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�,�/rAc�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@rwz;ClassPropertiesAndMethods.test_imul_bug.<locals>.C.__imul__�s���e�}�$rAN)r�r�r�rwr�rAr@r�r��rerAr�r�rhrllr��rZrF)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�'rAc���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__foorRs  r@r5z@ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__init__�s����� ��
rAc��||_yr�rBrRs  r@�setfooz>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.setfoo�rSrAc��|jSr�)r�r�s r@�getfooz>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.getfoo�rrAc��|jgSr�rBr�s r@�__getstate__zDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__getstate__�s�����z�!rAc�^���jt|�d�|dx|_|_yr)rFrr�r�)rD�lstr;s  �r@�__setstate__zDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__setstate__�s)���� � ��S��1�-�*-�a�&�0���e�irAr�)r�r�r�r5r�r�r�r�r�s�r@r�r��s���
!�
�
"�
"�
1rAr�r�r)r�rZr�rFr�r�r)r;r�r�rCrUs`    r@�test_copy_setstatez,ClassPropertiesAndMethods.test_copy_setstate�s�����	1��	1�
�b�E��	������������#��������R�(��I�I�a�L���������#��������R�(��M�M�!����������#��������R�(rAc���|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)NrIro�hellc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_slices.<locals>.Sc�.�tj||�Sr�)r9rqr�s  r@rqz<ClassPropertiesAndMethods.test_slices.<locals>.S.__getitem__�s�����t�Q�/�/rANr'r�rAr@rcr��s��
0rArcrkrhr�c��eZdZd�Zy)�0ClassPropertiesAndMethods.test_slices.<locals>.Tc�.�tj||�Sr�)r�rqr�s  r@rqz<ClassPropertiesAndMethods.test_slices.<locals>.T.__getitem__s���(�(��q�1�1rANr'r�rAr@r�r����
2rAr�rgc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_slices.<locals>.Lc�.�tj||�Sr�)r7rqr�s  r@rqz<ClassPropertiesAndMethods.test_slices.<locals>.L.__getitem__s���'�'��a�0�0rANr'r�rAr@r�r�
r�rAr�rl)rgrlrhr)rlrgrh)rlrhrg)rhrlrg)rFrZr9rqr�r7r)r;rcr�r�rCs     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�$rAc���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@r/zFClassPropertiesAndMethods.test_subtype_resurrection.<locals>.C.__del__!s������"�"�4�(rAN)r�r�r�r�r/rGs�r@r�r�s
����I�
)rAr�r�rg)rZrrrrRrFrr�r/)r;rYr�s  @r@�test_subtype_resurrectionz3ClassPropertiesAndMethods.test_subtype_resurrectionsP���	)��	)�
�C�����

���������Q�[�[�)�1�-�
�IrAc�X�Gd�dt�}d}td�D]
}||�}�~y)Nc��eZdZdgZd�Zy)�9ClassPropertiesAndMethods.test_slots_trash.<locals>.trashr�c��||_yr�r�r�s  r@r5zBClassPropertiesAndMethods.test_slots_trash.<locals>.trash.__init__9r�rAN)r�r�r�r�r5r�rAr@�trashr7s����I�
rAriP�)rZr�)r;rr-r�s    r@�test_slots_trashz*ClassPropertiesAndMethods.test_slots_trash4s/��	�F�	�
���u��A��a��A��
rAc�,�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�rAr@rwr	B����IrArwc��eZdZy)�DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.BNrGr�rAr@rrDrIrArc��eZdZdZy)�DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.Cr�Nr�r�rAr@r�rFr
rAr�rJrbrh)rZrr�rF�
__basicsize__rkr�)r;rwrr�s    r@�test_slots_multiple_inheritancez9ClassPropertiesAndMethods.test_slots_multiple_inheritance@su��	��	�	��	�	��!�	��$�$�&����Q�_�_�a�o�o�>����1�j�)����1�m�,����rAc���Gd�dt�}|�}|j|dzd�|j|dzd�|jd|zd�|jd|zd�y)Nc��eZdZd�Zd�Zy)�.ClassPropertiesAndMethods.test_rmul.<locals>.Cc��y)Nrr�r�s  r@r{z6ClassPropertiesAndMethods.test_rmul.<locals>.C.__mul__R���rAc��y)N�rmulr�r�s  r@r}z7ClassPropertiesAndMethods.test_rmul.<locals>.C.__rmul__Ts��rAN)r�r�r�r{r}r�rAr@r�rQs��
�
rAr�rhrg������@rr�r-s   r@�	test_rmulz#ClassPropertiesAndMethods.test_rmulNsg��	��	�

�C������1��e�$�����3���&�����1��f�%�����Q���'rAc�:�Gd�dt�}|�}|dz}y)Nc��eZdZd�Zy)�.ClassPropertiesAndMethods.test_ipow.<locals>.Cc��yr�r�r�s  r@�__ipow__z7ClassPropertiesAndMethods.test_ipow.<locals>.C.__ipow__`���rAN�r�r�r�rr�rAr@r�r_���
rAr�rhr�r-s   r@�	test_ipowz#ClassPropertiesAndMethods.test_ipow\s ��	��	�
�C��	�a��rAc���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__gr�rANrr�rAr@rwr$fr�rArwc��eZdZd�Zy)�FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.Bc��yr�r�r�s  r@r_zOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.B.__rpow__k���rAN�r�r�r�r_r�rAr@rr'j���
rArc��eZdZd�Zy)�FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.Cc��yrAr�r�s  r@r]zNClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.C.__pow__or)rAN�r�r�r�r]r�rAr@r�r-nr+rAr�rgrhr�)r;rwrr�rCrUrYs       r@�!test_ipow_returns_not_implementedz;ClassPropertiesAndMethods.test_ipow_returns_not_implementedesm��	&�	&�	��	�	��	�
�C��
�C��
�C��	�a�������A��	�a�������A�rAc�h�Gd�d�}t�}|�}||z}|j|d�y)Nc��eZdZd�Zy)�1ClassPropertiesAndMethods.test_no_ipow.<locals>.Bc��yr�r�r�s  r@r_z:ClassPropertiesAndMethods.test_no_ipow.<locals>.B.__rpow__}r)rANr*r�rAr@rr3|r+rArrgr�)r;rrCrUs    r@�test_no_ipowz&ClassPropertiesAndMethods.test_no_ipow{s5��	�	�
�H��
�C��	�a�������A�rAc�X�d}|jt�5}|dz}ddd�|jdtj��|jt�5}|dz}ddd�|jdt|j��y#1swY�wxYw#1swY�;xYw)Nrhz#unsupported operand type(s) for **=z"unsupported operand type(s) for **)rr�rr9r�)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>.CNrGr�rAr@r�r:�rIrAr�c�(���eZdZ��fd�Zd�Z�xZS)�8ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2c�.��|dk(ryt�|�|�S)NrCrh)ror!)r;rrr�rs  ��r@r!zIClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.__getattribute__�s����3�;�� ��T�;�D�A�ArAc��yr�r�r�s r@rMz=ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.meth�r)rA)r�r�r�r!rMrr)rr�s@�r@r�r<�s���
B�

rAr�c��eZdZy)�7ClassPropertiesAndMethods.test_mutable_bases.<locals>.DNrGr�rAr@rHr@�rIrArHc��eZdZy)�7ClassPropertiesAndMethods.test_mutable_bases.<locals>.ENrGr�rAr@r�rB�rIrAr�rgrhz&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)
rZrKrFrMrCr:r�r�r�r9)r;r�rHr�rNr5r�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)
NrKrhrgc��eZdZy)�7ClassPropertiesAndMethods.test_builtin_bases.<locals>.LNrGr�rAr@r�rF�rIrAr�c��eZdZy)�7ClassPropertiesAndMethods.test_builtin_bases.<locals>.CNrGr�rAr@r�rH�rIrAr�c��eZdZy)�7ClassPropertiesAndMethods.test_builtin_bases.<locals>.DNrGr�rAr@rHrJ�rIrArHz/shouldn't turn list subclass into dict subclassz-shouldn't be able to assign to list.__bases__z#best_base calculation found wanting)�builtinsrJ�valuesr#rHrZr!�ExceptionGrouprFrrKr7r�r�r�)r;�tp�
builtin_types�	num_basesr�r�rHs       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>.XNrGr�rAr@r�rU�rrAr�c��eZdZyrTrGr�rAr@r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XrrAc��eZdZyrTrGr�rAr@r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XrrAc��eZdZy)�>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.ONrGr�rAr@r'rYrIrAr'c��eZdZyrTrGr�rAr@r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.X	rrAc��eZdZyrTrGr�rAr@r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XrrAc��eZdZyrTrGr�rAr@r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XrIrA)rr�rHrZrK)r;r�r's   r@�test_unsubclassable_typesz3ClassPropertiesAndMethods.test_unsubclassable_types�s���
�
�
�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�)�flagror�)r;r>rOr��WorkOncers    ��r@r�zWClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.__new__s"�����	��X�t�4�X�t�U�B�O�OrAc��|jdkDrtd��|xjdz
c_tj|�S)Nr�bozorg)rbr�rHrr�s r@rzSClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.mro"s3���9�9�q�=�&�v�.�.��I�I��N�I��8�8�D�>�)rA)r�r�r�r�rrr)rrcs@�r@rcr`s���
P�
*rArcc��eZdZd�Zy)�QClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlwaysc�,�tj|�Sr�)rHrr�s r@rzUClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlways.mro*s��
�x�x��~�%rANr�r�rAr@�
WorkAlwaysrg)s��
&rAric��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.CNrGr�rAr@r�rk1rIrAr�c��eZdZy)�IClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.C2NrGr�rAr@r�rm4rIrAr�c��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.DNrGr�rAr@rHro7rIrArHc��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.ENrGr�rAr@r�rq:rIrAr�c��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.FNrGr�rAr@rrs=rIrArr<c��eZdZy)�HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.GNrGr�rAr@rqru@rIrArqzexception not propagated)rHrZrYrKr�r�rF)r;rir�r�rHr�rrq�E_mro_before�D_mro_beforercs          @r@�#test_mutable_bases_with_failing_mroz=ClassPropertiesAndMethods.test_mutable_bases_with_failing_mros����		*�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>.ANrGr�rAr@rwr{TrIrArwc��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.BNrGr�rAr@rr}WrIrArc��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.CNrGr�rAr@r�rZrIrAr�c��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.DNrGr�rAr@rHr�]rIrArHc��eZdZy)�JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ENrGr�rAr@r�r�`rIrAr�zdidn't catch MRO conflict)rZrKr�r�)r;rwrr�rHr�s      r@�%test_mutable_bases_catch_mro_conflictz?ClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflictRsw��	��	�	��	�	��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>.CNrGr�rAr@r�r�lrIrAr�rHzD.E)rZr�r�rF)r;r�r�s   r@�test_mutable_namesz,ClassPropertiesAndMethods.test_mutable_namesjsi��	��	��l�l����
����!�,�,��
�
�3�c�3�Z�@���
����!�,�,��
�
�3�c�5�\�BrAc�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@r/zDClassPropertiesAndMethods.test_evil_type_name.<locals>.Nasty.__del__}s
���$��
rANr+rGs�r@�Nastyr�|s���
%rAr�c��eZdZy)�8ClassPropertiesAndMethods.test_evil_type_name.<locals>.CNrGr�rAr@r�r��rIrAr�r �normal)r9r�)r;r�r�s  @r@�test_evil_type_namez-ClassPropertiesAndMethods.test_evil_type_namexs-���	%�C�	%�	�	��5�\��
���
rAc���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__����'rAc��y)N�B.__rfloordiv__r�r�s  r@�
__rfloordiv__zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__rfloordiv__����(rAN�r�r�r�r�r�r�rAr@rr�����
(�
)rArrgr�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�rAc��y)N�C.__rfloordiv__r�r�s  r@r�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__rfloordiv__�r�rANr�r�rAr@r�r��r�rAr�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�rAc��y)N�D.__rfloordiv__r�r�s  r@r�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__rfloordiv__�r�rANr�r�rAr@rHr��r�rArHr�r�c��eZdZy)�;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.ENrGr�rAr@r�r��rIrAr�)r.rFrZr�)r;rr�rHr�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�6rAz)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)Nrk�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))rFr�r�rJr_r�r�r.)r;r�rLr�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@r5zEClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__init__�rrAc�|�|jd�rtj||�St|j|�S�N�_Proxy__�r]rZr!rIr�r�s  r@r!zMClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__getattribute__��2���?�?�:�.�!�2�2�4��>�>�"�4�:�:�t�4�4rAN�r�r�r�r5r!r�rAr@rVr�����
!�
5rArVc��eZdZy��8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.CNrGr�rAr@r�r��rIrAr�c��eZdZy��8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DNrGr�rAr@rHr��rIrArHc��eZdZyr�rGr�rAr@r�z8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.C�rIrAc��eZdZyr�rGr�rAr@rHz8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DrIrA)rZr
)r;rVr�rC�parHs      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�!�$rAc����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@r5zBClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__init__rrAc�|�|jd�rtj||�St|j|�Sr�r�r�s  r@r!zJClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__getattribute__r�rANr�r�rAr@rVr�r�rArVc��eZdZd�Zy)�5ClassPropertiesAndMethods.test_proxy_super.<locals>.Bc��y)NzB.fr�r�s r@r�z7ClassPropertiesAndMethods.test_proxy_super.<locals>.B.frrANrtr�rAr@rr�s��
rArc�"���eZdZ��fd�Z�xZS)�5ClassPropertiesAndMethods.test_proxy_super.<locals>.Cc�&��t�|��dzS)Nz->C.f)ror�)r;r�rs ��r@r�z7ClassPropertiesAndMethods.test_proxy_super.<locals>.C.fs����Q��'�)�G�3�3rA)r�r�r�r�rr)rr�s@�r@r�r�s
���
4�
4rAr�r�zB.f->C.f)rZrFrJ)r;rVrr$r�r�s     @r@�test_proxy_superz*ClassPropertiesAndMethods.test_proxy_supersX���	5�F�	5�	��	�	4��	4��c���#�J���������C���+�Z�8rAc���	tjtdd�|jd�	tjtd�|jd�y#t$rY�8wxYw#t$rYywxYw)Nr�r�z"Carlo Verre __setattr__ succeeded!r�z"Carlo Verre __delattr__ succeeded!)rZr%r9r�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�)rHr%�r�rrs   r@r%zTClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.A.__setattr__4s��� � ��c�5�1rAN�r�r�r�r%r�rAr@rwr�3r�rArwc��eZdZy)�HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.BNrGr�rAr@rr�7rIrArc��eZdZy)�HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.CNrGr�rAr@r�r�:rIrAr�rHTz1setattr through direct base types should be legal)rHrZr	r�r��r;rwrr�r$s     r@�#test_carloverre_multi_inherit_validz=ClassPropertiesAndMethods.test_carloverre_multi_inherit_valid2sc��	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�)rZr%r�s   r@r%zVClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.A.__setattr__Es���"�"�3��U�3rANr�r�rAr@rwr�Ds��
4rArwc��eZdZy)�JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.BNrGr�rAr@rr�HrIrArc��eZdZy)�JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.CNrGr�rAr@r�r�KrIrAr�rHTz6setattr through indirect base types should be rejected)rHrZr	r�r�r�s     r@�%test_carloverre_multi_inherit_invalidz?ClassPropertiesAndMethods.test_carloverre_multi_inherit_invalidCsh��	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��rk)r;�	referrentrjs  �r@r5zJClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__init__\s���&�7�;�;�y�1��rAc�$�|j�}yr�r�r�s  r@r/zIClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__del___s
���H�H�J�rAN)r�r�r�r5r/)rjs�r@�Provokerr�[s
���
2�
rAr�c��eZdZy)�=ClassPropertiesAndMethods.test_weakref_segfault.<locals>.OopsNrGr�rAr@�Oopsr�brIrAr�)rjrZ�whatever)r;r�r�r-rjs    @r@�test_weakref_segfaultz/ClassPropertiesAndMethods.test_weakref_segfaultVs5���	�	�	�	�6�	�
�F���a�[��
�
rA�cpuc�F�d�}td�D]}|j}�d}y)Nc��yr�r�r�rAr@r�zAClassPropertiesAndMethods.test_wrapper_segfault.<locals>.<lambda>ls��4rAi@B)r�ra)r;r�r�s   r@�test_wrapper_segfaultz/ClassPropertiesAndMethods.test_wrapper_segfaultis%��
���w��A��
�
�A� ��rAc���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__ts �� �^�^��
�"�%D�T�F�#K�L�LrANr�r�rAr@�StdoutGuardr�ss��
MrAr	zOops!)rrr��print)r;r	s  r@�test_file_faultz)ClassPropertiesAndMethods.test_file_faultqsL��	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)Nrr�rDr�s r@rEzQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__hash__�s���F�|�#rAc�*��	�`y#t$rYywxYwr�)rrr�r�s  �r@r=zOClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__eq__�s)��������&�����s��	�N�r�r�r�rEr=rGs�r@�Evilr	�s
���
$�
rAr	c��eZdZdd�Zy)�IClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.DescrNc��yr�r�)r;�obrHs   r@r_zQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Descr.__get__�r)rAr�rr�rAr@�Descrr	�s��
rAr	c���eZdZW��Zy)�EClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.CN)r�r�r�rr�r	s�r@r�r	�s
����7�DrAr�rrgrr)rZrJrFrrrrRr)r;r	rYr�r	s   @@r@� test_vicious_descriptor_nonsensez:ClassPropertiesAndMethods.test_vicious_descriptor_nonsense|sp���		�6�		�	�F�	�	��	�
�C����
�
�4�6���������#��������a��(rAc�r�Gd�dt�}	|�|jd�y#t$rYywxYw)Nc��eZdZd�Zy)�0ClassPropertiesAndMethods.test_init.<locals>.Fooc��y)Nrr�r�s r@r5z9ClassPropertiesAndMethods.test_init.<locals>.Foo.__init__�rgrANrFr�rAr@�Foor	�rirAr	z'did not test __init__() for None return)rZr�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;rCrUs   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)Nrj)
rrjr�r{r	rFr�rr��__objclass__r7rrD�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�rAc�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�)rr�r��popr	rFr�rr�rr7rDr"	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�rAc��|jtjtjk(�|jtjtjk7�|jtjtjk(�|jtjtjk7�|jtjtj�|j
tjjd�|jtjjt�|jtjtjk(�|jtjtjk7�|jtjtjk(�|jtjtjk7�|jtjtj�|j
tjjd�|jtjjt�y)Nrjr�)rr7rjr�r{r	rFr�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�.�.��5rAc�\��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��!�!rAc�����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"rg))rjzx + yzx += y)�__sub__zx - yzx -= y)r{zx * 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 ^= yrwr��__rrhr�__ir�)r�r�rH)r;r+	r��N1�N2r>r?�iexprrwrC�rnamerrU�inamer�rYs`               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"GrAc�r�Gd�dt�}|�}d|dd|j|jd�y)Nc��eZdZd�Zy)�6ClassPropertiesAndMethods.test_assign_slice.<locals>.Cc��||_yr��r)r;�idxrs   r@rzBClassPropertiesAndMethods.test_assign_slice.<locals>.C.__setitem__.rrAN)r�r�r�rr�rAr@r�rB	-rrAr�rlrgrh)rZrFr)r;r�rYs   r@�test_assign_slicez+ClassPropertiesAndMethods.test_assign_slice(s6��
	#��	#�
�C����!�A��������!�$rAc�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@r5zEClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__init__:rrAc�6�||j|j<yr�)rJr>r&s   r@r�zDClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__set__=s��*/����T�Y�Y�'rAN)r�r�r�r5r�r�rAr@r	rI	8s��
!�
0rAr	rCc���eZdZW�Zy��8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XNr��r�s�r@r�rN	As����ArAr�r�c��eZdZy)�;ClassPropertiesAndMethods.test_set_and_no_get.<locals>.MetaNrGr�rAr@rtrQ	JrIrArtc��eZdZyrM	rGr�rAr@r�z8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XLrIrAr<)rZrrCrFrH)r;r	r�r�rtr�s     @r@�test_set_and_no_getz-ClassPropertiesAndMethods.test_set_and_no_get5s����	0�F�	0��c�
��	��	�
�C���
�
�a�c�c�5�!����������b�!�	�4�	�	�$�	�����s����������b�!rAc�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>.getterXs����L�L�A�%�L�(��.�.rAr�)r;r$�objtyper�s`   r@r_zHClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__Ws���/��
rAr�)r�r�r�r�r_r�rAr@�
DescriptorrV	Us���G�
rArZ	c���eZdZW�Zy)�7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.AN)r�r�r�r!rO	s�r@rwr\	^s	���$�rArwc���eZdZW�Zy)�7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.BNr�rO	s�r@rr^	`s����KrArc���eZdZW�ZW�Zy)�7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.CN)r�r�r�r!r�rO	s�r@r�r`	bs���$���KrAr�rrrgrhroc���eZdZd�Z�fd�Zy)�FClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattributec��t|��r�r�r�s  r@r�zRClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattr__os
��$�T�*�*rAc�f���`td�D]}tj��t	|���Nr�)r�r�rT�collectr�)r;r>r��EvilGetattributes   �r@r!zWClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattribute__qs+���$�0��q��A��J�J�L�"�$�T�*�*rANr)rg	s�r@rg	rb	ms
���
+�
+rArg	)rZrr�rIrFr�)r;rZ	rwrr�rg	r�s     @@r@�test_getattr_hooksz,ClassPropertiesAndMethods.test_getattr_hooksRs����	��	����	%��	%�	 ��	 �	 ��	 �	
���.�'�1�3��?��������*����.�'�1�3��?��������*����.�'�1�3��?��������*�	+�v�	+�	
���.�'�3C�3E�v�NrAc�`�|jttjtt�yr�)rr�rHr!r7r�s r@�test_type___getattribute__z4ClassPropertiesAndMethods.test_type___getattribute__ys�����)�T�%:�%:�D�$�GrAc��|jtttd�Gd�dt�}|jtt|d�Gd�dt�}|jt�5|`ddd�y#1swYyxYw)N�__abstractmethods__c��eZdZy)�<ClassPropertiesAndMethods.test_abstractmethods.<locals>.metaNrGr�rAr@�metarn	rIrAro	c��eZdZy)�9ClassPropertiesAndMethods.test_abstractmethods.<locals>.XNrGr�rAr@r�rq	�rIrAr�)rr�rIrHrZrl	)r;ro	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�r9rr�rAr@�FakeStrru	�rJrArv	r )r
r9rr�r�rj)r;rv	�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>.ThingNrGr�rAr@�Thingr{	�rIrAr|	r�r)�deque)r�rr�r7�sortr9r�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>.FooNrGr�rAr@r	r�	�rIrAr	)r�r�rr�r9r�)r;r	r�s   r@�test_repr_as_strz*ClassPropertiesAndMethods.test_repr_as_str�sB��	�	��{�{����e�����.�#�s�3����.�$��4rAc��Gd�dt�}|�}d|_|j|dd�|j||�y)Nc�<�eZdZejZejZy)�>ClassPropertiesAndMethods.test_mixing_slot_wrappers.<locals>.XN)r�r�r�r�rr%r��__neg__r�rAr@r�r�	�s���*�*�K��i�i�GrAr�r�r�)r�r�rF)r;r�r�s   r@�test_mixing_slot_wrappersz3ClassPropertiesAndMethods.test_mixing_slot_wrappers�sD��	 ��	 �
�C���������3���$�����Q�B�rAc���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�r9r=rjr�rAr@rwr�	�s���Z�Z�F��k�k�GrArw)r.rr�)r;rwrCs   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�rAr@r�r�	�s��"�G�	��rAr�z0'foo' in __slots__ conflicts with class variable)rr�r9r�rF)r;r�r�rPs    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�rAr@r�r�	�s��rAr��bananar�blahz7cannot set '__doc__' attribute of immutable type 'list'z7cannot delete '__doc__' attribute of immutable type 'X')rrFrr�rHr7rJr�rr9r�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>.XNrGr�rAr@r�r�	�rIrAr�r��Oinkc� �eZdZGd�d�Zy)r�c��eZdZy)�Y.InsideNrGr�rAr@�Insider�	rrAr�	N)r�r�r�r�	r�rAr@r�r�s��
�
rAr�r�	)r9r�r�r�r/r.rjr�rFrHr�r!	r�rr�rJr�r�r�	)r;�descriptorsr7rNr��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�rg)rHrFr�rZrJrr�)r;r�rNs   r@�test_qualname_dictz,ClassPropertiesAndMethods.test_qualname_dictsw���k�
*��
�%��R�
 ��������+�6��������5�����n�k�:�;��a�
 �����)�T�5�"�b�9rAc�&�Gd�dt�}|�}d|_tj|�}~t	j
�|j
|��tj�D]}|jt|�|��y)Nc��eZdZd�Zy)�<ClassPropertiesAndMethods.test_cycle_through_dict.<locals>.Xc�<�tj|�||_yr�)r�r5rJr�s r@r5zEClassPropertiesAndMethods.test_cycle_through_dict.<locals>.X.__init__s���
�
�d�#� $��
rANrFr�rAr@r�r�	s��
%rAr�r�)r�rrrjrkrrR�assertIsNonerTr9�assertIsNotrH)r;r�r��wrr-s     r@�test_cycle_through_dictz1ClassPropertiesAndMethods.test_cycle_through_dictso��	%��	%�
�C�����
�[�[��^��
��������"�$�����!�A����T�!�W�a�(�"rAc�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>.OverrideNeitherNrGr�rAr@�OverrideNeitherr�	#rIrAr�	rgr�c��eZdZdd�Zy)�WClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNewc�4�tj|g|��i|��Sr�rW)r�r�rr<r�s     r@r�z_ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNew.__new__(s���~�~�c�9�D�9�D�9�9rANr�rPr�rAr@�OverrideNewr�	's��
:rAr�	c��eZdZdd�Zy)�XClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInitc�4�tj|g|��i|��Sr�)rZr5)r;r�rr<r=s     r@r5zaClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInit.__init__+s�����t�=�d�=�f�=�=rANr�rFr�rAr@�OverrideInitr�	*s��
>rAr�	c��eZdZy)�XClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideBothNrGr�rAr@�OverrideBothr�	-rIrAr�	rhrlrBr	)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�!���;�	<rAc��Gd�d�}Gd�d|�}|jd|j�|jd|j�y)Nc��eZdZy)�\ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.BaseNrGr�rAr@r?r�	6rIrAr?c��eZdZy)�[ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.SubNrGr�rAr@rDr�	8rIrArDrJ)rrJrZ)r;r?rDs   r@�4test_subclassing_does_not_duplicate_dict_descriptorszNClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors5s>��	�	�	�$�	��
�
�j�$�-�-�0�����S�\�\�2rAc����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.method?rrAN�r�r�r�r�r�rAr@r	r�	>r rAr	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.methodFrrANr�	r�rAr@r?r�	Er rAr?c��eZdZy)�BClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived1NrGr�rAr@�Derived1r�	HrIrAr�	c��eZdZd�Zy)�BClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2c��yr�r�r�s r@r�zIClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2.methodKrrANr�	r�rAr@�Derived2r�	Jr rAr�	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�rAs r@r�zDClassPropertiesAndMethods.test_bound_method_repr.<locals>.Foo.method[r�rAN)r�r�r�r�r�r�rAr@r	z=ClassPropertiesAndMethods.test_bound_method_repr.<locals>.FooZs��
�
��
rAz/<bound method .*Foo\.method of <class '.*Foo'>>c��eZdZd�Zy)�DClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallablec��yr�r�r�s  r@razMClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallable.__call__frrAN)r�r�r�rar�rAr@�
MyCallabler�	er rAr�	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�rorZr7�
MethodTyper�r�)r;r	r?r�	r�	r��derived1�derived2�super_d2r�r�	r��instancer�rs              �r@�test_bound_method_reprz0ClassPropertiesAndMethods.test_bound_method_repr=s����	�	�	
����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��?�	ArAzneed the _testcapi modulec�J��Gd�d��G�fd�d�}|jy)Nc�$�eZdZejZy)�6ClassPropertiesAndMethods.test_bpo25750.<locals>.DescrN)r�r�r�r��bad_getr_r�rAr@r	r�	ys
���'�'�GrAr	c�$��eZdZW��Zd�Zy)�2ClassPropertiesAndMethods.test_bpo25750.<locals>.Xc�^�d|_td�D�cgc]}d|z��	c}|_ycc}w)Ni'rh)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�
7rAr�rO	)r;r�r	s  @r@�
test_bpo25750z'ClassPropertiesAndMethods.test_bpo25750ts ���
	(�	(�	7�	7�	
��rAc��Gd�d�}|j|j�g�Gd�d|�}|j|j�|g�~tj�|j|j�g�y)Nc��eZdZy)�>ClassPropertiesAndMethods.test_remove_subclass.<locals>.ParentNrGr�rAr@�Parentr�	�rIrAr�	c��eZdZy)�=ClassPropertiesAndMethods.test_remove_subclass.<locals>.ChildNrGr�rAr@�Childr�	�rIrAr�	)rFr:rTrf	)r;r�	r�	s   r@�test_remove_subclassz.ClassPropertiesAndMethods.test_remove_subclass�sq��
	�	�����.�.�0�"�5�	�F�	�����.�.�0�5�'�:��
�
�
������.�.�0�"�5rAc��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
�� ��'�'rAc�$�|jd�S)N�asdf)r�r�s r@r�zIClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.A.foo�s���'�'��/�/rAN)r�r�r�r�r�r�r�rAr@rwr�	�s��
(��
0��
0rArwr�	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
�� ��'�'rAc��td��)N�BAR)�NotImplementedErrorr�s r@r�zIClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.B.foo�s
��)�%�0�0rAN)r�r�r�r�r�r�r�rAr@rr
�s(��
�
(��
(��
1��
1rArr
)rWr�r�r
)r;rwrs   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�rr.rr<rZrrr�r�r�r�r�r�r]rlr�r�r�r�r�r�
refcount_testr�r�r3r�r�r�rr	rrr:rF�expectedFailurerLr^rnr�r�r�r�r�r2r`ror�r��flags�optimizer��cpython_onlyr�r�r�rrFr�r�r�r�r�r�r�r.rSrdr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr!r0r5r7rCrQr]rxr�r�r�r�r�r�r�r�r�r�r��requires_resourcer�r	r	r	r	r#	r&	r(	r?	rF	rS	rh	rj	rr	rx	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�	r�r�	r�	r
rrr|s@r@r�r��sL���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�"rAr�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@rMz$DictProxyTests.setUp.<locals>.C.meth�rrANryr�rAr@r�r
�r rAr�)rZr�r�s  r@�setUpzDictProxyTests.setUp�s��	��	���rA�gettracez#trace function introduces __local__c���|jjj�}|j|t�t	|�}|j�|j
|gd��y)N�rJrr�rbrM)r�rJr��assertNotIsInstancer7r~	rF)r;r`r�s   r@�test_iter_keyszDictProxyTests.test_iter_keys�sQ���V�V�_�_�
!�
!�
#��� � ��T�*��B�x���	�	������ 7�	8rAc���|jjj�}|j|t�t	|�}|jt
|�d�yre	)r�rJrLr
r7rFr)r;r`rLs   r@�test_iter_valueszDictProxyTests.test_iter_values�sG���V�V�_�_�
#�
#�
%��� � ��T�*��b�������V��a�(rAc���|jjj�}|j|t�|D�cgc]}|d��	}}|j�|j
|gd��ycc}w)Nrr
)r�rJr8r
r7r~	rF)r;r`�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>.BNrGr�rAr@rr
�rIrArc��eZdZy)�7DictProxyTests.test_dict_type_with_metaclass.<locals>.MNrGr�rAr@r�r!
�rIrAr�c��eZdZy)�7DictProxyTests.test_dict_type_with_metaclass.<locals>.CNrGr�rAr@r�r#
�r�rAr�r<)rZrHrFrJ)r;rr�r�s    r@�test_dict_type_with_metaclassz,DictProxyTests.test_dict_type_with_metaclass�sJ��	��	�	��	�	�!�	�	
����a�j�j�)�4��
�
�+;�<rAc�b�t|jj�}|j|j	d�|�|j|jd�|�|jjj
�D]'\}}|jdj||�|��)y)Nz
mappingproxy(�)z
{!r}: {!r})	r�r�rJrr]�endswithr8rr)r;rlr�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�,rAN)r�r�r�r
r3r�r�r�r
r
r
r
r$
r(
r�rAr@r
r
�s�����X�_�_�W�S�*�-�@�,�#�,�,�.�=�?�8�?�8��X�_�_�W�S�*�-�@�,�#�,�,�.�=�?�)�?�)��X�_�_�W�S�*�-�@�,�#�,�,�.�=�?�8�?�8�	=�8rAr
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__�rrANr/r�rAr@�UserLongr-
�r rAr0
r)rZrrHrr�)r;r0
s  r@�test_pytype_long_readyz,AAAPTypesLongInitTest.test_pytype_long_ready�s8��	�v�	�	���8�:�q�!�	
������	��s	�=�AN)r�r�r�r1
r�rAr@r*
r*
�s��
rAr*
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@rEz@MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__hash__s���G�}�$rAc����f�_yr�r�)r;r��Base2r�s  ��r@r=z>MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__eq__s���$�h��rANr	)r:
r�s��r@�MyKeyr6

s
���
%�
'rAr;
c��eZdZdZdZy)�6MiscTests.test_type_lookup_mro_reference.<locals>.Base�	from BaseN�r�r�r�r8
�mykey2r�rAr@r?r=
s���E� �FrAr?c��eZdZdZdZy)�7MiscTests.test_type_lookup_mro_reference.<locals>.Base2�
from Base2Nr?
r�rAr@r:
rB
s�� �E�!�FrAr:
r�r�r>
rC
)rZrHrFr8
r@
)r;r;
r?r:
r�s   @@r@�test_type_lookup_mro_referencez(MiscTests.test_type_lookup_mro_referencesg���	'�F�	'�	!�6�	!�	"�F�	"�
��t�g����|�,��������+�.�������<�0rAN)r�r�r�rD
r�rAr@r3
r3
s��1rAr3
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)Nrhrrgrlro)�
__reduce_ex__rF�copyreg�
__newobj_ex__rH�
__newobj__�assertListEqualr7r�	�assertDictEqualr��__base__�_reconstructorrZ�
__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�^�^�-�|�<rAc�����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).Nrg)i����r�i7���i���)�bacon�fish�cheeseio���c���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C1c����Sr�r�r/
s �r@�__getnewargs__z4PicklingTests.test_reduce.<locals>.C1.__getnewargs__Gs����rAN�r�r�r�r^
r�s�r@rr\
Fs���
rArr
c��eZdZd�Zy)�%PicklingTests.test_reduce.<locals>.C2c��y�Nzbad argsr�r�s r@r^
z4PicklingTests.test_reduce.<locals>.C2.__getnewargs__S���!rANr_
r�rAr@r�ra
R���
"rAr�rhc���eZdZ��fd�Zy)�%PicklingTests.test_reduce.<locals>.C3c�����fSr�r�)r;r<r=s ��r@�__getnewargs_ex__z7PicklingTests.test_reduce.<locals>.C3.__getnewargs_ex__\s
����f�~�%rAN�r�r�r�ri
r�s��r@rrg
[s���
&rArc���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C4c����dfS)Nzbad dictr�r/
s �r@ri
z7PicklingTests.test_reduce.<locals>.C4.__getnewargs_ex__ds����j�)�)rANrj
r�s�r@rrl
cs���
*rArc���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C5c���d�fS)Nz	bad tupler�)r;r=s �r@ri
z7PicklingTests.test_reduce.<locals>.C5.__getnewargs_ex__gs���#�V�,�,rANrj
)r=s�r@�C5ro
fs���
-rArq
c��eZdZd�Zy)�%PicklingTests.test_reduce.<locals>.C6c��y)Nr�r�r�s r@ri
z7PicklingTests.test_reduce.<locals>.C6.__getnewargs_ex__jrgrANrj
r�rAr@�C6rs
irirAru
c��eZdZd�Zy)�%PicklingTests.test_reduce.<locals>.C7c��yrc
r�r�s r@ri
z7PicklingTests.test_reduce.<locals>.C7.__getnewargs_ex__mrd
rANrj
r�rAr@�C7rw
lre
rAry
c���eZdZ�fd�Zy)�%PicklingTests.test_reduce.<locals>.C9c����ifSr�r�r/
s �r@ri
z7PicklingTests.test_reduce.<locals>.C9.__getnewargs_ex__ws
����b�z�!rANrj
r�s�r@�C9r{
vrrAr}
c��eZdZd�Zy)�&PicklingTests.test_reduce.<locals>.C10c��t�r�r8r�s r@ri
z8PicklingTests.test_reduce.<locals>.C10.__getnewargs_ex__~��� � rANrj
r�rAr@�C10r
}���
!rAr�
c���eZdZ�fd�Zy)�&PicklingTests.test_reduce.<locals>.C11c����Sr�r�rs �r@r�z3PicklingTests.test_reduce.<locals>.C11.__getstate__�s����rAN�r�r�r�r�r
s�r@�C11r�
�s���
rAr�
c��eZdZd�Zy)�&PicklingTests.test_reduce.<locals>.C12c��y)N�not dictr�r�s r@r�z3PicklingTests.test_reduce.<locals>.C12.__getstate__�rd
rANr�
r�rAr@�C12r�
�re
rAr�
r�
c��eZdZd�Zy)�&PicklingTests.test_reduce.<locals>.C13c��t�r�r8r�s r@r�z3PicklingTests.test_reduce.<locals>.C13.__getstate__�r�
rANr�
r�rAr@�C13r�
�r�
rAr�
c�*��eZdZeW��Z�fd�Zy)�&PicklingTests.test_reduce.<locals>.C14c�P���j�D]\}}t|||��yr��r8r^)r;r>rrs   �r@r5z/PicklingTests.test_reduce.<locals>.C14.__init__�s#���#(�;�;�=�K�D�%��D�$��.�$1rAN)r�r�r�r�r�r5r
s�r@�C14r�
�s����e��I�
/rAr�
c��eZdZy)�&PicklingTests.test_reduce.<locals>.C15NrGr�rAr@�C15r�
�rIrAr�
�quebeci����)rS
c��eZdZy)�&PicklingTests.test_reduce.<locals>.C16NrGr�rAr@�C16r�
�rIrAr�
�yukon)rR
)r��pickle�HIGHEST_PROTOCOLrV
r8r^rr�rH
r�r9rP
r�r7)r;�	protocolsrr$rQ
r>rr�rrrq
ru
ry
r�r}
r�
r�
r�
r�
r�
r�
r�
r<r=rs                      @@@r@�test_reducezPicklingTests.test_reduce@s����&�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)Nrgc��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���	rAc�"�|dvrt|��y)N)r^
ri
rcr�s  r@r�zCPicklingTests.test_special_method_lookup.<locals>.Picky.__getattr__�s���B�B�(��.�.�rAN)r�r�r�r�r�r�rAr@�Pickyr�
�s��
�
rAr�
rhr
)r�r�
r�
rV
)r;r�
r�
�protocolrs     r@r2z(PicklingTests.test_special_method_lookup�sQ���&�1�1�A�5�6�	�	�	�"�H�"�a�-�B�T�E����x�����>�"rAc	�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�rJr�)rrHr�rZr�r�	rr�rM
rJrL
r�rFrIr�)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��;rAc���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�)rQ
�dumps�loads)r;rQ
r�
r�
s    r@r5zEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__init__�s��"��
�"��
�"��
rAc�X�|j|j||j��Sr�)r�
r�
rQ
r(s  r@r�zAPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.copy�s ���z�z�$�*�*�S�$�*�*�"=�>�>rAc���dj|j|jj|jj|j
j|j
j�S)Nz0PickleCopier(proto={}, dumps={}.{}, loads={}.{}))rrQ
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�QrAN)r�r�r�rr5r�r�r�rAr@�PickleCopierr�
�s��4�
#�
?�
QrAr�
c3�(�K�|]	}�|����y�wr�r�)r�r<r�
s  �r@r�z9PicklingTests._generate_pickle_copiers.<locals>.<genexpr>�s%�����E�D�)-��d�#�D�s�rg)	�	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�	ErAc��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�rCNr�r�rAr@r�r�rrAr�rc��eZdZy)rHNrGr�rAr@rHrHrIrArHc�(�eZdZdZdgZd�Zd�Zd�Zy)r�z7A class with __getstate__ and __setstate__ implemented.rCc���t|di�j�}t|�jD]3}|jjdd�D]}	t||�||<��5|S#t$rY�$wxYw)NrJr�r�)rIr�rHrYrJr�r�)r;rr�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;rr�r�s    r@r�zC.__setstate__s"��!�K�K�M�D�A�q��D�!�Q�'�*rAc�T�t|�j�d|j��d�S)Nz()<r')rHr�r�r�s r@r�z
C.__repr__s ��%)�$�Z�%8�%8�$�:K�:K�:M�N�NrAN)r�r�r�rr�r�r�r�r�rAr@r�r�
s��E���I�
�
(�
OrAc��eZdZdZy)rHz!A subclass of a class with slots.Nr�r�rAr@rHrHs��/�rAc��eZdZdZdgZy)r�zA subclass with an extra slot.rUN)r�r�r�rr�r�rAr@r�r�$s��,���IrAr�)�
pickle_copierr�r�r�)
r�rr�r�
r�
rHr�r�
r-	r�r�
rCrU)r;r�
r�r�s    r@�test_pickle_slotszPicklingTests.test_pickle_slots�s���	�	�
�
�
�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�)ror5rCrU)r;rCrUrs   �r@r5zC1.__init__Fs����� �"������rAc�<�d|j�d|j�d�S)NzC1(r�r&
rTr�s r@r�zC1.__repr__Js��'+�v�v�t�v�v�6�6rA)	r�r�r�r�ARGS�NEED_DICT_COPYINGr5r�rrr|s@r@rrBs���H��D� $��
�
7rArc�J��eZdZdZdZdZ�fd�Z�fd�Zed��Z	d�Z
�xZS)r�z,A list subclass copyable via __getnewargs__.r�Fc�B��t�|�|�}||_||_|Sr��ror�rCrU)r�rCrUr;rs    �r@r�z
C2.__new__Rs$����w��s�+���������rAc�D��t�|��|jd�y�NrZ
)ror5r�)r;r<rs  �r@r5zC2.__init__Ws����� �"����H�%rAc��|jSr��r�
rAs r@r^
zC2.__getnewargs__\����x�x�rAc�T�d|j�d|j�dt|��d�S)NzC2(r��)<r'�rCrUr7r�s r@r�zC2.__repr___���+/�6�6�4�6�6�4��:�F�FrA)r�r�r�rr�
r�
r�r5r�r^
r�rrr|s@r@r�r�Ns5���:��D� %��
�

&�
�
 ��
 �
GrAr�c�:�eZdZdZdZdZd�Zed��Zd�Z	d�Z
y)	rz*A list subclass copyable via __getstate__.r�Fc�B�||_||_|jd�yr�
)rCrUr�r	s   r@r5zC3.__init__gs�����������H�%rAc��|jSr�r�
rAs r@r�zC3.__getstate__mr�
rAc�*�|\}}||_||_yr�rT)r;rrCrUs    r@r�zC3.__setstate__ps�����1������rAc�T�d|j�d|j�dt|��d�S)NzC3(r�r�
r'r�
r�s r@r�zC3.__repr__tr�
rAN)r�r�r�rr�
r�
r5r�r�r�r�r�rAr@rrcs4��8��D� %��
&��
 ��
 �
�
GrArc�@��eZdZdZdZdZ�fd�Zed��Zd�Z	�xZ
S)rz,An int subclass copyable via __getnewargs__.)rIrHrgFc�D��t�|�||�}||_||_|Sr�r�
�r�rCrUrr;rs     �r@r�z
C4.__new__|�&����w��s�E�2���������rAc��|jSr�r�
rAs r@r^
zC4.__getnewargs__�r�
rAc�T�d|j�d|j�dt|��d�S)NzC4(r�r�
r'�rCrUr.r�s r@r�zC4.__repr__����+/�6�6�4�6�6�3�t�9�E�ErA)r�r�r�rr�
r�
r�r�r^
r�rrr|s@r@rrxs0���:�(�D� %��
�
�
 ��
 �
FrArc�N��eZdZdZdZddiZdZdd��fd�
Zed	��Z	d
�Z
�xZS)rq
z/An int subclass copyable via __getnewargs_ex__.r�rrlFrrD	c�D��t�|�||�}||_||_|Sr�r�
r�
s     �r@r�z
C5.__new__�r�
rAc�2�|j|jfSr�)r�
�KWARGSrAs r@ri
zC5.__getnewargs_ex__�s�����#�*�*�-�-rAc�T�d|j�d|j�dt|��d�S)NzC5(r�r�
r'r�
r�s r@r�zC5.__repr__�r�
rA)r�r�r�rr�
r�
r�
r�r�ri
r�rrr|s@r@rq
rq
�s<���=��D��q�\�F� %��,-�
�
�
.��
.�
FrArq
)r�r�
r�
rhrA)rr7r�rr.rrq
r�
r�
r�
r-	rIr�
rQ
r�r�
r�
rJrr)
r;�test_classes�pickle_copiersr�r�
r=r$rQ
r�
�objcopy2s
          r@�test_reduce_copyingz!PicklingTests.test_reduce_copying?s���		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>.SNrGr�rAr@rcr�
�rIrArcc�.��eZdZW�d�gZ��fd�Zy)�(PicklingTests.test_issue24097.<locals>.Ar�c�H��|dk(r�d�g�jddyt�)Nr�r�)�
__slotnames__r�)r;rrrwrcs  ��r@r�z4PicklingTests.test_issue24097.<locals>.A.__getattr__�s'����6�>�*+�F�)��A�O�O�A�&��(�(rAN)r�r�r�r�
r�)rwrcs��r@rwr�
�s����v�Y�K�M�
)rArwrr�r�rh)r9rI
rK
rFrH
)r;rI
r�rwrcs   @@r@�test_issue24097zPicklingTests.test_issue24097�s\���	��	�	)�	)�	��&�&���t�f�b�\�.B�D�$�O�������*�*�1�-�x�8rAc��t�j�|jt�5t�jd�ddd�t�j	d�|jt�5t�j	�ddd�|jt�5t�j	d�ddd�y#1swY��xYw#1swY�MxYw#1swYyxYwr�)rZrP
rr�rH
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�rV
r�
r2r�
rbr�
r�
r�
r�
r�
r�rAr@rF
rF
 sS��-/��$� $��=�<y@�v?�<�4�E��E�0A+�Fz8�x9�")rArF
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>.ANrGr�rAr@rwr�
�rIrArwc��eZdZy)�)SharedKeyTests.test_subclasses.<locals>.BNrGr�rAr@rr�rIrArr�rCrgr�)r�rFr�r&�vars�
assertLessr�r�rS�wr�r�r��
assertGreater)r;rwrrmrCrUrs       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�rAr@r�
r�
�s�����H��HrAr�
c��eZdZdZd�Zd�Zy)�DebugHelperMetaz<
    Sets default __doc__ and simplifies repr() output.
    c�^�|jd��||d<tj||||�S)Nr)r�rHr�)r�r>rOr�s    r@r�zDebugHelperMeta.__new__�s0���9�9�Y��'�#�E�)���|�|�D�$��u�5�5rAc�,�t|j�Sr�)r�r�rAs r@r�zDebugHelperMeta.__repr__�s���C�L�L�!�!rAN)r�r�r�rr�r�r�rAr@rr�s���6�"rArc�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����	���
rAc�R�|j|k}|r|xjdz
c_|Sr�)r
)r;�limit�rets   r@�
step_untilzMroTest.step_untils%���y�y�5� ����I�I��N�I��
rAc�@��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)Nrgr�)rrKrHrr?s �r@rz8MroTest.test_incomplete_set_bases_on_self.<locals>.M.mros+����?�?�1�%��M�M�R�'�M��x�x��}�$rANr�r�s�r@r�rs���
%rAr�c��eZdZy)�4MroTest.test_incomplete_set_bases_on_self.<locals>.ANrGr�rAr@rwrrIrArwr<N�r�r;r�rws`  r@�!test_incomplete_set_bases_on_selfz)MroTest.test_incomplete_set_bases_on_selfs���	%��	%�	�!�	rAc����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)Nrrr�)rYr�rrKrHr)r�rwr;s ��r@rz3MroTest.test_reent_set_bases_on_base.<locals>.M.mro%s@����;�;�*�s�|�|�s�/B����r�*����r�)���x�x��}�$rANr�)rwr;s��r@r�r$s���
%rAr�c��eZdZy)�/MroTest.test_reent_set_bases_on_base.<locals>.ANrGr�rAr@rwr!-rIrArwr<c��eZdZy)�/MroTest.test_reent_set_bases_on_base.<locals>.BNrGr�rAr@rr#/rIrArr�N)rrK)r;r�rrws`  @r@�test_reent_set_bases_on_basez$MroTest.test_reent_set_bases_on_base s5���	%��	%�	�!�	�	��	�	���r��rAc�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�)rKrZrrHr)r�r�r;s  �r@rz:MroTest.test_reent_set_bases_on_direct_base.<locals>.M.mro8sA����}�}�Q�'���v�%����q�)����"�,���x�x��}�$rANr�r�s�r@r�r'7����
%rAr�c��eZdZy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.ANrGr�rAr@rwr+@rIrArwr<c��eZdZy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.BNrGr�rAr@rr-BrIrArc��eZdZy)�6MroTest.test_reent_set_bases_on_direct_base.<locals>.CNrGr�rAr@r�r/DrIrAr�Nr)r;r�rwrr�s`    r@�#test_reent_set_bases_on_direct_basez+MroTest.test_reent_set_bases_on_direct_base3s3���	%��	%�	�!�	�	��	�	��	rAc�����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�rKrHr)r�r5r6r;s ���r@rz9MroTest.test_reent_set_bases_tp_base_cycle.<locals>.M.mroXsB����:�:��|�|�t�+�(*�u����|�|�t�+�(*�u����x�x��}�$rANr�)r5r6r;s���r@r�r3Ws���
%rAr�c��eZdZy)�5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.ANrGr�rAr@rwr9`rIrArwr<c��eZdZy)�6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B1NrGr�rAr@r5r;brIrAr5c��eZdZy)�6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B2NrGr�rAr@r6r=drIrAr6Tr�N)rrrr�rK)r;r�rwr5r6s`  @@r@�"test_reent_set_bases_tp_base_cyclez*MroTest.test_reent_set_bases_tp_base_cycleGsi��� 	%�	%��	%�	�!�	�	��	�	��	���
�
�
�
�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�Fr7)r�r6r�r;s ���r@rz?MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.M.mrous3����:�:�#�,�,�#�"5�!&�D�J�#%�%�A�K��x�x��}�$rANr�)r6r�r;s���r@r�rAts���
%rAr�c��eZdZy)�;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.ANrGr�rAr@rwrE{rIrArwr<c��eZdZy)�<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B1NrGr�rAr@r5rG}rIrAr5c��eZdZy)�<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B2NrGr�rAr@r6rIrIrAr6c��eZdZy)�;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.CNrGr�rAr@r�rK�rIrAr�TN)rrrKrFr:)r;r�rwr5r6r�s`   @@r@�(test_tp_subclasses_cycle_in_update_slotsz0MroTest.test_tp_subclasses_cycle_in_update_slotsks����	%�	%��	%�	�!�	�	��	�	��	�	��	���
��e����t���������r�e�,�����*�*�,�q�c�2�����*�*�,�b�1��������t�,�����)�)�+�b�T�2rAc�������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>.ENrGr�rAr@r�rO�rIrAr�c���eZdZ����fd�Zy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.Mc����jr1|jdk(r"�j�fk(rd�_n
�f�_��tj	|�SrCr7)r�r6r�r�r;s ����r@rzAMroTest.test_tp_subclasses_cycle_error_return_path.<locals>.M.mro�sF����:�:�#�,�,�#�"5��{�{�r�e�+�%*��
�')�e������x�x��}�$rANr�)r6r�r�r;s����r@r�rQ�s
���
%�
%rAr�c��eZdZy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ANrGr�rAr@rwrT�rIrArwr<c��eZdZy)�>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B1NrGr�rAr@r5rV�rIrAr5c��eZdZy)�>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B2NrGr�rAr@r6rX�rIrAr6c��eZdZy)�=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.CNrGr�rAr@r�rZ�rIrAr�TN)
r-rrrrKrFrYr�rHr)r;r�rwr5r6r�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>.XNrGr�rAr@r�ra�s�� rA)rYr�rr�rHr)r�r�r;s  �r@rz-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)rAr�c��eZdZy)�)MroTest.test_incomplete_extend.<locals>.ANrGr�rAr@rwrc�rIrArwr<Nrrs`  r@�test_incomplete_extendzMroTest.test_incomplete_extend�s���	%��	%�	�!�	rAc�@��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�)rYrr�ro�xxxrHr)r�rr;s ��r@rz,MroTest.test_incomplete_super.<locals>.M.mro�sC����;�;�&��*�*�>�:��c�3�+�;��x�x��}�$�;�:�s�A�A)r�r�r�rrrrss@�r@r�rg�s
���
%�
%rAr�c��eZdZy)�(MroTest.test_incomplete_super.<locals>.ANrGr�rAr@rwrk�rIrArwr<Nrrs`  r@�test_incomplete_superzMroTest.test_incomplete_super�s���
	%��	%�	�!�	rAc����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>.BNrGr�rAr@rro�rIrArc���eZdZ��fd�Zy)�/MroTest.test_disappearing_custom_mro.<locals>.Mc����`�fSr�)r)r�rr�s ��r@rz3MroTest.test_disappearing_custom_mro.<locals>.M.mro�s����E��t�rANr�)rr�s��r@r�rq�s���
rAr�c��eZdZy)�/MroTest.test_disappearing_custom_mro.<locals>.ANrGr�rAr@rwrt�rrArwr<N)rrr�)r;rwrr�s  @@r@�test_disappearing_custom_mroz$MroTest.test_disappearing_custom_mro�sA���
	�	�	��	�
�
�
�y�
)�
�a�
�*�
)�
)�s�
A
�
AN)r�r�r�rr
rrr$r0r>rLr[rdrlrur�rAr@rrsA�����
��&�("�H"3�H 8�D�$� rAr�__main__)%rKrI
rTr�
r'r�
r0r2r�r7r3rjrjr�r�
contextlibrr	r�test.support.testcaserr�r�r�r4rr�r
r*
r3
rF
r�
rHrrr��mainr�rAr@�<module>rzsA����	���
�
�
�
������&��1�����
uD�H�%�%�uD�pVH�� 1� 1�?�VH�rP98�X�&�&�98�x�H�-�-��21��!�!�1�6w)�H�%�%�w)�t
H�X�&�&�H�4	"�d�	"�b�h���b�J�z���H�M�M�O���_v���I���
���I��s$�D#�D0�#D-�,D-�0D:�9D:

Youez - 2016 - github.com/yon3zu
LinuXploit