Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/test_descr.cpython-310.pyc
o

�9j��@s\ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZzddlZWneyQdZYnwGdd�de
j�ZGdd�de
j�ZGdd	�d	e
j�ZGd
d�de
j�ZGdd
�d
e
j�ZGdd�de
j�ZGdd�de
j�ZGdd�de�ZGdd�de
j�Zedkr�e
��dSdS)�N)�deepcopy)�supportc@s�eZdZdd�Zd0dd�Zd1d	d
�Zd2d
d�Zd3dd�Zd4dd�Zd5dd�Z	dd�Z
dd�Zgfdd�Zd d!�Z
d"d#�Zd$d%�Zd&d'�Ze�d(�d)d*��Ze�d(�d+d,��Zd-d.�Zd/S)6�
OperatorsTestcOs"tjj|g|�Ri|��idd�dd�dd�dd�d	d
�dd�d
d
�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"d#d$��|_t|j���D]\}}|��r]|d%}nd&|}||j|<qPddd'd(d)d*d+�|_t|j���D]\}}|��r�|d,}nd-|}||j|<qxdS).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�expr�r;�&/usr/lib/python3.10/test/test_descr.pyr0st��������	�
���
�����
�
�	
�zOperatorsTest.__init__�len(a)�__len__c	Cs�d|i}|�t||�|�t|�}t||�}||jvr%|jd}||jvs|�t|d|�|j|�|�||�|�t||�}|�|�|�dS)N�ar�im_func��assertEqual�eval�type�getattr�__dict__�	__bases__)	r6r?�resr:�meth�d�t�m�bmr;r;r<�	unop_testJs



�
zOperatorsTest.unop_test�a+b�__add__c
Cs�||d�}|�t||�|�t|�}t||�}||jvr&|jd}||jvs|�t|d|�|j|�|�|||�|�t||�}	|�|	|�|�dS)N�r?�brr@rA)
r6r?rRrHr:rIrJrKrLrMr;r;r<�
binop_testZs




�
zOperatorsTest.binop_test�a[b:c]�__getitem__cCs�|||d�}|�t||�|�t|�}t||�}	||jvr'|jd}||jvs|�t|	d|	�|j|�|�|	|t||��|�t||�}
|�|
t||��|�dS)N�r?rR�crr@)rBrCrDrErFrG�slice)r6r?rRrWrHr:rIrJrKrLrMr;r;r<�sliceop_testis



�
zOperatorsTest.sliceop_test�a+=b�__iadd__c
Cs�t|�|d�}t||�|�|d|�t|�}t||�}||jvr,|jd}||jvs"|�t|d|�|j|�t|�|d<||d|�|�|d|�t|�|d<t|d|�}	|	|�|�|d|�dS)NrQr?rr@�r�execrBrDrErFrG)
r6r?rRrH�stmtrIrJrKrLrMr;r;r<�
setop_testws 




�zOperatorsTest.setop_test�a[b]=c�__setitem__cCs�t|�||d�}t||�|�|d|�t|�}t||�}	||jvr-|jd}||jvs#|�t|	d|	�|j|�t|�|d<|	|d||�|�|d|�t|�|d<t|d|�}
|
||�|�|d|�dS)NrVr?rr@r\)r6r?rRrWrHr^rIrJrKrLrMr;r;r<�set2op_test�s 




�
zOperatorsTest.set2op_test�a[b:c]=dcCs�t|�|||d�}t||�|�|d|�t|�}	||	jvr)|	jd}	||	jvst|	|�}
|�t|
d|
�|	j|�t|�|d<|
|dt||�|�|�|d|�t|�|d<t|d|�}|t||�|�|�|d|�dS)N)r?rRrWrJr?rr@)rr]rBrDrFrGrErX)r6r?rRrWrJrHr^rI�
dictionaryrKrLrMr;r;r<�setsliceop_test�s 



�
zOperatorsTest.setsliceop_testc	Cs6|�dgdgddgdd�|�gd�dddd�|�gd�dd	dd�|�gd�ddd
d�|�gd�d	dddgdd�|�dgdgddgd
d�|�ddgdgd�dd�|�gd�ddd�|�ddgdgd�dd�|�ddgdgd�dd�|�ddgddddgdd�|�gd�ddddggd�dd�dS) N��rOrP�rfrg��b in a�__contains__�r�a[b]rUrTrZr[ri�rfrgrfrgrfrg�a*=b�__imul__r=r>�a*b�__mul__�b*a�__rmul__r`ra�rfrgrirl���rfrvrwrlrc)rSrYr_rNrbre�r6r;r;r<�
test_lists�s�zOperatorsTest.test_listsc	CsX|�ddd�dddd�|�ddd�dddd�|�ddd�dddd	�ddd�}g}t|���D]}|�|�q1g}t|�D]}|�|�q?|�||�g}|��D]}|�|�qS|�||�g}t�|�D]}|�|�qh|�||�ddd�}|�|dd
d�|�t	t
|�i�|�|�t	|��i�|�|�ddd�dddddd
�dd�dS)Nrgrl�rfrirfrjrkrrmrUr=r>rirhr`ra)
rSr2�keys�append�iterrB�__iter__�dictrNrC�repr�__repr__rb)r6rJ�l1�i�lr;r;r<�
test_dicts�s4

�zOperatorsTest.test_dictscCs�||d�}|j��D]\}}||vr)d|}t||�r)t||�}|�|||||�q
t|j���D]\}}||vrOd|}t||�rOt||�}|�||||�q1dS)NrQz__%s__)r1r3�hasattrrCrSr2r5rN)r6r?rR�skipr�r9r:rHr;r;r<�number_operators�s 


�

��zOperatorsTest.number_operatorscCs~|�dd�|�d��d�|�d��d�Gdd�dt�}|�|d�d�z|�dWn
ty7YdSw|�d	�dS)
N�drirfrc@�eZdZdd�ZdS)z"OperatorsTest.test_ints.<locals>.CcS�tS�N��NotImplemented�r6�otherr;r;r<rP��z*OperatorsTest.test_ints.<locals>.C.__add__N)�__name__�
__module__�__qualname__rPr;r;r;r<�C��r�rv�z+NotImplemented should have caused TypeError)r�rB�__bool__r)�	TypeError�fail�r6r�r;r;r<�	test_ints�s�zOperatorsTest.test_intscCs|�dd�dS)NgY@�@)r�ryr;r;r<�test_floats�zOperatorsTest.test_floatscCs�|jddgd�d�Gdd�dt�}|ddd	�}|�t|�d
�|�|jd�||dd	�}|�t|�d�|�|jd�|d
�}|�t|�d�|�|jd�dS)NyY@�@)	rrr%r&r)r*rr�mod)r�c@s&eZdZdgZdd�Zdd�ZeZdS)z,OperatorsTest.test_complexes.<locals>.Number�precc_s$tj|g|�R�}|�dd�|_|S)Nr��)�complex�__new__�getr�)�clsr7�kwds�resultr;r;r<r�sz4OperatorsTest.test_complexes.<locals>.Number.__new__cSsJ|j}|jdkrd||jfS|jdkrd||jfSd||j||jfS)N��%.*gz%.*gjz(%.*g+%.*gj))r��imag�real)r6r�r;r;r<r�s

z5OperatorsTest.test_complexes.<locals>.Number.__repr__N)r�r�r��	__slots__r�r��__str__r;r;r;r<�Numbers
r�g��Q�	@rw�r�z3.14rgz3.1gPm@z234.5r�)r�r�rBr�r�)r6r�r?r;r;r<�test_complexesszOperatorsTest.test_complexescCs2|�t�dd�tdd��|�t�dd�d�dS)Nr�g@r�rfg�)rBr��__radd__r*�__rsub__ryr;r;r<�test_explicit_reverse_methods'sz+OperatorsTest.test_explicit_reverse_methods�"the module 'xxsubtype' is internalc	Cs.ddl}ddl}d&dd�}||j|j<|�|dg�|dg�|ddg�dd�|�|gd��ddd	d
�|�|gd��ddd	d
�|�|gd��dddd
�|�|gd��dd|ddg�dd
�|�|dg�|dg�|ddg�dd�|�|ddg�d|gd��dd�|�|gd��ddd�|�|ddg�d|gd��dd�|�|ddg�d|gd��dd�|�|ddg�dd|ddg�dd�|�	|gd��dd|ddg�|gd ��d!d�Gd"d#�d#|j�}|�}|�
|g�|�
|��d�|�d$�|�
|d$g�|�
|�
�d�|�d%�|�
|�
�d%�dS)'NrcSsddl}|�|�S�Nr)�	xxsubtype�spamlist)r��memo�spamr;r;r<r�1s
z/OperatorsTest.test_spam_lists.<locals>.spamlistrfrgrOrPrhrjrkrlrmrUrTrZr[rirnrorpr=r>rqrrrsrtr`rarurvrwrxrcc@r�)z(OperatorsTest.test_spam_lists.<locals>.CcS�dS�Nrfr;ryr;r;r<�fooN�z,OperatorsTest.test_spam_lists.<locals>.C.fooN�r�r�r�r�r;r;r;r<r�Mr�r�r��*r�)�copyr��_deepcopy_dispatchr�rSrYr_rNrbrerBr�r}�getstate�setstate)r6r�r�r�r�r?r;r;r<�test_spam_lists,sP
 �� ������

zOperatorsTest.test_spam_listsc
Csddl}ddl}ddd�}||j|j<|�|ddd��dddd	�|�|ddd��dddd	�|�|ddd��ddd
d�|ddd��}g}t|���D]}|�|�qLg}t|�D]}|�|�qZ|�	||�g}|�
�D]}|�|�qn|�	||�g}t|i���
|�D]}|�|�q�|�	||�ddd�}||�}	|�|	ddd
�|�|	t
|�dd�|�|ddd��dd|dddd��dd�Gdd�d|j�}
|
�}|�	t|���g�|�	|��d�d|d<|�	t|���dg�|�	|��d�|�d�|�	|��d�dS)NrcSs2ddl}|��}t|���D]\}}|||<q|Sr�)r��spamdictr2r3)rJr�r��sd�k�vr;r;r<r�\s

z/OperatorsTest.test_spam_dicts.<locals>.spamdictrgrlr{rfrjrkrmrUr=r>zrepr(a)r�rirhr`rac@r�)z(OperatorsTest.test_spam_dicts.<locals>.CcSr�r�r;ryr;r;r<r��r�z,OperatorsTest.test_spam_dicts.<locals>.C.fooNr�r;r;r;r<r�r�r��barr��r�r�r�r�)r�r�r�r�rSr2r|r}r~rBrrDrNr�rbr3r�r�r�)r6r�r�r�rJr�r�r��	straightd�spamdr�r?r;r;r<�test_spam_dictsXsL

"�
zOperatorsTest.test_spam_dictscCs|�ttj���tj�dSr�)rB�range�sys�maxsizer>ryr;r;r<�test_wrap_lenfunc_bad_cast�sz(OperatorsTest.test_wrap_lenfunc_bad_castN)r=r>)rOrP)rTrU)rZr[)r`ra)rcra)r�r�r�r0rNrSrYr_rbrerzr�r�r�r�r�r�r�impl_detailr�r�r�r;r;r;r<rs(
0




!
+
1rcsFeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Z�fd)d*�Zejd+d,��Ze�d-�d.d/��Zd0d1�Zejd2d3��Ze�d-�d4d5��Zd6d7�Z d8d9�Z!d:d;�Z"e#j$d<d=��Z%d>d?�Z&e#j$d@dA��Z'dBdC�Z(dDdE�Z)dFdG�Z*e�dH�dIdJ��Z+dKdL�Z,dMdN�Z-dOdP�Z.dQdR�Z/e#�0e1j2j3dSkdT�dUdV��Z4ej5dWdX��Z6dYdZ�Z7d[d\�Z8d]d^�Z9�fd_d`�Z:dadb�Z;dcdd�Z<dedf�Z=dgdh�Z>didj�Z?dkdl�Z@dmdn�ZAdodp�ZBdqdr�ZCdsdt�ZDdudv�ZEdwdx�ZFdydz�ZGd{d|�ZHd}d~�ZIdd��ZJd�d��ZKd�d��ZLd�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZUd�d��ZVd�d��ZWd�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]d�d��Z^d�d��Z_d�d��Z`d�d��Zad�d��Zbe�d��d�d���Zcd�d��Zdd�d��Zed�d��Zfd�d��Zgd�d��Zhd�d��Zid�d��Zjd�dÄZkd�dńZld�dDŽZmd�dɄZnd�d˄Zod�d̈́Zpd�dτZqd�dфZrd�dӄZsd�dՄZtd�dׄZud�dلZvd�dۄZwd�d݄Zxd�d߄Zyd�d�Zzd�d�Z{d�d�Z|d�d�Z}d�d�Z~d�d�Zd�d�Z�d�d�Z�d�d�Z��fd�d�Z�e#�0e�d�ud��d�d���Z��Z�S)��ClassPropertiesAndMethodscC�|�t||�d||f�dS)Nz%r has no attribute %r)�
assertTruer��r6�objr9r;r;r<�
assertHasAttr��
�z'ClassPropertiesAndMethods.assertHasAttrcCr�)Nz%r has unexpected attribute %r)�assertFalser�r�r;r;r<�assertNotHasAttr�r�z*ClassPropertiesAndMethods.assertNotHasAttrc	s���ttt����it�t�}��|i���|jt���|t�G�fdd�dt�}��t|t��|d�}��|jd�|ddd�}��|ddkoR|dd�|�}��|jd	���|��d	�|�	d
���|jd
���|��d
�|�	d���|jd���|��d���|dd
�d
|d<��|dd
�d}t
|�D]}|�||<t
|�D]
}|||||<q�q�t
|�D]}t
|�D]}��|||||�q�q�dS)Ncs@eZdZdZ�fdd�Zdd�Z�fdd�Zdd	�Zd
d�ZdS)
z6ClassPropertiesAndMethods.test_python_dicts.<locals>.C���csH|r��t|�d�|d|_|r t|���D]
\}}|||<qdSdS�Nrfr)rB�len�stater2r3)�
self_localr?�kwr�r�ryr;r<r0�s

�z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.__init__cSs|�|d�Sr�)r��r6�keyr;r;r<rU��zBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__getitem__cs"��|td��t�|||�dSr�)�assertIsInstancerDr�ra)r�r��valueryr;r<ra��zBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__setitem__cS�
||_dSr��r��r6r�r;r;r<r���
z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.setstatecS�|jSr�r�ryr;r;r<r���z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.getstateN)	r�r�r�r�r0rUrar�r�r;ryr;r<r��sr�r�rfrgr�r�r�r�r�
r���2)r��
issubclassr�r�rB�assertIs�	__class__r�r�r�r�)	r6rJr��a1�a2r?�Nr��jr;ryr<�test_python_dicts�sF


���z+ClassPropertiesAndMethods.test_python_dictscCslGdd�dt�}|�}|�gd��|�|dd�|�|dd�|�|dd	�|�|dd
�d�dS)Nc@r�)z6ClassPropertiesAndMethods.test_python_lists.<locals>.CcSs&t|t�r|j|jfSt�||�dS�Nr�)�
isinstancerX�start�stopr2rU�r6r�r;r;r<rU�s
zBClassPropertiesAndMethods.test_python_lists.<locals>.C.__getitem__N�r�r�r�rUr;r;r;r<r��r�r��rrfrgrr�rf�erg�f��)r�r)r2�extendrB�r6r�r?r;r;r<�test_python_lists�sz+ClassPropertiesAndMethods.test_python_listscs�Gdd�dtd�}|�}|�|��d�|�d�|�|��d�Gdd�dt�}Gdd	�d	|d�}|�|��|�|�}|�|j|�Gd
d�dt�}Gdd�d|d�}|�|jd
�|�}|�|jd
�Gdd�dt��G�fdd�dt�}Gdd�d|d�}|�|jd�|�|j	d�|�
d|j�|�}|�|��d�G�fdd�dt��Gdd�d�d�}	Gdd�d|	�}
Gdd�d|	�}Gdd	�d	||
�}|�|��
�d�Gdd �d |
|�}|�|��
�d!�G�fd"d#�d#t��Gd$d�d�d�}	|	�}|�|d%�d&|_|�|jd&�|�|jd'�Gd(d)�d)���}Gd*d�d|d�}	Gd+d�d|	�}
Gd,d�d|	�}Gd-d	�d	||
�}|�|�jd�G�fd.d/�d/t��Gd0d�d�d�}|��jd
�|�}|�t|�|�|��jd
�Gd1d�dt�}|�}z|�Wn
t�y�Ynw|�d2�Gd3d�dt�}	Gd4d�dt�}
Gd5d�dt|	d�}Gd6d	�d	|
|�}|�|	t|��g�G�fd7d8�d8t�}
G�fd9d:�d:|
�}Gd;d�d|
d�}	|�d8g�����Gd<d�d|d�}
|�d:d8g�����Gd=d�d|	|
�}|�d:d8g�����|�
d>|j�Gd?d@�d@|
|	�}|�d:d8g�����|�
d>|j�GdAd	�d	|td�}|�d:d8g�����|�
d>|j�GdBd �d ||
d�}|�d:d8g�����|�
d>|j�t���fdCdD�}GdEdF�dF|d�}GdGdH�dHt|d�}GdIdJ�dJ||d�}|��|�|��|�|��|�g�G��fdKdL�dL�}G��fdMdN�dN|�}GdOd�d|d�}	|�|t|	��|�dLg�����|�dLg�����GdPd�d|d�}
|�|t|
��|�dNdLg�����|�dNdLg�����GdQd�d|	|
�}|�|t|��|�dNdLg�����|�dNdLg�����GdRd@�d@|
|	�}|�|t|��|�dNdLg�����|�dNdLg�����|�t��GdSd	�d	|td�}Wd�n	1�s|wYGdTd �d ||d�}|�|t|��|�dNdLg�����|�dNdLg�����GdUdV�dVt�|�}|�|t|��|�dNdLg�����|�dNdLg�����GdWdX�dX|t��}|�|t|��|�dNdLg�����|�dNdLg�����|�t��GdYdF�dF|t��}Wd�n	1�swY|�t��GdZdF�dFt�|�}Wd�dS1�s;wYdS)[Nc@�$eZdZdd�Zdd�Zdd�ZdS)�3ClassPropertiesAndMethods.test_metaclass.<locals>.CcS�
d|_dSr���	_C__stateryr;r;r<r0�r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.__init__cSr�r�rryr;r;r<r��r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.getstatecSr�r�rr�r;r;r<r��r�z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.setstateN�r�r�r�r0r�r�r;r;r;r<r���r���	metaclassrr�c@r�)z<ClassPropertiesAndMethods.test_metaclass.<locals>._metaclasscS�|Sr�r;�r�r;r;r<�myself�r�zCClassPropertiesAndMethods.test_metaclass.<locals>._metaclass.myselfN)r�r�r�rr;r;r;r<�
_metaclass�r�rc@�eZdZdS��3ClassPropertiesAndMethods.test_metaclass.<locals>.DN�r�r�r�r;r;r;r<�D��rc@r�)z4ClassPropertiesAndMethods.test_metaclass.<locals>.M1cSsd|d<t�||||�S)Nrf�__spam__�rDr�)r�r9�basesr�r;r;r<r��sz<ClassPropertiesAndMethods.test_metaclass.<locals>.M1.__new__N�r�r�r�r�r;r;r;r<�M1�r�r c@r�r
Nrr;r;r;r<r��rrfc@r)z;ClassPropertiesAndMethods.test_metaclass.<locals>._instanceNrr;r;r;r<�	_instance�rr"cs$eZdZedd��Z�fdd�ZdS)z4ClassPropertiesAndMethods.test_metaclass.<locals>.M2cSs t�|�}||_||_||_|Sr�)�objectr�r9rr�)r�r9rr�r6r;r;r<r��s

z<ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__new__cs<��}|jD]}|�d�rqt|||j|�||��q|S)N�__)r��
startswith�setattr�__get__)r6�itr��r"r;r<�__call__s

z=ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__call__N)r�r�r��staticmethodr�r*r;r)r;r<�M2�s
r,c@r�)r
cSr��Nr�r;ryr;r;r<r�r�z8ClassPropertiesAndMethods.test_metaclass.<locals>.C.spamN�r�r�r�r�r;r;r;r<r�
r�r;r�r�c�eZdZ��fdd�Z�ZS)z;ClassPropertiesAndMethods.test_metaclass.<locals>.autosupercsht�|��||||�}|dd�dkr!|dd�}|dd�dks|r(d|}nd}t||t|��|S)Nrf�_z
_%s__super�__super)�superr�r&)rr9rr�r�)r��	autosuperr;r<r�s��
zCClassPropertiesAndMethods.test_metaclass.<locals>.autosuper.__new__�r�r�r�r��
__classcell__r;)r3�r�r<r3�r3c@r�)�3ClassPropertiesAndMethods.test_metaclass.<locals>.AcSr��N�Ar;ryr;r;r<rI%r�z8ClassPropertiesAndMethods.test_metaclass.<locals>.A.methN�r�r�r�rIr;r;r;r<r:$r�r:c@r�)�3ClassPropertiesAndMethods.test_metaclass.<locals>.BcS�d|j��S�N�B��	_B__superrIryr;r;r<rI(�z8ClassPropertiesAndMethods.test_metaclass.<locals>.B.methNr;r;r;r;r<r?'r�r?c@r�)r
cSr=�Nr���	_C__superrIryr;r;r<rI+rBz8ClassPropertiesAndMethods.test_metaclass.<locals>.C.methNr;r;r;r;r<r�*r�c@r�)rcSr=�Nr)�	_D__superrIryr;r;r<rI.rBz8ClassPropertiesAndMethods.test_metaclass.<locals>.D.methNr;r;r;r;r<r-r��DCBAc@r�)�3ClassPropertiesAndMethods.test_metaclass.<locals>.EcSr=)N�E)�	_E__superrIryr;r;r<rI2rBz8ClassPropertiesAndMethods.test_metaclass.<locals>.E.methNr;r;r;r;r<rJ1r�rJ�EBCAcr/)z>ClassPropertiesAndMethods.test_metaclass.<locals>.autopropertyc	s�i}|��D];\}}|�d�r&|dd�}|�|d�\}}|}||f||<q|�d�rA|dd�}|�|d�\}}|}||f||<q|��D]
\}\}}t||�||<qFt�|��||||�S)N�_get_rv�NN�_set_)r3r%r��propertyr2r�)	rr9rr��hitsr��valr��set)r��autopropertyr;r<r�9s$

��zFClassPropertiesAndMethods.test_metaclass.<locals>.autoproperty.__new__r4r;)rTr6r<rT6r7rTc@�eZdZdd�Zdd�ZdS)r8cSs|jSr���_A__xryr;r;r<�_get_xK��:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xcSs||_dSr�rV�r6�xr;r;r<�_set_xMr�z:ClassPropertiesAndMethods.test_metaclass.<locals>.A._set_xN)r�r�r�rXr]r;r;r;r<r:J�r\r�i�c@r)z@ClassPropertiesAndMethods.test_metaclass.<locals>.multimetaclassNrr;r;r;r<�multimetaclassU�r_c@r�)r8cSr�r9r;ryr;r;r<rXYr�rZN�r�r�r�rXr;r;r;r<r:Xr�c@r�)r<cSr=r>)rArXryr;r;r<rX\rBz:ClassPropertiesAndMethods.test_metaclass.<locals>.B._get_xNrar;r;r;r<r?[r�c@r�)r
cSr=rC)rErXryr;r;r<rX_rBz:ClassPropertiesAndMethods.test_metaclass.<locals>.C._get_xNrar;r;r;r<r�^r�c@r�)rcSr=rF)rGrXryr;r;r<rXbrBz:ClassPropertiesAndMethods.test_metaclass.<locals>.D._get_xNrar;r;r;r<rar�cseZdZdZ�fdd�ZdS)z3ClassPropertiesAndMethods.test_metaclass.<locals>.Trc��jd7_dSr���counter�r6r7��Tr;r<r0i�z<ClassPropertiesAndMethods.test_metaclass.<locals>.T.__init__N)r�r�r�rdr0r;rfr;r<rggsrgc@rr!rr;r;r;r<r�krc@rr!rr;r;r;r<r�r�z5calling object w/o call method should raise TypeErrorc@r�)r8c_stj|i|��Sr�r�r7r8r;r;r<r�{�z;ClassPropertiesAndMethods.test_metaclass.<locals>.A.__new__Nrr;r;r;r<r:zr�c@r�r<Nrr;r;r;r<r?~rc@rr!rr;r;r;r<r��rc@rrrr;r;r;r<r�rcs.eZdZe��fdd��Zedd��Z�ZS)z7ClassPropertiesAndMethods.test_metaclass.<locals>.AMetac���d�t��||||�S)N�AMeta�r}r2r���mclsr9r�ns�r��	new_callsr;r<r���
z?ClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__new__cS�iSr�r;�rqr9rr;r;r<�__prepare__��zCClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__prepare__�r�r�r�r+r��classmethodrxr5r;�rtr6r<rn�s
rncs2eZdZe��fdd��Ze�fdd��Z�ZS)z7ClassPropertiesAndMethods.test_metaclass.<locals>.BMetacrm)N�BMetarorprsr;r<r��ruz?ClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__new__cst��||�}d|d<|S)NT�BMeta_was_here)r2rxrpr6r;r<rx�szCClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__prepare__rzr;r|r6r<r}�s
r}c@r�r8Nrr;r;r;r<r:�rc@rrlrr;r;r;r<r?�rc@rr!rr;r;r;r<r��rr~c@r�z4ClassPropertiesAndMethods.test_metaclass.<locals>.C2Nrr;r;r;r<�C2�rr�c@rrrr;r;r;r<r�rc@r�rINrr;r;r;r<rJ�rc��Sr�r;rj)�markerr;r<�func�r�z6ClassPropertiesAndMethods.test_metaclass.<locals>.funcc@r�z3ClassPropertiesAndMethods.test_metaclass.<locals>.XNrr;r;r;r<�X�rr�c@r)z3ClassPropertiesAndMethods.test_metaclass.<locals>.YNrr;r;r;r<�Y�rr�c@r)z3ClassPropertiesAndMethods.test_metaclass.<locals>.ZNrr;r;r;r<�Z�rr�cs.eZdZ��fdd�Ze�fdd��Z�ZS)z:ClassPropertiesAndMethods.test_metaclass.<locals>.ANotMetac���d�t��|�S�N�ANotMetaro�rqr7r8rsr;r<r���
zBClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__new__cs��d�iSr��r}rw)�
prepare_callsr;r<rx�s
zFClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__prepare__�r�r�r�r�r{rxr5r;�rtr�r6r<r��sr�cs0eZdZ��fdd�Ze��fdd��Z�ZS)z:ClassPropertiesAndMethods.test_metaclass.<locals>.BNotMetacr��N�BNotMetaror�rsr;r<r��r�zBClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__new__cs��d�t��||�Sr�)r}r2rxrw)r�r�r;r<rx�s
zFClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__prepare__r�r;r�r6r<r��sr�c@rrrr;r;r;r<r:�rc@rrlrr;r;r;r<r?�rc@rr!rr;r;r;r<r��rc@rr�rr;r;r;r<r�rc@rrrr;r;r;r<rrc@rr�rr;r;r;r<rJrc@r)z3ClassPropertiesAndMethods.test_metaclass.<locals>.FNrr;r;r;r<�Frr�c@r)z4ClassPropertiesAndMethods.test_metaclass.<locals>.F2Nrr;r;r;r<�F2rr�c@rr�rr;r;r;r<r�*rc@rr�rr;r;r;r<r�-r)rDrBr�r�rr�rr#r9r�assertInr�r�rIr�r\rWrdr�r�r��clearrF�assertRaisesr))r6r�r?rrrJr rWr,r:r?rJr_rnr}r�r�r�r�r�r�r�r�r�r;)rgr"rTr3r�rtr�r<�test_metaclass�s&

		��$�z(ClassPropertiesAndMethods.test_metaclasscs�g�tt��G��fdd�d��}|d�}d|_|j}|`|��gd��zGdd�dtjt�}Wn	ty:Ynw|�d�d	d
��Gdd�d����fd
d�t	d�D�}|���
�|�dS)NcsBeZdZ�fdd�Z��fdd�Z��fdd�Z��fdd�Zd	S)
z<ClassPropertiesAndMethods.test_module_subclasses.<locals>.MMcs��||�dSr�)r0�r6r9)�MTr;r<r05rkzEClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__init__cs��d|f���||�S)NrE)r}�__getattribute__r��r��logr;r<r�7szMClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__getattribute__cs"��d||f���|||�dS)Nr&)r}�__setattr__�r6r9r�r�r;r<r�:r�zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__setattr__cs��d|f���||�dS)N�delattr)r}�__delattr__r�r�r;r<r�=szHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__delattr__N)r�r�r�r0r�r�r�r;r�r;r<�MM4s
r�r?r�))r&r�r��rEr�)r�r�c@r)z@ClassPropertiesAndMethods.test_module_subclasses.<locals>.ModuleNrr;r;r;r<�ModuleJrr�z?inheriting from ModuleType and str at the same time should failcSsd�tjtjdd��S)Nr�r�)r�)�join�random�choices�string�
ascii_lettersr;r;r;r<�random_nameS�zEClassPropertiesAndMethods.test_module_subclasses.<locals>.random_namec@r)z;ClassPropertiesAndMethods.test_module_subclasses.<locals>.ANrr;r;r;r<r:Urr:csg|]
}t���fi��qSr;�rD��.0r�)r:r�r;r<�
<listcomp>WszDClassPropertiesAndMethods.test_module_subclasses.<locals>.<listcomp>r�)rDr�r�rB�types�
ModuleType�strr�r�r��__subclasses__)r6r�r?r\r��
subclassesr;)r:r�r�r�r<�test_module_subclasses0s$�
z0ClassPropertiesAndMethods.test_module_subclassescsLGdd�dt����}|�|��d�|�d�|�|��d�G�fdd�dt��}|�}|�t|���g�d|d<|�t|���d	g�|�|dd�|�|��d�|�d�|�|��d�|�|j|t�tf�Gd
d�dt�}Gdd
�d
|t�}|�|��	�d�|�t
|��d�|�|��	�d�|�t
|��d�dS)Nc@r	)z>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.CcSrr�rryr;r;r<r0]r�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.__init__cSr�r�rryr;r;r<r�_r�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.getstatecSr�r�rr�r;r;r<r�ar�zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.setstateNrr;r;r;r<r�\rr�rr�c�eZdZ�fdd�ZdS)z>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Dcsti��|���|�dSr�)rDr0ry�r�r;r<r0hszGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.D.__init__N�r�r�r�r0r;r�r;r<rg�r�world�hello)r�r�c@rU)zAClassPropertiesAndMethods.test_multiple_inheritance.<locals>.NodecSst|���Sr�)r)r�ryr;r;r<�__int__wr�zIClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.__int__cSr�)N�23r;ryr;r;r<r�yr�zEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.fooN)r�r�r�r�r�r;r;r;r<�Nodevr^r�c@r�)zAClassPropertiesAndMethods.test_multiple_inheritance.<locals>.FragcSr�)N�42r;ryr;r;r<r�|r�zEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Frag.fooNr�r;r;r;r<�Frag{r�r��r�)r#rBr�r�r�r2r|r3�__mro__r�r))r6r?rrJr�r�r;r�r<�test_multiple_inheritanceZs*

z3ClassPropertiesAndMethods.test_multiple_inheritancecCs�Gdd�dt�}|�|���d�Gdd�d|�}|�|���d�|�|���d�Gdd�d|�}|�|���d�|�|���d�Gdd�d||�}|�|���d�|�|���d�|�|j||||tf�Gd	d
�d
||�}|�|���d�|�|���d�|�|j||||tf�zGdd�d||�}Wn	ty�Ynw|�d
�zGdd�d||�}Wn
ty�YdSw|�d�dS)Nc@r�)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.AcSr�r9r;ryr;r;r<r��r�zBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.A.spamNr.r;r;r;r<r:�r�r:c@rU)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.BcSr�r>r;ryr;r;r<�boo�r�zAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.boocSr�r>r;ryr;r;r<r��r�zBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.spamN)r�r�r�r�r�r;r;r;r<r?��r?c@r�)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.CcSr�rCr;ryr;r;r<r��r�zAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.C.booN)r�r�r�r�r;r;r;r<r��r�r�c@r)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.DNrr;r;r;r<r�rirc@r)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.ENrr;r;r;r<rJ�rirJc@r)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.FNrr;r;r;r<r��rir�z#expected MRO order disagreement (F)c@r)z=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.GNrr;r;r;r<�G�rir�z#expected MRO order disagreement (G))r#rBr�r�r�r�r�)r6r:r?r�rrJr�r�r;r;r<�test_diamond_inheritance�s8�
�z2ClassPropertiesAndMethods.test_diamond_inheritancec
Cs�Gdd�dt�}Gdd�dt�}Gdd�dt�}Gdd�d|�}Gd	d
�d
|�}Gdd�d||||�}|�|j||||||tf�dS)
Nc@r)z<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ANrr;r;r;r<r:�rir:c@r)z<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.BNrr;r;r;r<r?�rir?c@r)z<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.CNrr;r;r;r<r��rir�c@r)z<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.XNrr;r;r;r<r��rir�c@r)z<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.YNrr;r;r;r<r��rir�c@r)z<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ZNrr;r;r;r<r��rir��r#rBr�)r6r:r?r�r�r�r�r;r;r<�test_ex5_from_c3_switch�s z1ClassPropertiesAndMethods.test_ex5_from_c3_switchc	Cs�Gdd�dt�}Gdd�d|�}Gdd�d|�}Gdd�d|�}Gd	d
�d
|�}Gdd�d||�}Gd
d�d|�}Gdd�d||�}|�|j|||||tf�|�|j||||tf�|�|j||||||||tf	�dS)Nc@r)z9ClassPropertiesAndMethods.test_monotonicity.<locals>.BoatNrr;r;r;r<�Boat�rir�c@r)z<ClassPropertiesAndMethods.test_monotonicity.<locals>.DayBoatNrr;r;r;r<�DayBoat�rir�c@r)z>ClassPropertiesAndMethods.test_monotonicity.<locals>.WheelBoatNrr;r;r;r<�	WheelBoat�rir�c@r)z?ClassPropertiesAndMethods.test_monotonicity.<locals>.EngineLessNrr;r;r;r<�
EngineLess�rir�c@r)zCClassPropertiesAndMethods.test_monotonicity.<locals>.SmallMultihullNrr;r;r;r<�SmallMultihull�rir�c@r)zCClassPropertiesAndMethods.test_monotonicity.<locals>.PedalWheelBoatNrr;r;r;r<�PedalWheelBoat�rir�c@r)zCClassPropertiesAndMethods.test_monotonicity.<locals>.SmallCatamaranNrr;r;r;r<�SmallCatamaran�rir�c@r)z;ClassPropertiesAndMethods.test_monotonicity.<locals>.PedaloNrr;r;r;r<�Pedalo�rir�r�)	r6r�r�r�r�r�r�r�r�r;r;r<�test_monotonicity�s&��
��z+ClassPropertiesAndMethods.test_monotonicityc
Cs�Gdd�dt�}Gdd�dt�}Gdd�dt�}Gdd�d||�}Gd	d
�d
||�}Gdd�d||�}|�|j||||||tf�dS)
Nc@r)zAClassPropertiesAndMethods.test_consistency_with_epg.<locals>.PaneNrr;r;r;r<�Pane�rir�c@r)zKClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollingMixinNrr;r;r;r<�ScrollingMixin�rir�c@r)zIClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditingMixinNrr;r;r;r<�EditingMixin�rir�c@r)zKClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollablePaneNrr;r;r;r<�ScrollablePane�rir�c@r)zIClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditablePaneNrr;r;r;r<�EditablePane�rir�c@r)zSClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditableScrollablePaneNrr;r;r;r<�EditableScrollablePane�rir�r�)r6r�r�r�r�r�r�r;r;r<�test_consistency_with_epg�s��z3ClassPropertiesAndMethods.test_consistency_with_epgcs�d}�fdd�}Gdd�dt�}Gdd�d|�}Gdd	�d	t�}|td
td||fi�|t|td||fi�|t|td|||fi�Gdd
�d
t�}Gdd�d|�}Gdd�d|�}Gdd�d||�}	Gdd�d||�}
|t|td|	|
fi�dS)NzCCannot create a consistent method resolution
order (MRO) for bases c
s�z||�Wn7|y=}z+t��r+t|��|�s2��dt|�|f�WYd}~dSWYd}~dSWYd}~dSd}~ww��d|�dS)NzMessage %r, expected %rzExpected %s)r�check_impl_detailr�r%r�)�exc�expected�callabler7�msgryr;r<�raises�s
����z?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.raisesc@r)z:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.ANrr;r;r;r<r:�rir:c@r)z:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.BNrr;r;r;r<r?�rir?c@r)z:ClassPropertiesAndMethods.test_mro_disagreement.<locals>.CNrr;r;r;r<r��rir�zduplicate base class Ar�c@r)zCClassPropertiesAndMethods.test_mro_disagreement.<locals>.GridLayoutNrr;r;r;r<�
GridLayout�rir�c@r)zGClassPropertiesAndMethods.test_mro_disagreement.<locals>.HorizontalGridNrr;r;r;r<�HorizontalGrid�rir�c@r)zEClassPropertiesAndMethods.test_mro_disagreement.<locals>.VerticalGridNrr;r;r;r<�VerticalGrid�rir�c@r)z?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.HVGridNrr;r;r;r<�HVGrid�rir�c@r)z?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.VHGridNrr;r;r;r<�VHGrid�rir��ConfusedGrid)r#r�rD)r6�mro_err_msgr�r:r?r�r�r�r�r�r�r;ryr<�test_mro_disagreement�s,����z/ClassPropertiesAndMethods.test_mro_disagreementc	Cs�t�}|�|jt�|�t|�t�t�}|�||�|�|d�zd|_Wnttfy1Ynw|�	d�|�t�d�Gdd�dt�}|�}|�|j
i�d|_|�|jd�|�|j
ddi�dS)Nr�r�z1object() should not allow setting a foo attributerFc@r)z:ClassPropertiesAndMethods.test_object_class.<locals>.CdictNrr;r;r;r<�Cdictrr�rf)r#rBr�rD�assertNotEqualr�r��AttributeErrorr�r�rF)r6r?rRr�r\r;r;r<�test_object_class�s&
�
z+ClassPropertiesAndMethods.test_object_classc
CsZGdd�dtj�}t�d�}|�|jtju�|�t|d��||_|�|j|u�|�t|d��tj|_|�|jtju�|�t|d��Gdd�dt�}|�t��|d_Wd�n1sbwYGdd	�d	t	�}|�t��|d
_Wd�n1s�wYGdd�dt
�}|�t��|d
_Wd�n1s�wYGdd�dt�}|�t��|d_Wd�n1s�wYGdd�dt�}|�t��|d_Wd�n1s�wYGdd�dt
�}|�t��|d_Wd�n	1�swYGdd�dt�}	|�t��
|	t�_Wd�dS1�s&wYdS)Nc@�eZdZdZdS)zjClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.SubTyperfN�r�r�r�r?r;r;r;r<�SubType�r�rLr?c@r�)zhClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyIntr;N�r�r�r�r�r;r;r;r<�MyInt-r�r�rfc@r�)zjClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFloatr;Nr�r;r;r;r<�MyFloat2r�r���?c@r�)zlClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyComplexr;Nr�r;r;r;r<�	MyComplex7r�r�y�?@c@r�)zhClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyStrr;Nr�r;r;r;r<�MyStr<r�r�c@r�)zjClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyBytesr;Nr�r;r;r;r<�MyBytesAr�r��ac@r�)zjClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyTupler;Nr�r;r;r;r<�MyTupleFr�r�r;c@r�)znClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFrozenSetr;Nr�r;r;r;r<�MyFrozenSetKr�r�)r�r�r�r�r�r�r)r�r�r*r�r��bytes�tuple�	frozenset)
r6r�rLr�r�r�r�r�r�r�r;r;r<�?test_object_class_assignment_between_heaptypes_and_nonheaptypessL
������
$�zYClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypesc	s�Gdd�dt�}|�}��|d���|d�Gdd�dt�}|�}��|d���|d�d|_��|jd�d|_��|jd�|`��|d�Gd	d
�d
t�}|�}��|d���|d���|d���|d�d|_d
|_d|_��|jd���|jd
���|jd�Gdd�dt�}|d�}��|d���|d���|��d�zd|_Wn	ty�Ynw��	d�z
Gdd�dt�}Wn	t
y�Ynw��	d�z
Gdd�dt�}Wn	t
y�Ynw��	d�z
Gdd�dt�}Wn
t
�yYnw��	d�z
Gdd�dt�}Wn
t
�yYnw��	d�z
Gdd�dt�}Wn
t
�y9Ynw��	d�Gd d�dt�}Gd!d�dt�}|�}d|_��|jd�Gd"d�dt�}|�}d|_��|jd�d#�G�fd$d�dt�}|�}d|_��|jd���
t�d%�t�z
Gd&d�dt�}Wnt
tf�y�Ynw��	d'�G�fd(d)�d)t��Gd*d�dt�}|�}��|_��|_��|_���jd�~t�����jd%�Gd+d,�d,|�}|�}��|_��|_���jd
�~t�����jd%�Gd-d.�d.|�}	|	�}��|_��|_��|_���jd�~t�����jd%�Gd/d0�d0t�}
|
�}��|g|_���jd�d}t�����jd%�ttd1��r�Gd2d3�d3t�}|�}
tt���}td4�D]}|
|
k�qttt���}��||�G�fd5d6�d6t�}t�d7��}|�}~Wd�n	1�s�wY��|��d8�Gd9d:�d:t�}��t��|�`Wd�n	1�s�wYGd;d:�d:t�}��td<��
|�jWd�dS1�s�wYdS)=Nc@�eZdZgZdS)z0ClassPropertiesAndMethods.test_slots.<locals>.C0Nr�r;r;r;r<�C0Rr�rrFr�c@�eZdZdgZdS)z0ClassPropertiesAndMethods.test_slots.<locals>.C1r?Nr�r;r;r;r<�C1X�
rr?rfc@�eZdZgd�ZdS)z0ClassPropertiesAndMethods.test_slots.<locals>.C3rVNr�r;r;r;r<�C3dr�rrRrWrgric@s&eZdZdZdgZdd�Zdd�ZdS)z0ClassPropertiesAndMethods.test_slots.<locals>.C4zValidate name mangling�__acSr�r���_C4__a�r6r�r;r;r<r0ur�z9ClassPropertiesAndMethods.test_slots.<locals>.C4.__init__cSr�r�rryr;r;r<r�wr�z4ClassPropertiesAndMethods.test_slots.<locals>.C4.getN)r�r�r��__doc__r�r0r�r;r;r;r<�C4rs
rrvrrwz$Double underscored names not mangledc@seZdZdgZdS��/ClassPropertiesAndMethods.test_slots.<locals>.CNr�r;r;r;r<r��rr�z[None] slots not caughtc@r)rzfoo barNr�r;r;r;r<r��rz['foo bar'] slots not caughtc@r)rzfoobarNr�r;r;r;r<r��rz['foo\0bar'] slots not caughtc@r)r�1Nr�r;r;r;r<r��rz['1'] slots not caughtc@r)rr�Nr�r;r;r;r<r��rz[''] slots not caughtc@r)r)r?�a_b�_a�A0123456789ZNr�r;r;r;r<r��r�c@r��r�abcNr�r;r;r;r<r��r�c@r�rr�r;r;r;r<r��r�r�c�eZdZ�ZdSr
r�r;)�slotsr;r<r��r�rc@seZdZed�gZdS)r�N)r�r�r��chrr�r;r;r;r<r���zhr(128)] slots not caughtcs(eZdZdZ�fdd�Z�fdd�ZdS)z5ClassPropertiesAndMethods.test_slots.<locals>.Countedrcrbr�rcry��Countedr;r<r0�rhz>ClassPropertiesAndMethods.test_slots.<locals>.Counted.__init__cs�jd8_dSr�rcryrr;r<�__del__�rhz=ClassPropertiesAndMethods.test_slots.<locals>.Counted.__del__N)r�r�r�rdr0rr;rr;r<r�src@r)rrVNr�r;r;r;r<r��r�c@r)z/ClassPropertiesAndMethods.test_slots.<locals>.DNrr;r;r;r<r�rrc@r)z/ClassPropertiesAndMethods.test_slots.<locals>.E�eNr�r;r;r;r<rJ�rrJc@�eZdZddgZdS)z/ClassPropertiesAndMethods.test_slots.<locals>.Fr?rRNr�r;r;r;r<r��r�r��get_objectsc@r�)z/ClassPropertiesAndMethods.test_slots.<locals>.GcSr�)NFr;r�r;r;r<�__eq__�r�z6ClassPropertiesAndMethods.test_slots.<locals>.G.__eq__N�r�r�r�r r;r;r;r<r��r�r�r�cs(eZdZddgZdd�Z�fdd�ZdS)z/ClassPropertiesAndMethods.test_slots.<locals>.Hr?rRcS�d|_d|_dS�NrfrgrQryr;r;r<r0
�
z8ClassPropertiesAndMethods.test_slots.<locals>.H.__init__cs ��|jd���|jd�dSr#)rBr?rR)�self_ryr;r<r
sz7ClassPropertiesAndMethods.test_slots.<locals>.H.__del__N)r�r�r�r�r0rr;ryr;r<�Hsr&�stderrr�c@r��z/ClassPropertiesAndMethods.test_slots.<locals>.Xr?Nr�r;r;r;r<r�r�r�c@r�r(r�r;r;r;r<r�r�z'X' object has no attribute 'a')r#r�r?rBrRrWr��_ClassPropertiesAndMethods__ar�r�r�rr�r�rDr��UnicodeEncodeErrorrdr�
gc_collect�zrr��gcr�rr��captured_output�getvaluer��assertRaisesRegex)r6rr\rrrr�rWrrJr��sr��g�orig_objectsr��new_objectsr&�hr�r;)rr6rr<�
test_slotsPs 
�
�
�
�
�
�
�
��
$�z$ClassPropertiesAndMethods.test_slotscCs0Gdd�dt�}|�}|�|d�|�|d�d|_|�|jddi�Gdd�dt�}|�}|�|d�|�|d�zd|_Wn	tyHYnw|�d	�Gd
d�d||�}|�}|�|d�|�|d�d|_|�|jddi�Gdd
�d
||�}|�}|�|d�|�|d�d|_|�|jddi�dS)Nc@r)z7ClassPropertiesAndMethods.test_slots_special.<locals>.DrFNr�r;r;r;r<r"rrrF�__weakref__r�r�c@r)z7ClassPropertiesAndMethods.test_slots_special.<locals>.Wr7Nr�r;r;r;r<�W*rr8z!shouldn't be allowed to set a.fooc@r)z8ClassPropertiesAndMethods.test_slots_special.<locals>.C1Nr�r;r;r;r<r6r�rc@r)z8ClassPropertiesAndMethods.test_slots_special.<locals>.C2Nr�r;r;r;r<r�>r�r�)r#r�r�r�rBrFr�r�)r6rr?r8rr�r;r;r<�test_slots_special s8
�
z,ClassPropertiesAndMethods.test_slots_specialc	s`G�fdd�dt�}Gdd�d�}Gdd�d||dd�}��|jdtj�|�}��|jd	���|d�d	|_��|jd	���	t
��Gd
d�d�}Wd�n1sWwYGdd
�d
|dd�}��|j|jdd�d
���|jdtj�|�}��|d�d|_��|jd���	t
��Gdd�d�}Wd�dS1s�wYdS)Ncr/)z;ClassPropertiesAndMethods.test_slots_special2.<locals>.Metacs��||�t��||||�Sr�)r�r2r�)r�r9r�	namespace�attr�r�r6r;r<r�IszCClassPropertiesAndMethods.test_slots_special2.<locals>.Meta.__new__r4r;ryr6r<�MetaH�r=c@r�)z9ClassPropertiesAndMethods.test_slots_special2.<locals>.C1cSrr-)rRryr;r;r<r0Nr�zBClassPropertiesAndMethods.test_slots_special2.<locals>.C1.__init__Nr�r;r;r;r<rMr�rcs"eZdZdgZ�fdd�Z�ZS)z9ClassPropertiesAndMethods.test_slots_special2.<locals>.C2r5cst���dSr��r2r0ryr6r;r<r0RrBzBClassPropertiesAndMethods.test_slots_special2.<locals>.C2.__init__)r�r�r�r�r0r5r;r;r6r<r�Psr�r5)rr;r�c@�eZdZdZdgZdS)z9ClassPropertiesAndMethods.test_slots_special2.<locals>.C3r�r5N)r�r�r�r5r�r;r;r;r<r\�
rc@r)z9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q1r�Nr�r;r;r;r<�Q1`rrBr�����qc@seZdZe�ZdgZdS)z9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q2r�N)r�r�r�r#r�r;r;r;r<�Q2j�
rE)rDr�rFr��MemberDescriptorTyperBrRr�r5r�r�r�)	r6r=rr�rWrrBrDrEr;ryr<�test_slots_special2Fs4���"�z-ClassPropertiesAndMethods.test_slots_special2cCs`ddl}Gdd�d|jd�}Gdd�dt�}|�|�|�}|�||�|�t|jj|d�dS)Nrc@r�)z>ClassPropertiesAndMethods.test_slots_descriptor.<locals>.MyABCr?Nr�r;r;r;r<�MyABCrr�rIrc@r)zBClassPropertiesAndMethods.test_slots_descriptor.<locals>.UnrelatedNrr;r;r;r<�	UnrelatedurrJri)	r�ABCMetar#�registerr�r�r�r?�__set__)r6rrIrJ�ur;r;r<�test_slots_descriptorns
z/ClassPropertiesAndMethods.test_slots_descriptorcCsFGdd�dt�}Gdd�d|�}Gdd�d|�}d|_|�|jd�|�|jd�|�|jd�Gdd	�d	t�}|�}|�|d
�d|_|�|jd�dd
�|_|�|��d�dd
�|_|�t|�d�dd
�|_|�t	|�d�|�|jd�|�|d�dd�}||_
|�|jd�d|_|�|jd�dd�}||_
zd|_Wn	ty�Ynw|�d�|�|jd�Gdd�d|�}|�}d|_|�|jd�Gdd�dt	�}	|�d|	d�d�|�|	d�dd�|�d|	d �d!�|�|	d �dd!�|�|	d �|	d�d!�Gd"d#�d#t�}
Gd$d%�d%|
d&�}|�|t�dS)'Nc@r�z2ClassPropertiesAndMethods.test_dynamics.<locals>.DNrr;r;r;r<r�rrc@r)z2ClassPropertiesAndMethods.test_dynamics.<locals>.ENrr;r;r;r<rJ�rrJc@r)z2ClassPropertiesAndMethods.test_dynamics.<locals>.FNrr;r;r;r<r��rr�rfc@r)z2ClassPropertiesAndMethods.test_dynamics.<locals>.CNrr;r;r;r<r��rr��foobarrgcSr�r-r;ryr;r;r<�<lambda>�r�z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>r�cSr�)N�C()r;ryr;r;r<rR�r�rScSr�r�r;ryr;r;r<rR�r�r�r�cSs|dkrdSt��Nr��r�r�r;r;r<�	mygetattr�sz:ClassPropertiesAndMethods.test_dynamics.<locals>.mygetattrr�cSs|dkrt�t�|||�SrT)r�r#r�r�r;r;r<�	mysetattr�sz:ClassPropertiesAndMethods.test_dynamics.<locals>.mysetattrznot spamzexpected AttributeErrorc@rrPrr;r;r;r<r�rc@r)z2ClassPropertiesAndMethods.test_dynamics.<locals>.INrr;r;r;r<�I�rrXr?�aarirwc@r)zAClassPropertiesAndMethods.test_dynamics.<locals>.dynamicmetaclassNrr;r;r;r<�dynamicmetaclass�rrZc@r)z:ClassPropertiesAndMethods.test_dynamics.<locals>.someclassNrr;r;r;r<�	someclass�rr[r)r#r�rBr�rQ�methodr�r�r�r)�__getattr__r��newr�r�r�rDr�)r6rrJr�r�r?rVrWrJrXrZr[r;r;r<�
test_dynamicss^



�
z'ClassPropertiesAndMethods.test_dynamicscCs�zGdd�dtt�}Wn	tyYnw|�d�zGdd�dtd�}Wn	ty.Ynw|�d�Gdd�d�}zGdd�dtt��}Wn	tyPYnw|�d	�z
Gd
d�dt�}Wn	tyiYnw|�d�z
Gdd�dt�}Wn	ty�Ynw|�d
�Gdd�dt�}Gdd�dt�}Gdd�dt|d�}Gdd�dt|d�}zGdd�d||�}Wn
ty�YdSw|�d�dS)Nc@r��0ClassPropertiesAndMethods.test_errors.<locals>.CNrr;r;r;r<r��rr�z5inheritance from both list and dict should be illegalc@rr`rr;r;r;r<r��rz+inheritance from non-type should be illegalc@r)z6ClassPropertiesAndMethods.test_errors.<locals>.ClassicNrr;r;r;r<�Classic�rrbc@rr`rr;r;r;r<r��rz,inheritance from CFunction should be illegalc@r��rarfNr�r;r;r;r<r��r�z__slots__ = 1 should be illegalc@rrcr�r;r;r;r<r��rz!__slots__ = [1] should be illegalc@r)z1ClassPropertiesAndMethods.test_errors.<locals>.M1Nrr;r;r;r<r �rr c@r)z1ClassPropertiesAndMethods.test_errors.<locals>.M2Nrr;r;r;r<r,�rr,c@r)z1ClassPropertiesAndMethods.test_errors.<locals>.A1Nrr;r;r;r<�A1�rrdrc@r)z1ClassPropertiesAndMethods.test_errors.<locals>.A2Nrr;r;r;r<�A2�rrec@r)z0ClassPropertiesAndMethods.test_errors.<locals>.BNrr;r;r;r<r?�rr?z5finding the most derived metaclass should have failed)r2r�r�r�r#rDr�)r6r�rbr r,rdrer?r;r;r<�test_errors�sR�
�
�
�
�
�z%ClassPropertiesAndMethods.test_errorsc
s8Gdd�dt�}|�}|�|�d�|df�|�|�d�|df�|�|�d�|df�Gdd�d|�}|�}|�|�d�|df�|�|�d�|df�|�|�d�|df�|�|�|d�|df�dd�}t|�}|�|�dt�d	�td	f�|�|�d�d	�td	f�|�|jj|�|�|jj|�|�t||�jj|�|�t||�jj|�|�t||���|f�|�t||���|f�td��d�}|�	t
|�zt|dd
�Wn	t
y�Ynw|�d�t|�}idtd
|j
d�}	|�|j|	�d	|_|�|jd	�|�|jdd	i|	��|`|�|d�dS)Nc@�eZdZdd�Zee�ZdS)z6ClassPropertiesAndMethods.test_classmethods.<locals>.CcWrr�r;�r?r;r;r<r�r�z:ClassPropertiesAndMethods.test_classmethods.<locals>.C.fooN�r�r�r�r�r{�goor;r;r;r<r�r�r�rfc@r)z6ClassPropertiesAndMethods.test_classmethods.<locals>.DNrr;r;r;r<r
rrcS�||fS)�f docstringr;�r��argr;r;r<�f�z6ClassPropertiesAndMethods.test_classmethods.<locals>.frr��r�z)classmethod shouldn't accept keyword argsrlro)�__annotations__rr�r�r�r\)r#rBrjr�r{r'r)�__self__r2r�r�r�r�r�rFr\r�)
r6r�rWrrJro�ffrI�cm�cm_dictr6r;r<�test_classmethodssT�
�z+ClassPropertiesAndMethods.test_classmethodscC�Lt�td�}td�}|�}td�D]}|�d�q|j|�|ddd�dS�N�gettotalrefcountr�rr�)�delta)r�
get_attributer�r{r�r0�assertAlmostEqual)r6rzru�refs_beforer�r;r;r<�%test_refleaks_in_classmethod___init__;�z?ClassPropertiesAndMethods.test_refleaks_in_classmethod___init__r�cCsTddl}d}ddi}|jj|i|��\}}}|�||j�|�||�|�||�|��j|i|��\}}}|�||j�|�||�|�||�|jjd}||jg|�Ri|��\}}	}
|�||j�|�|	|�|�|
|�Gdd�d|j�}||g|�Ri|��\}}	}
|�||�|�|	|�|�|
|�|�t��}|�Wd�n1s�wY|�t|j�d�|�t��}||���Wd�n1s�wY|�t|j�d	�|�t��}|t	�Wd�n1s�wYd
}
|�t|j�|
�|�t��}|�
dt	�Wd�n	1�swY|�t|j�|
�dS)Nrrhr�{�	classmethc@r)zAClassPropertiesAndMethods.test_classmethods_in_c.<locals>.SubSpamNrr;r;r;r<�SubSpamWrir�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�rBrFr�r�r��	exceptionr2r')r6r�r?rJr\r��d1�spam_cm�x2r��d2r�ru�expected_errmsgr;r;r<�test_classmethods_in_cDsZ����
���z0ClassPropertiesAndMethods.test_classmethods_in_ccCsGdd�dt�}|�}|�|�d�d�|�|�d�d�|�|�d�|df�Gdd�d|�}|�}|�|�d�d�|�|�d�d�|�|�d�|df�|�|�|d�|df�td�}|�|jddi�d|_|�|jd�|�|jddd	��|`|�|d
�dS)Nc@rg)z7ClassPropertiesAndMethods.test_staticmethods.<locals>.CcWrr�r;rhr;r;r<r�yr�z;ClassPropertiesAndMethods.test_staticmethods.<locals>.C.fooN)r�r�r�r�r+rjr;r;r;r<r�xr�r�rf�rfc@r)z7ClassPropertiesAndMethods.test_staticmethods.<locals>.DNrr;r;r;r<rrrrr�)r\rr\)r#rBrjr�r+rFr\r�)r6r�rWrrJ�smr;r;r<�test_staticmethodsvs$z,ClassPropertiesAndMethods.test_staticmethodscCrxry)rr|r�r+r�r0r})r6rzr�r~r�r;r;r<�&test_refleaks_in_staticmethod___init__�r�z@ClassPropertiesAndMethods.test_refleaks_in_staticmethod___init__cCs�ddl}d}ddi}|jj|i|��\}}}|�|d�|�||�|�||�|��j|i|��\}}}|�|d�|�||�|�||�dS)Nrrhrr�)r�r��
staticmethrB)r6r�r?rJr\r�r�r�r;r;r<�test_staticmethods_in_c�sz1ClassPropertiesAndMethods.test_staticmethods_in_ccsGdd�d����}|���d��df�|�|�d��df�|�|�d�|df�Gdd�d��}|�}|�|�d�|df�|�|�d�|df�|�|�d�|df�|�|�|d�|df�G�fdd�d�}|�|�jj�j�|�t�j������d��dS)	Nc@rg)z1ClassPropertiesAndMethods.test_classic.<locals>.CcWrr�r;rhr;r;r<r��r�z5ClassPropertiesAndMethods.test_classic.<locals>.C.fooNrir;r;r;r<r��r�r�rfc@r)z1ClassPropertiesAndMethods.test_classic.<locals>.DNrr;r;r;r<r�rrc�eZdZ�jZdS)z1ClassPropertiesAndMethods.test_classic.<locals>.ENr�r;r�r;r<rJ�rrJ�<bound method )rBrjr��__func__r�r�r'r%)r6rWrrJrJr;r�r<�test_classic�s"z&ClassPropertiesAndMethods.test_classiccCshGdd�dt�}|�}|�|jd�|�|jd�d|_|�|jd�|�|jd�|`|�|d�dS)Nc@sHeZdZGdd�de�Zdd�Zdd�Zdd�Zd	d
�Zeeee�Z	dS)z2ClassPropertiesAndMethods.test_compattr.<locals>.Cc@s0eZdZd
dd�Zddd�Zdd�Zdd	�ZdS)zEClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attributeNcS�||_||_||_dSr�)�_computed_attribute__get�_computed_attribute__set�_computed_attribute__delete)r6r�rS�deleter;r;r<r0��
zNClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__init__cS�
|�|�Sr�)r�)r6r�rDr;r;r<r'�r�zMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__get__cSs|�||�Sr�)r��r6r�r�r;r;r<rM�r�zMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__set__cSr�r�)r��r6r�r;r;r<�
__delete__�r�zPClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__delete__rNr�)r�r�r�r0r'rMr�r;r;r;r<�computed_attribute�s


r�cSrr���_C__xryr;r;r<r0�r�z;ClassPropertiesAndMethods.test_compattr.<locals>.C.__init__cSs|j}|d|_|Sr�r�r[r;r;r<�__get_x�s
z:ClassPropertiesAndMethods.test_compattr.<locals>.C.__get_xcSr�r�r�r[r;r;r<�__set_x�r�z:ClassPropertiesAndMethods.test_compattr.<locals>.C.__set_xcS�|`dSr�r�ryr;r;r<�
__delete_x�rYz=ClassPropertiesAndMethods.test_compattr.<locals>.C.__delete_xN)
r�r�r�r#r�r0�	_C__get_x�	_C__set_x�_C__delete_xr\r;r;r;r<r��sr�rrfr��r\)r#rBr\r�rr;r;r<�
test_compattr�sz'ClassPropertiesAndMethods.test_compattrcCshGdd�dt�}|�}|�|jd�|�|j|�Gdd�d|�}|�}|�|jd�|�|j|�dS)Nc@rU)z2ClassPropertiesAndMethods.test_newslots.<locals>.CcSst�|�}d|_|Sr�)r2r�r�)r�r6r;r;r<r��s
z:ClassPropertiesAndMethods.test_newslots.<locals>.C.__new__cSs|jd|_dS�Nrg�r�ryr;r;r<r0�rkz;ClassPropertiesAndMethods.test_newslots.<locals>.C.__init__N�r�r�r�r�r0r;r;r;r<r��sr�ric@r)z2ClassPropertiesAndMethods.test_newslots.<locals>.DNrr;r;r;r<r�rr)r2rBr�r�)r6r�r?rrRr;r;r<�
test_newslots�sz'ClassPropertiesAndMethods.test_newslotscCsz|�ttj�|�ttjd�|�ttjt�|�ttjt�Gdd�dt�}|�t|�Gdd�dt�}|�t|�dS)Nr�c@�eZdZejZdS�z1ClassPropertiesAndMethods.test_bad_new.<locals>.CN)r�r�r�r2r�r;r;r;r<r��rr�c@r�r�)r�r�r�r#r�r;r;r;r<r��r)r�r�r#r�r2r�r;r;r<�test_bad_new�sz&ClassPropertiesAndMethods.test_bad_newcCs4Gdd�dt�}t�|�|�ttj|d�t�|��|�ttj|�d�Gdd�dt�}t�|�t�|d�t�|d��|�ttj|d�d�Gdd�dt�}t�|�|�ttj|d�t�|d��t�|d�d�Gdd�dt�}t�|�|�ttj|d�t�|d��|�ttj|d�d�dS)Nc@r)�4ClassPropertiesAndMethods.test_object_new.<locals>.ANrr;r;r;r<r:�rr:rvc@r�)r�cSr�r�r��r6r�r;r;r<r0r��=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__Nr�r;r;r;r<r:r�ric@r�)r�cS�
t�|�Sr��r#r��r�r�r;r;r<r�
r��<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__Nrr;r;r;r<r:r�c@rU)r�cSr�r�r�r�r;r;r<r�r�r�cSr�r�r�r�r;r;r<r0r�r�Nr�r;r;r;r<r:r^)r#r�r�r�r0�r6r:r;r;r<�test_object_new�s(



z)ClassPropertiesAndMethods.test_object_newcCs�Gdd�dt�}|�t|�Gdd�d|�}t���t�dt�|d�}Wd�n1s/wY|�|jd�|�|j	|�|`
|�t|�|`
t���t�dt�|d�}Wd�n1sewY|�|jd�|�|j	|�dS)Nc@r�)z=ClassPropertiesAndMethods.test_restored_object_new.<locals>.Ac_�t�r���AssertionError)r�r7r8r;r;r<r�!r�zEClassPropertiesAndMethods.test_restored_object_new.<locals>.A.__new__Nrr;r;r;r<r: r�r:c@seZdZejZdd�ZdS)z=ClassPropertiesAndMethods.test_restored_object_new.<locals>.BcSr�r�r�r�r;r;r<r0&r�zFClassPropertiesAndMethods.test_restored_object_new.<locals>.B.__init__N)r�r�r�r#r�r0r;r;r;r<r?$�r?�errorri)r#r�r��warnings�catch_warnings�simplefilter�DeprecationWarningrBr�r�r�)r6r:r?rRr;r;r<�test_restored_object_news$

�

�z2ClassPropertiesAndMethods.test_restored_object_newc		CsBGdd�dt�}Gdd�d|�}Gdd�d|�}Gdd�d||�}|�|��|tg�|�|j|tf�|�|��||tg�|�|j||tf�|�|��||tg�|�|j||tf�|�|��||||tg�|�|j||||tf�|�|���d�Gd	d
�d
t�}Gdd�d|||||d
�}|�|jt|||||f�|�|���d�zGdd�dt�}Gdd�dt|d
�}t�|�}d|d<Wn	ty�Ynw|�d�zGdd�dt�}Gdd�dt|d
�}Wn	ty�Ynw|�d�zGdd�dt�}Gdd�dt|d
�}Wnt�yYdSw|�d�dS)Nc@r�)z0ClassPropertiesAndMethods.test_altmro.<locals>.AcSr�r9r;ryr;r;r<ro9r�z2ClassPropertiesAndMethods.test_altmro.<locals>.A.fN�r�r�r�ror;r;r;r<r:8r�r:c@r)z0ClassPropertiesAndMethods.test_altmro.<locals>.BNrr;r;r;r<r?:rr?c@r�)z0ClassPropertiesAndMethods.test_altmro.<locals>.CcSr�rCr;ryr;r;r<ro=r�z2ClassPropertiesAndMethods.test_altmro.<locals>.C.fNr�r;r;r;r<r�<r�r�c@r)z0ClassPropertiesAndMethods.test_altmro.<locals>.DNrr;r;r;r<r>rrc@r�)z?ClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaTypecSst�|�}|��|Sr�)rD�mro�reverse)r��Lr;r;r<r�Ks
zCClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaType.mroN�r�r�r�r�r;r;r;r<�PerverseMetaTypeJr�r�c@r�z0ClassPropertiesAndMethods.test_altmro.<locals>.XNrr;r;r;r<r�Orr�rc@r�)�9ClassPropertiesAndMethods.test_altmro.<locals>._metaclasscSs
|ttgSr�)r�r#ryr;r;r<r�Vr��=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mroNr�r;r;r;r<rUr�rc@rr�rr;r;r;r<r�Xrrwrvzdevious mro() return not caughtc@r�)r�cSsdgSr�r;ryr;r;r<r�ir�r�Nr�r;r;r;r<rhr�c@rr�rr;r;r;r<r�krz!non-class mro() return not caughtc@r�)r�cSr�r�r;ryr;r;r<r�tr�r�Nr�r;r;r;r<rsr�c@rr�rr;r;r;r<r�vrz$non-sequence mro() return not caught)	r#rBr�r�rorDr�r�r�)	r6r:r?r�rr�r�rr\r;r;r<�test_altmro6sP
�
�
�z%ClassPropertiesAndMethods.test_altmrocs�Gdd�dt��G�fdd�d��}|�}|�|jd�d|_|�|jd�|`|�|jd�|�|dd	�d
|d<|�|jd�|d=|�|jd�|�|dd
�dtdd
�f�d|dd
�<|�|jtdd
�df�|dd
�=|�|jtdd
��dS)Nc@r�)z5ClassPropertiesAndMethods.test_overloading.<locals>.Bz<Intermediate class because object doesn't have a __setattr__N�r�r�r�rr;r;r;r<r?�r�r?csDeZdZdd�Z�fdd�Z�fdd�Zdd�Zd	d
�Zdd�Zd
S)z5ClassPropertiesAndMethods.test_overloading.<locals>.CcSs|dkrd|fSt�)Nr�rErUr�r;r;r<r]�szAClassPropertiesAndMethods.test_overloading.<locals>.C.__getattr__cs$|dkr||f|_dS��|||�S�Nr�)r&r�r��r?r;r<r��szAClassPropertiesAndMethods.test_overloading.<locals>.C.__setattr__cs|dkr	||_dS��||�Sr�)r�r�r�r�r;r<r��s
zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delattr__cSsd|fS)N�getitemr;r�r;r;r<rU�rYzAClassPropertiesAndMethods.test_overloading.<locals>.C.__getitem__cSs||f|_dSr�)�setitem)r6r�r�r;r;r<ra�rBzAClassPropertiesAndMethods.test_overloading.<locals>.C.__setitem__cSr�r�)�delitemr�r;r;r<�__delitem__�r�zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delitem__N)	r�r�r�r]r�r�rUrar�r;r�r;r<r��sr�r�r�)r�r�r�)r�r��)r�r�rr�r�)r#rBr�r&r�r�r�rXrr;r�r<�test_overloading}s$
z*ClassPropertiesAndMethods.test_overloadingcs�Gdd�dt���d��|����d�G��fdd�d��}|d�}|�|��d�|�|��d�|�|��d�G�fdd�dt�}|�|�jj�j�|�t�j��d����	d	��dS)
Nc@rU)z1ClassPropertiesAndMethods.test_methods.<locals>.CcSr�r��r\r[r;r;r<r0�r�z:ClassPropertiesAndMethods.test_methods.<locals>.C.__init__cSr�r�r�ryr;r;r<r��r�z5ClassPropertiesAndMethods.test_methods.<locals>.C.fooN)r�r�r�r0r�r;r;r;r<r��r^r�rfcseZdZ�jZ�jZdS)z1ClassPropertiesAndMethods.test_methods.<locals>.DN)r�r�r�r�r�rjr;�r��c1r;r<r�rFrrgcr�)z1ClassPropertiesAndMethods.test_methods.<locals>.ENr�r;r�r;r<rJ�rrJr�)
r#rBr�r�rjr�r�r�r'r%)r6rr�rJr;r�r<�test_methods�s$z&ClassPropertiesAndMethods.test_methodsz)testing error message from implementationcCs�tj}d}|�t��}|�Wd�n1swY|�|jjd|�d}|�t��}|d�Wd�n1s=wY|�|jjd|�|�t��
}|�d�Wd�n1sawY|�|jjd|�dS)Nz*unbound method set.add() needs an argumentrzBdescriptor 'add' for 'set' objects doesn't apply to a 'int' object)rSrr�r�rBr�r7r')r6�set_addr�rur;r;r<�test_methods_in_c�s�
��z+ClassPropertiesAndMethods.test_methods_in_ccs�dd�}dd�}dd�}dd�}d	d
�}dd�}d
d�}d=dd�}dd�}	dd�}
�fdd�}�fdd�}dd�}
dd�}dt|t�ifdt|t�ifdt|t�||d �fd!tj|t�ifd"|	|t�ifd#||td$�ifd%|
|td&�ifd'||t�d(|
ifd(||
t�d'|ifd)t|t�ifd*t|t�ifd+tj	|t�ifd,tj
|t�ifd,t|t�ifd-tj|t�ifd.t
|t�ifd/t|t�ifg}G��fd0d1�d1t�}G�fd2d3�d3t�}Gd4d5�d5t��G�fd6d7�d7t�}|D]\}}}�}Gd8d9�d9|�}|��D]
\}}t|||�q�t|||�||��g�Gd:d9�d9|�}|��D]\}}t|||��q#t||||��||�����d;g|�Gd<d9�d9|�}|��D]\}}t|||��qPt|||�����||��q�dS)>NcSs*|�	Wd�dS1swYdSr�r;)�managerr;r;r<�run_context�s"�zIClassPropertiesAndMethods.test_special_method_lookup.<locals>.run_contextcSrr�r;ryr;r;r<�iden�r�zBClassPropertiesAndMethods.test_special_method_lookup.<locals>.idencSr�)Nshellor;ryr;r;r<r��r�zCClassPropertiesAndMethods.test_special_method_lookup.<locals>.hellocSsgSr�r;ryr;r;r<�	empty_seq�r�zGClassPropertiesAndMethods.test_special_method_lookup.<locals>.empty_seqcSr�r�r;ryr;r;r<�zero�r�zBClassPropertiesAndMethods.test_special_method_lookup.<locals>.zerocSr�)N��?r;ryr;r;r<�complex_num�r�zIClassPropertiesAndMethods.test_special_method_lookup.<locals>.complex_numcSr�r�)�
StopIterationryr;r;r<r��r�zBClassPropertiesAndMethods.test_special_method_lookup.<locals>.stopcSr�)NTr;)r6�thingr;r;r<�return_true�r�zIClassPropertiesAndMethods.test_special_method_lookup.<locals>.return_truecS�
tt|�Sr�)r�r)�r�r;r;r<�
do_isinstance�r�zKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_isinstancecSr�r�)r�r)r�r;r;r<�
do_issubclass�r�zKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_issubclasscs*Gdd�d|jt�}��|�dd�dS)Nc@r)z^ClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missing.<locals>.DictSubNrr;r;r;r<�DictSub�rr��hirl)r�r�rB)�checkerr�ryr;r<�do_dict_missing�szMClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missingcs��|d�dS)Nr�rl�rB)r%r�ryr;r<�some_number�szIClassPropertiesAndMethods.test_special_method_lookup.<locals>.some_numbercW�dSr�r;�r7r;r;r<�swallow�r�zEClassPropertiesAndMethods.test_special_method_lookup.<locals>.swallowcSr��Nr�r;)r6�specr;r;r<�format_impl�r�zIClassPropertiesAndMethods.test_special_method_lookup.<locals>.format_impl�	__bytes__�__reversed__�__length_hint__)r�__next__�
__sizeof__�__instancecheck__�__missing__r6�__subclasscheck__�rG�	__enter__�__exit__�__complex__�
__format__�	__floor__�	__trunc__�__ceil__�__dir__�	__round__cs(eZdZ�fdd�Z�f�fdd�	ZdS)zEClassPropertiesAndMethods.test_special_method_lookup.<locals>.CheckercSs|�d�|��dS)Nz__getattr__ called with {0})r��format�r6r;�testr;r;r<r]�zQClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattr__cs$|�vr|�d�|��t�||�S)Nz __getattribute__ called with {0})r�r
r#r�r)�okr;r<r�szVClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattribute__N�r�r�r�r]r�r;)rr6r;r<�Checkersrc� eZdZdd�Z�fdd�ZdS)zJClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescrcSr�r�)�impl)r6rr;r;r<r0 r�zSClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__init__cs��d�|j�||�Sr�)r}rr'�r6r��owner��recordr;r<r'"s
zRClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__get__N)r�r�r�r0r'r;rr;r<�SpecialDescr�rc@r)zIClassPropertiesAndMethods.test_special_method_lookup.<locals>.MyExceptionNrr;r;r;r<�MyException%rrcr�)zFClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescrcs��r�r;r�rr;r<r'(r�zNClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescr.__get__N�r�r�r�r'r;rr;r<�ErrDescr'r�rc@r�z?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XNrr;r;r;r<r�,rr�c@rrrr;r;r;r<r�4rrfc@rrrr;r;r;r<r�<rr�)r�rS�reversedr2r��	getsizeofr�r
�math�floor�truncr)�ceil�dir�roundr#�	Exceptionr3r&rBr�)r6r�r�r�r�r�r�r�r�r�r�r�r�r�r��specialsrrrr9�runner�	meth_impl�envr�r;r�r;)rrrr6r<�test_special_method_lookup�sz

����

�z4ClassPropertiesAndMethods.test_special_method_lookupc
Cs�Gdd�dt�}|�}|�}|�|�|�t|�t|��t|�t|�|�||�|�||k�|�||k�|�||k�|�t|��	d�d�|�t|�t
|��|�d|�td�D]}|�
||�q`|�d|�Gdd�dt�}|�}|�}|�|�|�t|�t|��t|�t|�|�||�|�||�|�||k�|�||k�|�t|��	d	�d�|�t|�t
|��|�d|�td�D]}|�
||�q�|�d|�Gd
d�dt�}|d�}	|d�}
|d�}|�|	�|�|
�|�t|	�td��|�|	|	�|�|	|
�|�|	|	k�|�|	|
�|�|	|
k�|�|	|
k�|�|
|	k�|�|
|	k�|�t|	�d
�|�t
|	�d�|td��}|�d|�td�D]	}|�
||��q\|�d|�dS)Nc@r�)z2ClassPropertiesAndMethods.test_specials.<locals>.CcS� d|krdkr|St�t��Nrr���
IndexErrorrr;r;r<rUI�z>ClassPropertiesAndMethods.test_specials.<locals>.C.__getitem__Nrr;r;r;r<r�Hr�r�zC object at rr�r�c@r�)z2ClassPropertiesAndMethods.test_specials.<locals>.DcSr,r-r.rr;r;r<rU`r0z>ClassPropertiesAndMethods.test_specials.<locals>.D.__getitem__Nrr;r;r;r<r_r�rzD object at c@sleZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)z6ClassPropertiesAndMethods.test_specials.<locals>.ProxycSr�r�r�r[r;r;r<r0wr�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__init__cSs
|jSr�r�ryr;r;r<r�yr�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__bool__cS�
t|j�Sr�)�hashr\ryr;r;r<�__hash__{r�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__hash__cSs
|j|kSr�r�r�r;r;r<r }r�z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__eq__cSs
|j|kSr�r�r�r;r;r<�__ne__r�z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ne__cSs
|j|kSr�r�r�r;r;r<�__ge__�r�z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ge__cSs
|j|kSr�r�r�r;r;r<�__gt__�r�z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__gt__cSs
|j|kSr�r�r�r;r;r<�__le__�r�z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__le__cSs
|j|kSr�r�r�r;r;r<�__lt__�r�z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__lt__cS�
d|jS)NzProxy:%sr�ryr;r;r<r��r�z>ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__str__cSr9)Nz	Proxy(%r)r�ryr;r;r<r��r�z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__repr__cSs
||jvSr�r�r
r;r;r<rk�r�zCClassPropertiesAndMethods.test_specials.<locals>.Proxy.__contains__N)r�r�r�r0r�r3r r4r5r6r7r8r�r�rkr;r;r;r<�Proxyvsr:rfzProxy:0zProxy(0))r#r�r��idr2rBr��assertGreaterEqualr��findr��assertNotInr�r�)
r6r�r��c2r�rr�r�r:�p0�p1�p_1�p10r;r;r<�
test_specialsCsp
z'ClassPropertiesAndMethods.test_specialsc

Csddl}Gdd�dt�}|�}|�|�}|�|�|�~t��|�|�d�~Gdd�dt�}|�}z|�|�WntyT}z|�dt|��WYd}~n
d}~ww|�	d�Gdd	�d	t�}|�}	|�|	�}|�|�|	�~	t��|�|�d�~dS)
Nrc@r)z2ClassPropertiesAndMethods.test_weakrefs.<locals>.CNrr;r;r;r<r��rr�c@r)z7ClassPropertiesAndMethods.test_weakrefs.<locals>.NoWeakr�Nr�r;r;r;r<�NoWeak�rrEzweak referencez!weakref.ref(no) should be illegalc@r)z5ClassPropertiesAndMethods.test_weakrefs.<locals>.Weakr�r7Nr�r;r;r;r<�Weak�r�rF)
�weakrefr#�refrBrr+r�r�r�r�)
r6rGr�rW�rrE�nor�rF�yesr;r;r<�
test_weakrefs�s4
��

z'ClassPropertiesAndMethods.test_weakrefsc
CsGdd�dt�}|�}|�|d�d|_|�|jd�|�|jd�|`|�|d�|�|d�|j�|d�|�|j�|�d�|j�|�|�|d�|jd}|�	|t
�t|�}|�d|�|�d|�|�d	|�|�d
|�|�|j
d�|�|j|jd�|�|j|jd
�|�|j|jd�dD]8}zt||d�Wn&ty�}zt|��d�dkr�|�d|t|�f�WYd}~q�d}~ww|�d|�q�d|_
|�|j
d�Gdd�dt�}|�}z|D]}	t|	�q�Wn
ty�YdSw|�d�dS)Nc@s4eZdZdd�Zdd�Zdd�Zeeeedd�Zd	S)
z4ClassPropertiesAndMethods.test_properties.<locals>.CcSr�r�r�ryr;r;r<�getx�r�z9ClassPropertiesAndMethods.test_properties.<locals>.C.getxcSr�r�r�r
r;r;r<�setx�r�z9ClassPropertiesAndMethods.test_properties.<locals>.C.setxcSr�r�r�ryr;r;r<�delx�rYz9ClassPropertiesAndMethods.test_properties.<locals>.C.delx�I'm the x property.��docN)r�r�r�rMrNrOrPr\r;r;r;r<r��s
r�r\r�r�r�r�fget�fset�fdelrPrMrNrO)rSrTrU�readonlyrzQwhen setting readonly attr %r on a property, got unexpected AttributeError msg %rzIexpected AttributeError from trying to set readonly %r attr on a propertyc@�eZdZedd��ZdS)z4ClassPropertiesAndMethods.test_properties.<locals>.DcSsddSr�r;)r1r;r;r<rR�sz=ClassPropertiesAndMethods.test_properties.<locals>.D.<lambda>N)r�r�r�rPrUr;r;r;r<r�r�rz,expected ZeroDivisionError from bad property)r#r�r\rBr�rMr'r�rFr�rPr$r�rr�rSrTrUr&r�r�r=r��ZeroDivisionError)
r6r�r?�raw�attrsr;r�rrJr�r;r;r<�test_properties�sb

����
��z)ClassPropertiesAndMethods.test_propertiesrgz)Docstrings are omitted with -O2 and abovecsG�fdd�dt�}dS)NcsJeZdZdd�Zdd�Zee�Z��ejd�eed�Z	��e	jd�dS)z?ClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.EcSr�)�
getter methodrr;ryr;r;r<�getter	ryzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.gettercSr�)z
setter methodNr;)r%r�r;r;r<�setter
	ryzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.setterr\)rTN)
r�r�r�r]r^rP�proprBr�prop2r;ryr;r<rJ	s
rJ�r#)r6rJr;ryr<�test_properties_doc_attrib	sz4ClassPropertiesAndMethods.test_properties_doc_attribcs:zddl�Wn
tyYdSwG�fdd�dt�}dS)NrcseZdZe�j�ZdS)z>ClassPropertiesAndMethods.test_testcapi_no_segfault.<locals>.XN)r�r�r�rP�test_with_docstring�pr;��	_testcapir;r<r�	rr�)rf�ImportErrorr#�r6r�r;rer<�test_testcapi_no_segfault	s�z3ClassPropertiesAndMethods.test_testcapi_no_segfaultcsGdd�dt����}|��jjd�|�|d�d|_|�|d�|�|jd�|�|jd�|`|�|d�|�|d�G�fdd	�d	��}|�}d
|_|�|jd
�|`|`Gdd�dt����}d|_|�|jd�|`G�fd
d�d��}|�}d|_|�|jd�|`dS)Nc@s@eZdZedd�Zejdd��Zejdd��Zejdd��ZdS)z9ClassPropertiesAndMethods.test_properties_plus.<locals>.Cr�rQcSr�r���_fooryr;r;r<r� 	�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foocS�t|�|_dSr��r'rkr
r;r;r<r�#	�cSr�r�rjryr;r;r<r�&	rpN)r�r�r�rPr�r]r^�deleterr;r;r;r<r�	s


r�r�r�i���rkr�cseZdZ�jjdd��ZdS)z9ClassPropertiesAndMethods.test_properties_plus.<locals>.DcSs z|`WdStyYdSwr�)rkr�ryr;r;r<r�5	s

�z=ClassPropertiesAndMethods.test_properties_plus.<locals>.D.fooN)r�r�r�r�rpr;r�r;r<r4	srr�c@sDeZdZedd��Zejdd��Zejdd��Zejddd��ZdS)z9ClassPropertiesAndMethods.test_properties_plus.<locals>.EcSr�r�rjryr;r;r<r�B	rlz=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.foocSr�r�)�RuntimeErrorr
r;r;r<r�E	rycSrmr�rnr
r;r;r<r�H	roNcSr�r�rjr
r;r;r<r�K	rpr�)r�r�r�rPr�r^rpr;r;r;r<rJA	s


rJcs*eZdZ�jjdd��Zejdd��ZdS)z9ClassPropertiesAndMethods.test_properties_plus.<locals>.FcSr�r�rjryr;r;r<r�U	rpz=ClassPropertiesAndMethods.test_properties_plus.<locals>.F.foocSstd|�|_dSr�)�maxrkr
r;r;r<r�X	r�N)r�r�r�r�rpr^r;)rJr;r<r�T	s

r����r)r#rBr�rr�r�rk)r6rWrrJrr�ror;)r�rJr<�test_properties_plus	s6z.ClassPropertiesAndMethods.test_properties_plusc	Cs�t�}|�|i�ti�}|�|i�tddd��}|�|ddd��|�|tt|�����|�|tt|�����tddd��}|�|tddd��|�|td&i|���|�|tddidd��|�|tdgdd	��|�|td
dgfi|���|�|td&i|���ddd
ddgdfD]-}zt|�Wnty�Yq�ty�|dkr�n|�d|�Yq�w|�d|�q�ztii�Wn	ty�Ynw|�d�Gdd�d�}zt|��Wn	ty�Ynw|�d�dd�|_dd�|_	t|��}|�||j�Gdd�d�}t|dd�|dd�|dd�|dd�g�}|�|ddd��tt
td�tdd ���}|�|td!d"�td�D���d#gd$gfD]}zt|�Wnt�y_Y�qLw|�d%|��qLdS)'NrgrR)rfr?rf)�one�tworu)rv)rvrg)ru)rur�)rvrry�0�rzno TypeError from dict(%r)zno TypeError from dict({}, {})c@seZdZdddd�ZdS)zAClassPropertiesAndMethods.test_dict_constructors.<locals>.Mappingrgrlr�)rfrir?N)r�r�r�r�r;r;r;r<�Mapping�	sryz*no TypeError from dict(incomplete mapping)cSst|j���Sr�)r2r�r|ryr;r;r<rR�	szBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>cSs
|j|Sr�)r�rr;r;r<rR�	s
c@rU)zJClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntrycSs||_||_dSr�)�first�last)r6rzr{r;r;r<r0�	r$zSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__init__cSst|j|jg�Sr�)r~rzr{ryr;r;r<r�	rkzSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__iter__N)r�r�r�r0rr;r;r;r<�AddressBookEntry�	�r|�Tim�Warsaw�Barry�Peters)r�r~rlrvcSsg|]}||df�qSr�r;r�r;r;r<r��	�zDClassPropertiesAndMethods.test_dict_constructors.<locals>.<listcomp>)�tooshort)�too�longzby 1zno ValueError from dict(%r)r;)r�rBr2r3r~r��
ValueErrorr�r|rU�zipr�)r6rJ�badargryr|�badr;r;r<�test_dict_constructors`	sz��	�
�




���z0ClassPropertiesAndMethods.test_dict_constructorscs>d}|�t�ddg�~dddddgddd	ddit|jfD]}t|�qd
d�}Gdd
�d
t�}ddg}|�|t|��|�|�}|�|t|��|�d|_dd�|_|�|t|��|ddg�Gdd�d|�}ddg|}|�|t|��|�|�}	|�|t|	��|�d|	_dd�|	_|�|t|	��|ddg�Gdd�dtt	��}
|
d�}d|_
d|_gd ���fd!d"�t|�D�}|�|d#d$g�Gd%d&�d&|
�}
|
d'�}d|_
d|_|�|jd(�|�
t��t|�Wd�n1s�wY|�tt��tt��G�fd)d*�d*t��G�fd+d
�d
t�}t|��dS),Nr��junkr6rgy@g@�2�2�rgcSsdd�|D�S)NcSsg|]	}|�d�s|�qS)r0)r%)r�r1r;r;r<r��	szKClassPropertiesAndMethods.test_dir.<locals>.interesting.<locals>.<listcomp>r;)�stringsr;r;r<�interesting�	rBz7ClassPropertiesAndMethods.test_dir.<locals>.interestingc@�eZdZdZdd�ZdS)�-ClassPropertiesAndMethods.test_dir.<locals>.CrfcSr�r�r;ryr;r;r<�Cmethod�	r�z5ClassPropertiesAndMethods.test_dir.<locals>.C.CmethodN)r�r�r��Cdatar�r;r;r;r<r��	�r�r�r�cSr�r�r;ryr;r;r<rR�	r�z4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>�cdata�cmethodc@r�)z-ClassPropertiesAndMethods.test_dir.<locals>.ArfcSr�r�r;ryr;r;r<�Amethod�	r�z5ClassPropertiesAndMethods.test_dir.<locals>.A.AmethodN)r�r�r��Adatar�r;r;r;r<r:�	r�r:r�r�r�cSr�)Nrir;ryr;r;r<rR�	r��adata�amethodc@r)z-ClassPropertiesAndMethods.test_dir.<locals>.MNrr;r;r;r<�M�	rr�rLrf)r�r�__package__�
__loader__�__spec__csg|]}|�vr|�qSr;r;�r�r\)�default_attributesr;r<r��	r�z6ClassPropertiesAndMethods.test_dir.<locals>.<listcomp>r?rRc@rg)z.ClassPropertiesAndMethods.test_dir.<locals>.M2cSr�)N�Not a dict!r;ryr;r;r<�getdict�	r�z6ClassPropertiesAndMethods.test_dir.<locals>.M2.getdictN)r�r�r�r�rPrFr;r;r;r<r,�	r^r,�m2r�cs<eZdZdd�Zdd�Z�fdd�Zdd�Z�fd	d
�ZdS)z3ClassPropertiesAndMethods.test_dir.<locals>.WrappercSr�r���
_Wrapper__objr�r;r;r<r0�	r�z<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__init__cSsdt|j�S)NzWrapper(%s))r�r�ryr;r;r<r��	rBz<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__repr__cs�|j|�Sr�r�r���Wrapperr;r<rU
rBz?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getitem__cSr1r�)r�r�ryr;r;r<r>
r�z;ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__len__cs�t|j|��Sr�)rEr�r�r�r;r<r]
rkz?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getattr__N)r�r�r�r0r�rUr>r]r;r�r;r<r��	sr�cs eZdZ�fdd�Zee�ZdS)r�cs�t|��Sr�r�ryr�r;r<�
__getclass	
r�z8ClassPropertiesAndMethods.test_dir.<locals>.C.__getclassN)r�r�r��_C__getclassrPr�r;r�r;r<r�
�)rBr$rD�test_dirr#r�r�r�r�r�rRr?rFr�r��Ellipsis)r6r�rnr�r��cstuffrWr:�astuffr?r��	minstance�namesr,�
m2instancer;)r�r�r<r��	sR&



�z"ClassPropertiesAndMethods.test_dircs�Gdd�dt�}|�|��d�d�G�fdd�d|��|����d�d�Gd	d
�d
|�}t|�|_|�|��d�d�G�fd
d�d|���|����d�d�G�fdd�dt��G��fdd�d���|����d�d�Gdd�d��}�|�|_|�|��d�d�zt�d�Wn	ty�Ynw|�d�zt�|��Wn	ty�Ynw|�d�z	t���d�Wn	ty�Ynw|�d�z
t���|��Wn	ty�Ynw|�d �Gd!d"�d"t�}Gd#d$�d$|�}|�}|�|j	d%�|�t||�j	d�Gd&d'�d't�}G�fd(d)�d)|��|���
�|j�|�t��t|dd*�Wd�dS1�s=wYdS)+Nc@r�)z0ClassPropertiesAndMethods.test_supers.<locals>.AcSsd|S)NzA(%r)r;�r6r?r;r;r<rI
rYz5ClassPropertiesAndMethods.test_supers.<locals>.A.methNr;r;r;r;r<r:
r�r:rfzA(1)c�&eZdZ��fdd�Zdd�Z�ZS)z0ClassPropertiesAndMethods.test_supers.<locals>.Bcst�|�|_dSr�)r2rAry)r?r�r;r<r0
rkz9ClassPropertiesAndMethods.test_supers.<locals>.B.__init__cS�d||j�|�S)NzB(%r)r@r�r;r;r<rI
r
z5ClassPropertiesAndMethods.test_supers.<locals>.B.meth)r�r�r�r0rIr5r;r�r6r<r?
sr?rgzB(2)A(2)c@r�)z0ClassPropertiesAndMethods.test_supers.<locals>.CcSr�)NzC(%r)rDr�r;r;r<rI!
r
z5ClassPropertiesAndMethods.test_supers.<locals>.C.methNr;r;r;r;r<r� 
r�r�rizC(3)A(3)c�eZdZ��fdd�Z�ZS)z0ClassPropertiesAndMethods.test_supers.<locals>.Dcsd|t�|��|�S)NzD(%r))r2rIr�)rr�r;r<rI(
�z5ClassPropertiesAndMethods.test_supers.<locals>.D.meth)r�r�r�rIr5r;�rr6r<r'
r>rrlzD(4)C(4)B(4)A(4)cr/)z6ClassPropertiesAndMethods.test_supers.<locals>.mysupercst�|�j|�Sr�r?re)r��mysuperr;r<r00
rkz?ClassPropertiesAndMethods.test_supers.<locals>.mysuper.__init__)r�r�r�r0r5r;)r�r6r<r�/
r>r�c�eZdZ��fdd�ZdS)z0ClassPropertiesAndMethods.test_supers.<locals>.Ecsd|��|��|�S)NzE(%r))rIr��rJr�r;r<rI4
r�z5ClassPropertiesAndMethods.test_supers.<locals>.E.methNr;r;r�r;r<rJ3
�rJrvzE(5)D(5)C(5)B(5)A(5)c@r�)z0ClassPropertiesAndMethods.test_supers.<locals>.FcSs |j}d||jjf|�|�S)Nz	F(%r)[%s])�	_F__superr�r�rI)r6r?r1r;r;r<rI:
sz5ClassPropertiesAndMethods.test_supers.<locals>.F.methNr;r;r;r;r<r�9
r�r�rwz!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@rg)z5ClassPropertiesAndMethods.test_supers.<locals>.DDbasecSr�r-r;ryr;r;r<rMc
r�z:ClassPropertiesAndMethods.test_supers.<locals>.DDbase.getxN�r�r�r�rMrPr\r;r;r;r<�DDbaseb
r�r�c@rg)z4ClassPropertiesAndMethods.test_supers.<locals>.DDsubcSr�r�r;ryr;r;r<rMg
r�z9ClassPropertiesAndMethods.test_supers.<locals>.DDsub.getxNr�r;r;r;r<�DDsubf
r�r�r�c@rW)z3ClassPropertiesAndMethods.test_supers.<locals>.BasecSr�r�r;ryr;r;r<rRr
r�z<ClassPropertiesAndMethods.test_supers.<locals>.Base.<lambda>N)r�r�r�rP�aPropr;r;r;r<�Baseq
r�r�cs"eZdZe��fdd��Z�ZS)z2ClassPropertiesAndMethods.test_supers.<locals>.Subcst�|�jSr�)r2r�)�klass)�Subr�r;r<ru
�z7ClassPropertiesAndMethods.test_supers.<locals>.Sub.test)r�r�r�r{rr5r;)r�r6r<r�t
sr�rq)
r#rBrIr2rEr�r�r�r'r\rr�r�)r6r:r�r�r�r��ddr�r6)r?rrJr�r�r<�test_supers
sd

�
�
�
�
$�z%ClassPropertiesAndMethods.test_superscsG�fdd�dt��|�t�d�d�d�|�t�d�d�d��d�}|�|d�|�t|�d�|�t|�jt�|�t|�td��|�|
jt�|�|d	?jt�|�|d	>jt�|��d	�d
>jt�|��d	�d
?jt�G�fdd�dt��|�t�d
�d�d�|�td�d��d��d�}|�|d�|�t|�d�|�t|�td��|�t|�jt�|�|
jt�|�|jt�|��d	�jt�|�|d	?jt�|�|d	>jt�|�|d	jt�|�|djt�|�|djt�|�|djt�|�d|jt�|�|d	Bjt�|�|d	Ajt�|�|d@jt�|��d	�d
>jt�|��d	�d
?jt�|�t�d	��jt�Gdd�dt�}|d�}|�|d	jt�|�d	|jt�|d�}|�|ji�|�t|�d�Gdd�dt	�}|�t|d��d�|d�}|�|d�|�t	|�d�|�t	|�jt	�|�t|�td��|�|
jt	�Gdd�dt
�}|dd�}|�t|�d�t
dd�}|�|jt
�|�||�|�t
|�|�|�t
|�jt
�||�}|�t|�d�|�||�|�t
|�|�|�t
|�jt
�|�t|�t|��|�|
jt
�|�|d	jt
�|�|d	|�|�|d	jt
�|�|d	|�|�|djt
�|�|d|�|�|djt
�|�|d|�Gd d!�d!t�}|d"�}|�|d"�|�|��|d#��|�|����|d"��t
d$�D]}|t
|��}|��}	|	��}
|�|
|��q�|d%�}|�t|�d%�|�t|�jt�|�t|�td%��|�|dd�jt�|�|djt�|�|d	jt�|�|d&jt�|d&�}|�t|�d&�|�t|�jt�|�||jt�|�|d	jt�|�|djt�|�|d'jt�|�|dd�jt�Gd(d)�d)t�}|d*�}|�|d*�|�|��|d+��|�|����|d*��t
d,�D]}|d-�ttt
|����}|��}|��}	|�|	|��qm|d.�}|�t|�d.�|�t|�jt�d/}||�}|�||�|�t|�|�|�t|�jt�|�t|�t|��|�|di|d�|�|di|d�|�|d-jt�|�|d-|�|�d-|jt�|�d-||�|�|d	jt�|�|d	d-�|�|djt�|�|d|�|�|d'jt�|�|d'||�|�|dd�jt�|�|dd�|�|�|d	d	�jt�|�|d	d	�d-�|�|��jt�|�|��|�|�|��jt�|�|��|�|�|��jt�|�|��|�i}
|�|�|
�jt�|�|�|
�|�|�|�d0d0�jt�|�|�d0d0�|�|�|�t|��jt�|�|�t|��|�|�|�t|��jt�|�|�t|��|�|�|�t|��jt�|�|�t|��|�|�|��jt�|�|��|�Gd1d2�d2t�}|d3�}	|�|	d3�|�|	��|d4��|�|	����|d3��d.}||�}	|�t|	�|�|�t|	�jt�|�t|	�t|��|�|	di|d�|�|di|	d�|�|	��jt�|�|	��|�|�|	��jt�|�|	��|�|�|	��jt�|�|	��|�|�|	�d0d0�jt�|�|	�d0d0�|�|�|	�d5d5�jt�|�|	�d5d5�|�|�|	�t|	��jt�|�|	�t|	��|�|�|	�t|	��jt�|�|	�t|	��|�|�|	�t|	��jt�|�|	�t|	��|�|�|	��jt�|�|	��|�|�|	��jt�|�|	��|�|�|	��jt�|�|	��|�|�|	��jt�|�|	��|�|�|	d-jt�|�|	d-|�|�d-|	jt�|�d-|	|�|�|	d	jt�|�|	d	d-�|�|	djt�|�|	d|�|�|	d'jt�|�|	d'||�|�|	dd�jt�|�|	dd�|�|�|	d	d	�jt�|�|	d	d	�d-�Gd6d7�d7t�}|t
d��}|�|tt
d���|�d8�|�|tt
d��d8g�d|d<|�|tt
d9���|� t
d9d:��|�|tt
d:���g|d;d�<|�|tt
d<���|d=d<�=|�t|�d=�|�|tt
d=���|�t|�tt
d=���|�|d	d	�|�|dd�|�|d>d	�|�|dd�|�|dd�tt
d���dS)?Ncr)z@ClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexintcS�t|�Sr�)�hexryr;r;r<r��
rYzIClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__repr__cs�t�||��Sr�)r)rPr���hexintr;r<rP�
rkzHClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__add__N)r�r�r�r�rPr;r�r;r<r��
rr���	�0x10i��0x3efi90rr�cs.eZdZgZdd�Z��fdd�ZeZ�ZS)zAClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlongcSr�r�)�octryr;r;r<r��
rYzIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__str__cs|�t�|��|��Sr�)r�r2rPr�)r��octlongr;r<rP�
r�zIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__add__)r�r�r�r�r�rPr�r5r;)r�r6r<r��
s
r�rirv�0o10i��0o5675rfr�c@r)zCClassPropertiesAndMethods.test_basic_inheritance.<locals>.longcloneNrr;r;r;r<�	longclone�
rr�c@s$eZdZdgZd	dd�Zdd�ZdS)
zCClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloatr�r�r�cSst|�|_dSr�)r)r�)r6r�r�r;r;r<r0�
rBzLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__init__cSsd|j|fS)Nr�r�ryr;r;r<r��
rBzLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__repr__N)r�r�)r�r�r�r�r0r�r;r;r;r<�	precfloat�
s
r�g�������?z1.1g��@c@r�)zDClassPropertiesAndMethods.test_basic_inheritance.<locals>.madcomplexcS�d|j|jfS)Nz%.17gj%+.17g�r�r�ryr;r;r<r��
rkzMClassPropertiesAndMethods.test_basic_inheritance.<locals>.madcomplex.__repr__N)r�r�r�r�r;r;r;r<�
madcomplex�
r�r����rlz4j-3c@�eZdZdZdd�ZdS)zBClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtupleNcSs2|jdur|jSt|�}|��|�|�|_|jSr�)�_revr2r�r��r6r�r;r;r<�rev�
s
zFClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtuple.rev�r�r�r�r�r�r;r;r;r<�madtuple�
r�r�)
rfrgrirlrvrwr��r�r)
rr�r�r�rwrvrlrirgrfi)rfrgrirlrvr;rgc@r�)zCClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstringNcS�8|jdur|jSt|�}|��|�d�|��|_|jS�Nr��r�r2r�r�r�r�r;r;r<r��
zGClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstring.revr�r;r;r;r<�	madstringr�r��abcdefghijklmnopqrstuvwxyz�zyxwvutsrqponmlkjihgfedcba�r��12345zr\c@r�)zDClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicodeNcSr�r�r�r�r;r;r<r�Qr�zHClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicode.revr�r;r;r;r<�
madunicodeOr�r��ABCDEF�FEDCBA�xyc@r)zAClassPropertiesAndMethods.test_basic_inheritance.<locals>.sublistNrr;r;r;r<�sublist�rr�r�rw�����r�rs)!r)rBr�r�r�r2r�r'rFr*r�r�r�r�r��mapr�strip�lstrip�rstrip�	translate�replace�ljustr��rjust�center�lower�upper�
capitalize�titler2r}r)r6r?r�r�r��baser�r�rKrNr�r�r1�identitytabr�r�r;)r�r�r<�test_basic_inheritance
s�

			

 z0ClassPropertiesAndMethods.test_basic_inheritancec	Cs�|�td��
tdd�Wd�n1swY|�td��
tdd�Wd�n1s1wY|�td��
tdd�Wd�n1sLwY|�tddd�tdd��|�tdd	�d
�|�tddd
�d�|�td��tt	d�d�Wd�n1s�wY|�td��
t
dd�Wd�n1s�wYtttttttt
fD]}z|dd�Wn	ty�Yq�w|�d|�q�dS)Nzkeyword argumentrfr�rgr�i�r�i�ra�500�abc�strict)r#�errorsrri)�sequencer)�bogus_keyword_argz4expected TypeError from bogus keyword argument to %r)r0r�r)r*�boolrBr�r�r�r�r2r�)r6�constructorr;r;r<�
test_keywords�s<���������z'ClassPropertiesAndMethods.test_keywordscs�G�fdd�dt��|��d�d�|�d�d��|�t�d��d��d�d�d�d	�d
�di}|�|�d�d�|�|�d�d	�|�|�d
�d�|��d�|�|�|��d��d�dS)Ncs,eZdZdZdd�Z�fdd�Zdd�ZdS)	zFClassPropertiesAndMethods.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.
            cSs|��|_t|j�|_dSr�)r��	canonicalr2�hashcoder
r;r;r<r0�s
zOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__init__cst|��s	�|�}|j|jkSr�)r�rr���cistrr;r<r �s
zMClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__eq__cSr�r�)rryr;r;r<r3�r�zOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__hash__N)r�r�r�rr0r r3r;r
r;r<r�s
r�ABCr�aBcrurfrvrg�tHreeri�tWo�THrEE�ONe�thrEE)r�rBr�r�)r6rJr;r
r<�test_str_subclass_as_dict_key�sz7ClassPropertiesAndMethods.test_str_subclass_as_dict_keyc
s�Gdd�d�}|ttfD]l}G�fdd�d|���d�}�d�}�d�}|�|d�|||d�}dD]E}dD]@}d	D];}	|�td
|	�td|	�d||f�|�td
|	�td|	�d||f�|�td|	�td|	�d||f�q:q6q2qdS)Nc@r)zCClassPropertiesAndMethods.test_classic_comparisons.<locals>.classicNrr;r;r;r<�classicrrcs\eZdZdd�Z�fdd�Z�fdd�Z�fdd�Z�fd	d
�Z�fdd�Z�fd
d�Z	dS)z=ClassPropertiesAndMethods.test_classic_comparisons.<locals>.CcSrmr��r)r�r
r;r;r<r0
rBzFClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__init__c�8t|��r|j|jkSt|t�st|t�r|j|kStSr��r�r�r)r�r�r�r;r<r �


zDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__eq__c�8t|��r|j|jkSt|t�st|t�r|j|kStSr�rr�r�r;r<r4rzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ne__c�8t|��r|j|jkSt|t�st|t�r|j|kStSr�rr�r�r;r<r8rzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__lt__c�8t|��r|j|jkSt|t�st|t�r|j|kStSr�rr�r�r;r<r7!rzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__le__c�8t|��r|j|jkSt|t�st|t�r|j|kStSr�rr�r�r;r<r6'rzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__gt__c�8t|��r|j|jkSt|t�st|t�r|j|kStSr�rr�r�r;r<r5-rzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ge__N)
r�r�r�r0r r4r8r7r6r5r;r�r;r<r�sr�rfrgrirh�rrr r!r"r#�c[x] %s c[y]�x %s y�
x=%d, y=%d�	c[x] %s y�	x %s c[y])r)r#rBrC)
r6rr�r�r?�c3rWr\�y�opr;r�r<�test_classic_comparisonss6(

�

�

�����z2ClassPropertiesAndMethods.test_classic_comparisonscsZGdd�dt�}|d�}��|d���d|�Gdd�dt�}|d�}��|d���d|�Gdd	�d	�}|tttfD]m}G��fd
d�d|���d�}�d�}�d
�}	��|d�|||	d�}
dD]E}dD]@}dD];}
��td|
�td|
�d||f���td|
�td|
�d||f���td|
�td|
�d||f�qlqhqdq=dS)Nc@r)z:ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZNrr;r;r;r<r�Hrr�rfy�?c@r�)z;ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZcSs"z	t||�dkWStYS)Ng���ư>)r'r�r�r;r;r<r NszBClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZ.__eq__Nr!r;r;r;r<�ZZMr�r+g�ׇP�?c@r)z@ClassPropertiesAndMethods.test_rich_comparisons.<locals>.classicNrr;r;r;r<rWrrcsheZdZdd�Z�fdd�Z�fdd�Z�fdd�Z�fd	d
�Z�fdd�Z�fd
d�Z	�fdd�Z
dS)z:ClassPropertiesAndMethods.test_rich_comparisons.<locals>.CcSrmr�rr
r;r;r<r0[rBzCClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__init__c���d�dS)Nzshouldn't call __cmp__)r�)r%r�ryr;r<�__cmp__]rBzBClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__cmp__crr�rr�r�r;r<r _rzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__eq__crr�rr�r�r;r<r4erzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ne__crr�rr�r�r;r<r8krzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__lt__crr�rr�r�r;r<r7qrzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__le__crr�rr�r�r;r<r6wrzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__gt__cr r�rr�r�r;r<r5}rzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ge__N)r�r�r�r0r-r r4r8r7r6r5r;�r�r6r;r<r�Zsr�rgrirhr!r"r#r$r%r&)r�rBr)r#r2rC)r6r�r,r+�zzrr�r�r?r'rWr\r(r)r;r.r<�test_rich_comparisonsFsF)

�

�

�����z/ClassPropertiesAndMethods.test_rich_comparisonscs4ddlm}�fdd�}||jd�|tjd�dS)Nr)�FileIOcs��|j|�dSr�)rBr)�descr�whatryr;r<�check�rhz6ClassPropertiesAndMethods.test_descrdoc.<locals>.checkzTrue if the file is closedz!the real part of a complex number)�_ior1�closedr�r�)r6r1r4r;ryr<�
test_descrdoc�sz'ClassPropertiesAndMethods.test_descrdoccsvGdd�dt��G�fdd�d�}G�fdd�dt�}|�|jd�|�|�jd�|�|jd	�|�|�jd
�dS)Nc@r�)z?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescrcSs&|r|jjd}|r
|j}d||fS)Nz	 instancezobject=%s; type=%s)r�r�)r6r#�otyper;r;r<r'�s
zGClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescr.__get__Nrr;r;r;r<�DocDescr�r�r9c�eZdZ��ZdS)z?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.OldClassNr�r;�r9r;r<�OldClass�rr<cr:)z?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.NewClassNr�r;r;r;r<�NewClass�rr=zobject=None; type=OldClassz'object=OldClass instance; type=OldClasszobject=None; type=NewClassz'object=NewClass instance; type=NewClass)r#rBr)r6r<r=r;r;r<�test_doc_descriptor�sz-ClassPropertiesAndMethods.test_doc_descriptorcsGdd�dt�}Gdd�dt�}Gdd�dt�}Gdd�d||�}||||fD]"}||||fD]}|�}||_��|j|�||_��|j|�q/q'�fd	d
�}||�t�|t�|�||�d�||�t�|t�t�|t�t�Gdd
�d
t�}	|dt�|dt�t�}
||
td��||
td��~
Gdd�dt�}Gdd�dt�}Gdd�dt�}
Gdd�dt�}Gdd�dt�}Gdd�d|�}Gdd�d|
�}Gdd�d|�}Gd d!�d!|�}Gd"d#�d#|�}Gd$d%�d%|�}||f||
f|
|f||f||ffD]7\}}|�}d|_||_��|j|d&||f���|jd�||_��|j|d&||f���|jd��q||||||||t|	f
D] }||||||||t|	f
D]}||u�r\�qS||�|��qS�qEGd'd(�d(t��G�fd)d*�d*t���fd+d,�t	d-�D�}~dS).Nc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.CNrr;r;r;r<r��rir�c@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.DNrr;r;r;r<r�rirc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.ENrr;r;r;r<rJ�rirJc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.FNrr;r;r;r<r��rir�c	sjz||_Wn	tyYn
w��d||f�zt|d�Wnttfy+YdSw��d|�dS)Nz!shouldn't allow %r.__class__ = %rr�z shouldn't allow del %r.__class__)r�r�r�r�r�)r\r�ryr;r<�cant�s
��z6ClassPropertiesAndMethods.test_set_class.<locals>.cantrfc@r)z5ClassPropertiesAndMethods.test_set_class.<locals>.IntNr�r;r;r;r<�Int�sr@Trgc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.Gr?rRNr�r;r;r;r<r��r�r�c@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.HrRr?Nr�r;r;r;r<r&�r�r&c@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.Ir?rRNr�r;r;r;r<rX�r�rXc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.JrWrRNr�r;r;r;r<�J�r�rAc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.K)r?rRrJNr�r;r;r;r<�K�r�rBc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.LrNr�r;r;r;r<r��rr�c@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.MrNr�r;r;r;r<r��rr�c@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.Nr7Nr�r;r;r;r<r��rr�c@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.PrFNr�r;r;r;r<�P�rrCc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.QNrr;r;r;r<�Q�rrDc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.RrFr7Nr�r;r;r;r<�R�r�rEz0assigning %r as __class__ for %r silently failedc@r)z3ClassPropertiesAndMethods.test_set_class.<locals>.ONrr;r;r;r<�O
rrFcr�)z3ClassPropertiesAndMethods.test_set_class.<locals>.Acs
�|_dSr�r6ry�rFr;r<r
r�z;ClassPropertiesAndMethods.test_set_class.<locals>.A.__del__N�r�r�r�rr;rGr;r<r:
r�r:csg|]}���qSr;r;r�)r:r;r<r�
sz<ClassPropertiesAndMethods.test_set_class.<locals>.<listcomp>r�)
r#r�r�r2r)rrDr?rBr�)r6r�rrJr�r��cls2r\r?r@�or�r&rXrArBr�r�r�rCrDrEr�r;)r:rFr6r<�test_set_class�sx�


*

�

�
�z(ClassPropertiesAndMethods.test_set_classc	s�Gdd�dt�}|�}ddi|_��|jd��fdd���|d��|g��|d�|`Gdd�dt�����fd	d
�}Gdd�dt��}Gd
d�d�t�}Gdd�dt|d�}Gdd�dt|d�}|||fD] }||�|j}	zd|	d<Wn	ty�Yqiw��d|�qiGdd�dtj��}
Gdd�d�tj�}|
|fD]}|d�}
||
�d|
jd<q�dd�}Gdd�dt	��}Gdd �d �t	�}t	||fD]}|�}d!di|_��|j
d���||�|t���q�dS)"Nc@r)z2ClassPropertiesAndMethods.test_set_dict.<locals>.CNrr;r;r;r<r�
rir�rRrfc	s:z||_WnttfyYdSw��d||f�dS)Nz shouldn't allow %r.__dict__ = %r)rFr�r�r�)r\r�ryr;r<r?
s
�z5ClassPropertiesAndMethods.test_set_dict.<locals>.cantc@r)z5ClassPropertiesAndMethods.test_set_dict.<locals>.BaseNrr;r;r;r<r�
rr�c	s~�|i�z|`WnttfyYnw��d|��jd}z|�|i�Wnttfy5YdSw��d|�dS)zR
            x has to be an instance of a class inheriting from Base.
            zshouldn't allow del %r.__dict__rFz&dict_descr allowed access to %r's dictN)rFr�r�r�rM)r\�
dict_descr�r�r?r6r;r<�verify_dict_readonly
s
�
�zEClassPropertiesAndMethods.test_set_dict.<locals>.verify_dict_readonlyc@r)z6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta1Nrr;r;r;r<�Meta11
rrOc@r)z6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta2Nrr;r;r;r<�Meta23
rrPc@r)z2ClassPropertiesAndMethods.test_set_dict.<locals>.DNrr;r;r;r<r5
rrrc@r)z2ClassPropertiesAndMethods.test_set_dict.<locals>.ENrr;r;r;r<rJ7
rrJ�eggsr�z%r's __dict__ can be modifiedc@r)z8ClassPropertiesAndMethods.test_set_dict.<locals>.Module1Nrr;r;r;r<�Module1D
rrRc@r)z8ClassPropertiesAndMethods.test_set_dict.<locals>.Module2Nrr;r;r;r<�Module2F
rrSc	Ss$z|`WdSttfyYdSw)NFT)rFr�r�)rr;r;r<�can_delete_dictQ
s��z@ClassPropertiesAndMethods.test_set_dict.<locals>.can_delete_dictc@r)z;ClassPropertiesAndMethods.test_set_dict.<locals>.Exception1Nrr;r;r;r<�
Exception1X
rrUc@r)z;ClassPropertiesAndMethods.test_set_dict.<locals>.Exception2Nrr;r;r;r<�
Exception2Z
rrVr?)r#rFrBrRrDr�r�r�r�r&r?r�)r6r�r?rNrOrPrrJr��
class_dictrRrSr�r�rTrUrV�
ExceptionTyperr;rMr<�
test_set_dict	
sN



�
�z'ClassPropertiesAndMethods.test_set_dictcs�G�fdd�dt��|�t�d��d��d�|�t�d�d�d�|�td�d��d�|�t�d��d��d�|�td�d��d�|�t�d�d�d�|�tt�d��d��d���d�Gd	d
�d
t�}dS)Ncs@eZdZdd�Z�fdd�ZeZd
�fdd�	Zd
�fdd	�	ZdS)zBClassPropertiesAndMethods.test_binary_operator_override.<locals>.IcSsdt|�S)NzI(%r)�r)ryr;r;r<r�e
r�zKClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__repr__cs�t|�t|��Sr�rZr��rXr;r<rPg
r
zJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__add__Ncs:|dur�tt|�t|���S�tt|�t|�t|���Sr��rr)�r6r�r�r[r;r<�__pow__j
szJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__pow__cs<|dur�tt|�t|�|��S�tt|�t|�t|���Sr�r\r]r[r;r<�__rpow__o
szKClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__rpow__r�)r�r�r�r�rPr�r^r_r;r[r;r<rXd
srXrfrgzI(3)rizI(8)rvc@r�)zBClassPropertiesAndMethods.test_binary_operator_override.<locals>.ScSs|��|��kSr�)r�r�r;r;r<r }
rkzIClassPropertiesAndMethods.test_binary_operator_override.<locals>.S.__eq__Nr!r;r;r;r<�S|
r�r`)r)rBr�rr�)r6r`r;r[r<�test_binary_operator_overrideb
s$z7ClassPropertiesAndMethods.test_binary_operator_overridec	CszGdd�dt�}Gdd�d|�}Gdd�d|�}Gdd�d||�}|�}t|�}d	d
�|_|�t|�d�dd
�|_|�t|�d
�dd
�|_|�t|�d�dd
�|_|�t|�d�d|_|�tt|�|`|�t|�d�d|_|�tt|�|`|�t|�d
�d|_|�tt|�|`|�t|�d�d|_|�tt|�|`|�t|�|�d|_d|_|�|jd�|�|jd�dd�}||_|�|jd�|�|jd�dd�}||_	|�|j
d�|�|jd�|�|jd�|`|�|jd�|`|�|jd�|�|jd�|`	z|jWn
t�yYnw|�d�Gdd�dt�}Gdd�d|�}~t
��dd
�|_dS)Nc@r�z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.ANrr;r;r;r<r:�
rr:c@r�z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.BNrr;r;r;r<r?�
rr?c@r)z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.CNrr;r;r;r<r��
rr�c@r)z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.DNrr;r;r;r<r�
rrcSr�r-r;ryr;r;r<rR�
r�zEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>r�cSr�)N�:r;ryr;r;r<rR�
r�rdcSr�)N�r;ryr;r;r<rR�
r�recSr�r�r;ryr;r;r<rR�
r�r�cSs|dkrdSt�||�S)Nr�r�)r#r�r�r;r;r<r��
szMClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattribute__r�cSs|dvrdSt|��)N)r�r�r�r�rUr�r;r;r<r]�
szHClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattr__r�zd.foo should be undefined nowc@rrbrr;r;r;r<r:�
rc@rrcrr;r;r;r<r?�
rcWr�r�r;rhr;r;r<rR�
r�)r#r2r3rBr�r�r�r�r�r]r�r�r�rr+ra)	r6r:r?r�rrJ�	orig_hashr�r]r;r;r<�test_subclass_propagation�
sx




�
z3ClassPropertiesAndMethods.test_subclass_propagationcCs�ddl}Gdd�dt�}d}||�}|�|�|�|�|��Gdd�dt�}|d�}z
|�|�|�d�WdStyAYdSw)	Nrc@r)zBClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyBytesNrr;r;r;r<r��
rr�rc@r)z@ClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyIntNrr;r;r;r<r��
rr�r�z2subclass of int should not have a buffer interface)�binasciir�rB�b2a_hexr)r�r�)r6rhr�r�rLr�r;r;r<�test_buffer_inheritance�
s
�z1ClassPropertiesAndMethods.test_buffer_inheritancecs�ddl�ddl}G�fdd�dt�}|d�}|�t|�|�|�tt|��t�|�tt|��t�|�t|�d�|�t|�d�|�t|�d�|�|��d�|�|��d�dS)Nrc� eZdZ�fdd�Zdd�ZdS)zGClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstringcs��|�d���d�S)N�ascii)ri�encode�decodery�rhr;r<r��
r�zOClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__str__cSs|dS)Nz reprr;ryr;r;r<r��
rYzPClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__repr__N)r�r�r�r�r�r;ror;r<�octetstring�
r�rpr:�A�41zA repr)	rh�ior�rBrDr��ordr�r�)r6rsrprJr;ror<�test_str_of_str_subclass�
sz2ClassPropertiesAndMethods.test_str_of_str_subclasscCsDdd�}|�|jdd�d�t�}tj|dddd�|�|d	�dS)
NcSrr�r;rhr;r;r<ro�
r�z;ClassPropertiesAndMethods.test_keyword_arguments.<locals>.fr�rhuabc½€�latin1r�)�encodingrsabc�?)rBr*�	bytearrayr0)r6ro�bar;r;r<�test_keyword_arguments�
s�z0ClassPropertiesAndMethods.test_keyword_argumentscCsHGdd�dt�}|�|_z|��Wn
tyYdSw|�d�dS)Nc@r)z8ClassPropertiesAndMethods.test_recursive_call.<locals>.ANrr;r;r;r<r:rr:z7Recursion limit should have been reached for __call__())r#r*�RecursionErrorr�r�r;r;r<�test_recursive_calls�z-ClassPropertiesAndMethods.test_recursive_callcs�g�G�fdd�dt�}|�}|��g�~t��|��dg�Gdd�dt�}|�}z|d=Wn
ty;YdSw|�d�dS)Ncr�)z5ClassPropertiesAndMethods.test_delete_hook.<locals>.Ccr,r�r�ry�r�r;r<rrBz=ClassPropertiesAndMethods.test_delete_hook.<locals>.C.__del__NrHr;r}r;r<r�r�r�rfc@r)z5ClassPropertiesAndMethods.test_delete_hook.<locals>.DNrr;r;r;r<rrirrz$invalid del() didn't raise TypeError)r#rBrr+r�r�)r6r�rWrrJr;r}r<�test_delete_hooksz*ClassPropertiesAndMethods.test_delete_hookcCs�Gdd�dt�}|�}zt|�Wn	tyYnw|�d�Gdd�dt�}|�}zt|�Wn
ty;YdSw|�d�dS)Nc@r)z?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mydictNrr;r;r;r<�mydict$rrz#hash() of dict subclass should failc@r)z?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mylistNrr;r;r;r<�mylist.rr�z#hash() of list subclass should fail)r�r2r�r�r2)r6rrJr�r;r;r<�test_hash_inheritance!s �
�z/ClassPropertiesAndMethods.test_hash_inheritancecCs�zddWn	tyYnw|�d�zd�d�Wn	ty%Ynw|�d�zd�dg�Wn	ty<Ynw|�d�zd�d�Wn	tyRYnw|�d	�zd
dWn	tygYnw|�d�zdiWn	ty|Ynw|�d
�zddWn	ty�Ynw|�d�zddWn	ty�Ynw|�d�zddWn	ty�Ynw|�d�zddWn	ty�Ynw|�d�|�d��d�|�d��d�|�ddd�|�ddd�dS)Nr?rvz'' + 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%*srz''%*s' % ('abc') doesn't raise TypeErrorz%*.*s)rrvz,'%*.*s' % ('abc', 5) doesn't raise TypeErrorz%s�rfrgz%'%s' % (1, 2) doesn't raise TypeError�%z#'%' % None doesn't raise ValueError�534253rf�534253xz%c�)r�r��splitr�r��rindexrB�isdigitryr;r;r<�test_str_operations8sD









z-ClassPropertiesAndMethods.test_str_operationscCs2Gdd�d�}|�}|�}||_||_t|�}dS)Nc@r)z?ClassPropertiesAndMethods.test_deepcopy_recursive.<locals>.NodeNrr;r;r;r<r�hrr�)rRr?r)r6r�r?rRr,r;r;r<�test_deepcopy_recursivefsz1ClassPropertiesAndMethods.test_deepcopy_recursivecCsjddlm}|�|�}t|�|�|d�|�|d�|�|d�|�|j�d|_|�|jddi�dS)Nr)r�r��__file__r�rf)	r�r�r�r�r�r�rFr�rB)r6r�rLr;r;r<�test_uninitialized_modulesps
z4ClassPropertiesAndMethods.test_uninitialized_modulescsNG�fdd�dt�}Gdd�d|��|�|d�gd��|��d�gd���d�}|�|jd�|d�}|�|��|�|jd��d�}|�|��|�|jd�Gdd�dt�}|�|dd	�|dd	f�Gd
d�d|��|��dd	��dd	f�Gdd�dt�}|�|dd	�||dd	f�Gdd�d|��|��dd	���dd	f�dS)
Ncr�)�3ClassPropertiesAndMethods.test_funny_new.<locals>.Ccs0t|t�r	gd�St|t�rt���St�|�S)Nrh)r�r�r)r#r�rmr�r;r<r�s
�;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__Nrr;r�r;r<r�~r�r�c@r�)�3ClassPropertiesAndMethods.test_funny_new.<locals>.DcSr�r�r��r6rnr;r;r<r0�r�z<ClassPropertiesAndMethods.test_funny_new.<locals>.D.__init__Nr�r;r;r;r<r�r�rrrhrfc@rW)r�cWrr�r;r�r;r;r<r��ryr�N)r�r�r�r+r�r;r;r;r<r���rgc@r�r�Nrr;r;r;r<r�rc@rW)r�cWrr�r;r�r;r;r<r��ryr�N)r�r�r�r{r�r;r;r;r<r��r�c@rr�rr;r;r;r<r�r)r#rBr�r�)r6r�rJr;r�r<�test_funny_new|s(z(ClassPropertiesAndMethods.test_funny_newcCs�Gdd�dt�}|�}|}|d9}|�||df�|}|d9}|�||df�|}|d9}|�||df�|}|d9}|�||df�|}|d9}|�||df�|}|d9}|�||df�dS)Nc@r�)z2ClassPropertiesAndMethods.test_imul_bug.<locals>.CcSrkr�r;r�r;r;r<rp�rYz;ClassPropertiesAndMethods.test_imul_bug.<locals>.C.__imul__N)r�r�r�rpr;r;r;r<r��r�r�r�rgrilr��r#rB)r6r�r\r(r;r;r<�
test_imul_bug�s(z'ClassPropertiesAndMethods.test_imul_bugcs�ddl}G�fdd�dt�}|d�}|�d���|jd���|��d�|�|�}��|jd���|��d�|�|�}��|jd���|��d�dS)Nrcs<eZdZddd�Zddd�Zdd�Zdd	�Z�fd
d�ZdS)
z7ClassPropertiesAndMethods.test_copy_setstate.<locals>.CNcSs||_||_dSr�)r��_C__foor�r;r;r<r0�r$z@ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__init__cSr�r�r�r�r;r;r<�setfoo�r�z>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.setfoocSr�r�)r�ryr;r;r<�getfoo�r�z>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.getfoocSs|jgSr�r�ryr;r;r<�__getstate__�rYzDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__getstate__cs$��t|�d�|d|_|_dSr�)rBr�r�r�)r%�lstryr;r<�__setstate__�szDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__setstate__r�)r�r�r�r0r�r�r�r�r;ryr;r<r��s

r�r�r�)r�r#r�rBr�r�r)r6r�r�r?rRr;ryr<�test_copy_setstate�s


z,ClassPropertiesAndMethods.test_copy_setstatecCs�|�ddd�d�|�dtd�d�|�t�dtd��d�Gdd�dt�}|�|d�dd�d�|�|d�td�d�|�|d��td��d�|�ddd�d�|�dtd�d�|�t�dtd��d�Gd	d
�d
t�}|�|d�dd�d�|�|d�td�d�|�|d��td��d�|�gd�dd�ddg�|�gd�td�ddg�|�t�gd�td��ddg�Gdd
�d
t�}|�|gd��dd�ddg�|�|gd��td�ddg�|�|gd���td��ddg�|gd��}ddg|tdd�<|�|gd��ddg|tddd�<|�|gd��|�tdd�ddg�|�|gd��|�tddd�ddg�|�|gd��dS)Nr�rl�hellc@r�)z0ClassPropertiesAndMethods.test_slices.<locals>.ScS�t�||�Sr�)r�rUr[r;r;r<rU�r�z<ClassPropertiesAndMethods.test_slices.<locals>.S.__getitem__Nrr;r;r;r<r`�r�r`rhrgr�c@r�)z0ClassPropertiesAndMethods.test_slices.<locals>.TcSr�r�)r�rUr[r;r;r<rU�r�z<ClassPropertiesAndMethods.test_slices.<locals>.T.__getitem__Nrr;r;r;r<rg�r�rgrfc@r�)z0ClassPropertiesAndMethods.test_slices.<locals>.LcSr�r�)r2rUr[r;r;r<rU�r�z<ClassPropertiesAndMethods.test_slices.<locals>.L.__getitem__Nrr;r;r;r<r��r�r�ri)rfrirgr)rirfrg)rirgrf)rgrirf)rBrXr�rUr�r2ra)r6r`rgr�r?r;r;r<�test_slices�s<   "z%ClassPropertiesAndMethods.test_slicescsDG�fdd�dt����}d|_~t��|�t�j�d��`dS)NcseZdZgZ�fdd�ZdS)z>ClassPropertiesAndMethods.test_subtype_resurrection.<locals>.Ccs�j�|�dSr�)�	containerr}ryr�r;r<r
r�zFClassPropertiesAndMethods.test_subtype_resurrection.<locals>.C.__del__N)r�r�r�r�rr;r�r;r<r�sr�r�rf)r#r;rr+rBr�r�r)r6rWr;r�r<�test_subtype_resurrectionsz3ClassPropertiesAndMethods.test_subtype_resurrectioncCs0Gdd�dt�}d}td�D]}||�}q~dS)Nc@seZdZdgZdd�ZdS)z9ClassPropertiesAndMethods.test_slots_trash.<locals>.trashr\cSr�r�r�r[r;r;r<r0"r�zBClassPropertiesAndMethods.test_slots_trash.<locals>.trash.__init__N)r�r�r�r�r0r;r;r;r<�trash r�r�iP�)r#r�)r6r�rJr�r;r;r<�test_slots_trashs

z*ClassPropertiesAndMethods.test_slots_trashcCsnGdd�dt�}Gdd�dt�}Gdd�d||�}t��r%|�|j|j�|�|d�|�|d�d	|�_dS)
Nc@r�)zDClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.Ar;Nr�r;r;r;r<r:+r�r:c@r)zDClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.BNrr;r;r;r<r?-rr?c@r�)zDClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.Cr;Nr�r;r;r;r<r�/r�r�rFr7rg)r#rr�rB�
__basicsize__r�r\)r6r:r?r�r;r;r<�test_slots_multiple_inheritance)sz9ClassPropertiesAndMethods.test_slots_multiple_inheritancecCsZGdd�dt�}|�}|�|dd�|�|dd�|�d|d�|�d|d�dS)Nc@rU)z.ClassPropertiesAndMethods.test_rmul.<locals>.CcSr�)Nr	r;r�r;r;r<rr;r�z6ClassPropertiesAndMethods.test_rmul.<locals>.C.__mul__cSr�)N�rmulr;r�r;r;r<rt=r�z7ClassPropertiesAndMethods.test_rmul.<locals>.C.__rmul__N)r�r�r�rrrtr;r;r;r<r�:r^r�rgr	g������@r�r�rr;r;r<�	test_rmul7sz#ClassPropertiesAndMethods.test_rmulcCs"Gdd�dt�}|�}|dC}dS)Nc@r�)z.ClassPropertiesAndMethods.test_ipow.<locals>.CcSr�r�r;r�r;r;r<�__ipow__Ir�z7ClassPropertiesAndMethods.test_ipow.<locals>.C.__ipow__N�r�r�r�r�r;r;r;r<r�Hr�r�rgrarr;r;r<�	test_ipowEsz#ClassPropertiesAndMethods.test_ipowcCslGdd�d�}Gdd�d|�}Gdd�d|�}|�}|�}|�}||C}|�|d�||C}|�|d�dS)	Nc@r�)zFClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.AcSr�r�r�r�r;r;r<r�Pr�zOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.A.__ipow__Nr�r;r;r;r<r:Or�r:c@r�)zFClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.BcSr�r�r;r�r;r;r<r_Tr�zOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.B.__rpow__N�r�r�r�r_r;r;r;r<r?Sr�r?c@r�)zFClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.CcSr�r�r;r�r;r;r<r^Xr�zNClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.C.__pow__N�r�r�r�r^r;r;r;r<r�Wr�r�rfrgr�)r6r:r?r�r?rRrWr;r;r<�!test_ipow_returns_not_implementedNsz;ClassPropertiesAndMethods.test_ipow_returns_not_implementedcCs2Gdd�d�}t�}|�}||C}|�|d�dS)Nc@r�)z1ClassPropertiesAndMethods.test_no_ipow.<locals>.BcSr�r�r;r�r;r;r<r_fr�z:ClassPropertiesAndMethods.test_no_ipow.<locals>.B.__rpow__Nr�r;r;r;r<r?er�r?rfr�)r6r?r?rRr;r;r<�test_no_ipowds
z&ClassPropertiesAndMethods.test_no_ipowcCs�d}|�t��}|dC}Wd�n1swY|�dt|j��|�t��}|d}Wd�n1s8wY|�dt|j��dS)Nrgz#unsupported operand type(s) for **=z"unsupported operand type(s) for **)r�r�r�r�r�)r6r\rur(r;r;r<�test_ipow_exception_textns
�
�z2ClassPropertiesAndMethods.test_ipow_exception_textc
s�Gdd�dt�}G�fdd�dt��Gdd�d|�}Gdd�d|�}|�}|�}|f|_�f|_|�|��d	�|�|��d	�|�|jd
�|�|jd
�|����|g�z|`WnttfyfYnw|�d�zd|_Wnty�}zt	|�d
kr�|�d�WYd}~n
d}~ww|�d�z|f|_Wn	ty�Ynw|�d�z||f|_Wn	ty�Ynw|�d�z|f|_Wn
ty�YdSw|�d�dS)Nc@r)z7ClassPropertiesAndMethods.test_mutable_bases.<locals>.CNrr;r;r;r<r�|rr�cr�)z8ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2cs|dkrdSt�|��|�S)Nr?rg)r2r��r6r;)r�r�r;r<r�szIClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.__getattribute__cSr�r�r;ryr;r;r<rI�r�z=ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.meth)r�r�r�r�rIr5r;�r�r6r<r�~sr�c@r)z7ClassPropertiesAndMethods.test_mutable_bases.<locals>.DNrr;r;r;r<r�rrc@r)z7ClassPropertiesAndMethods.test_mutable_bases.<locals>.ENrr;r;r;r<rJ�rrJrfrgz&shouldn't be able to delete .__bases__r;z/a new-style class can't have only classic basesz'wrong error message for .__bases__ = ()z)shouldn't be able to set .__bases__ to ()z.shouldn't be able to create inheritance cyclesz#didn't detect repeated base classes)
r#rGrBrIr?r�r�r�r�r�)r6r�rrJrJrr�r;r�r<�test_mutable_basesxsZ�


��
�
�
�z,ClassPropertiesAndMethods.test_mutable_basescCs�dd�tj��D�}|D]}t�|d�|tur"|�t|j�d|�qGdd�dt�}Gdd�dt�}Gd	d
�d
|�}zt	f|_Wn	t
yJYnw|�d�zt	ft_Wn	t
y_Ynw|�d�z|tf|_Wn
t
yvYdSw|�d
�dS)NcSsg|]	}t|t�r|�qSr;)r�rD)r��tpr;r;r<r��s
�z@ClassPropertiesAndMethods.test_builtin_bases.<locals>.<listcomp>rGrfc@r)z7ClassPropertiesAndMethods.test_builtin_bases.<locals>.LNrr;r;r;r<r��rr�c@r)z7ClassPropertiesAndMethods.test_builtin_bases.<locals>.CNrr;r;r;r<r��rr�c@r)z7ClassPropertiesAndMethods.test_builtin_bases.<locals>.DNrr;r;r;r<r�rrz/shouldn't turn list subclass into dict subclassz-shouldn't be able to assign to list.__bases__z#best_base calculation found wanting)�builtinsrF�valuesr#r�rBr�rGr2r�r�r�)r6�
builtin_typesr�r�r�rr;r;r<�test_builtin_bases�s6��
�
�z,ClassPropertiesAndMethods.test_builtin_basescCs~|�t��Gdd�dtd��}Wd�n1swY|�t��Gdd�dttd��}Wd�n1s:wY|�t��Gdd�dtd�t�}Wd�n1sZwYGdd�dt�}|�t��Gdd�d|td��}Wd�n1s�wY|�t��Gdd�dtd�|�}Wd�n1s�wYGd	d�dt�}|�t��td�f|_Wd�n1s�wY|�t��ttd�f|_Wd�n1s�wY|�t��td�tf|_Wd�n1s�wY|�t��|td�f|_Wd�n	1�swY|�t��td�|f|_Wd�dS1�s8wYdS)
Nc@r�z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XNrr;r;r;r<r��rr�c@rr�rr;r;r;r<r��rc@rr�rr;r;r;r<r��rc@r)z>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.ONrr;r;r;r<rF�rrFc@rr�rr;r;r;r<r��rc@rr�rr;r;r;r<r��rc@rr�rr;r;r;r<r��r)r�r�rDr#rG)r6r�rFr;r;r<�test_unsubclassable_types�s@���������$�z3ClassPropertiesAndMethods.test_unsubclassable_typesc
s�G�fdd�dt��Gdd�dt�}Gdd�dt�}Gdd�dt�}Gd	d
�d
|�}Gdd�d|�}Gd
d�d|�d�}Gdd�d||d�}|j}|j}	z|f|_Wntyj|�|j|�|�|j|	�YdSw|�d�dS)Ncr�)zOClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOncecsd|_t�|���|||�Sr�)�flagr2r�)r6r9rrr)�WorkOncer�r;r<r�szWClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.__new__cSs*|jdkr	td��|jd7_t�|�S)Nr�bozorf)r�rqrDr�ryr;r;r<r�s

zSClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.mro)r�r�r�r�r�r5r;�r�r6r<r�sr�c@r�)zQClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlwayscSr�r�)rDr�ryr;r;r<r�s
zUClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlways.mroNr�r;r;r;r<�
WorkAlwaysr�r�c@r)zHClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.CNrr;r;r;r<r�rr�c@r)zIClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.C2Nrr;r;r;r<r�rr�c@r)zHClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.DNrr;r;r;r<rrrc@r)zHClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.ENrr;r;r;r<rJrrJc@r)zHClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.FNrr;r;r;r<r�"rr�rc@r)zHClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.GNrr;r;r;r<r�%rr�zexception not propagated)rDr#r�rGrqrBr�)
r6r�r�r�rrJr�r��E_mro_before�D_mro_beforer;r�r<�#test_mutable_bases_with_failing_mros"�z=ClassPropertiesAndMethods.test_mutable_bases_with_failing_mrocCs�Gdd�dt�}Gdd�dt�}Gdd�d||�}Gdd�d||�}Gd	d
�d
||�}z||f|_Wn
ty<YdSw|�d�dS)Nc@r)zJClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ANrr;r;r;r<r:9rr:c@r)zJClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.BNrr;r;r;r<r?<rr?c@r)zJClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.CNrr;r;r;r<r�?rr�c@r)zJClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.DNrr;r;r;r<rBrrc@r)zJClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ENrr;r;r;r<rJErrJzdidn't catch MRO conflict)r#rGr�r�)r6r:r?r�rrJr;r;r<�%test_mutable_bases_catch_mro_conflict7s�z?ClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflictcCsVGdd�dt�}|j}d|_|�|j|jf|df�d|_|�|j|jf|df�dS)Nc@r)z7ClassPropertiesAndMethods.test_mutable_names.<locals>.CNrr;r;r;r<r�Qrr�rzD.E)r#r�r�rB)r6r�r�r;r;r<�test_mutable_namesOsz,ClassPropertiesAndMethods.test_mutable_namescs6G�fdd�dt�}Gdd�d��|d��_d�_dS)Ncr�)z<ClassPropertiesAndMethods.test_evil_type_name.<locals>.Nastycs
d�_dS)Nr�)r�ryr�r;r<rbr�zDClassPropertiesAndMethods.test_evil_type_name.<locals>.Nasty.__del__NrHr;r�r;r<�Nastyar�r�c@r)z8ClassPropertiesAndMethods.test_evil_type_name.<locals>.CNrr;r;r;r<r�err�r�normal)r�r�)r6r�r;r�r<�test_evil_type_name]s

z-ClassPropertiesAndMethods.test_evil_type_namecCsGdd�dt�}|�|d�dd�|�d|d�d�Gdd�dt�}|�|�dd�|�d|�d	�Gd
d�d|�}|�|�|�d�|�|�|�d
�Gdd�d|�}|�|j|j�|�|�dd�|�d|�d	�|�|�|�d�|�|�|�d�dS)Nc@rU)z;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.BcSr�)N�B.__floordiv__r;r�r;r;r<�__floordiv__tr�zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__floordiv__cSr�)N�B.__rfloordiv__r;r�r;r;r<�
__rfloordiv__vr�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__rfloordiv__N�r�r�r�r�r�r;r;r;r<r?sr^r?rfr�r�c@rU)z;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.CcSr�)N�C.__floordiv__r;r�r;r;r<r�r�zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__floordiv__cSr�)N�C.__rfloordiv__r;r�r;r;r<r��r�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__rfloordiv__Nr�r;r;r;r<r�~r^r�r�r�c@rU)z;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.DcSr�)N�D.__floordiv__r;r�r;r;r<r��r�zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__floordiv__cSr�)N�D.__rfloordiv__r;r�r;r;r<r��r�zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__rfloordiv__Nr�r;r;r;r<r�r^rr�r�c@r)z;ClassPropertiesAndMethods.test_subclass_right_op.<locals>.ENrr;r;r;r<rJ�rrJ)r)rBr#r�)r6r?r�rrJr;r;r<�test_subclass_right_opksz0ClassPropertiesAndMethods.test_subclass_right_opz)testing an internal kind of method objectcCs,gd�}dddd�}|�t�|�|�|�i�|�|�tjd}|�|�dt�|�|�|�|�i�|�|�z|�dd�Wn	tyIYnw|�d�z|�d�Wn	ty_Ynw|�d�z|�dd�Wn	tyvYnw|�d�z|�dt�Wn
ty�YdSw|�d�dS)Nrh�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))rBr�r�rFr'r�r�r))r6rnrHr2r;r;r<�test_meth_class_get�s>
�
�
�
�z-ClassPropertiesAndMethods.test_meth_class_getcCs�Gdd�dt�}Gdd�d�}|�}||�}|�||�|�||�Gdd�d|�}|�}||�}|�||�|�||�Gdd�dt�}|�}||�}|�||�|�||�Gdd�d|�}|�}||�}|�||�|�||�dS)	Nc@rU)z<ClassPropertiesAndMethods.test_isinst_isclass.<locals>.ProxycSr�r���_Proxy__objr�r;r;r<r0�r�zEClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__init__cS�"|�d�rt�||�St|j|�S�N�_Proxy__�r%r#r�rEr�r�r;r;r<r���
zMClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__getattribute__N�r�r�r�r0r�r;r;r;r<r:�r^r:c@r�z8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.CNrr;r;r;r<r��rr�c@r�z8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DNrr;r;r;r<r�rrc@rr�rr;r;r;r<r��rc@rr�rr;r;r;r<r�r)r#r�)r6r:r�r?�parr;r;r<�test_isinst_isclass�s*	z-ClassPropertiesAndMethods.test_isinst_isclasscs\Gdd�dt�}Gdd�dt�}G�fdd�d|����}||�}|��jd|�d�dS)	Nc@rU)z9ClassPropertiesAndMethods.test_proxy_super.<locals>.ProxycSr�r�r�r�r;r;r<r0�r�zBClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__init__cSr�r�r�r�r;r;r<r��r�zJClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__getattribute__Nr�r;r;r;r<r:�r^r:c@r�)z5ClassPropertiesAndMethods.test_proxy_super.<locals>.BcSr�)NzB.fr;ryr;r;r<ro�r�z7ClassPropertiesAndMethods.test_proxy_super.<locals>.B.fNr�r;r;r;r<r?�r�r?cr�)z5ClassPropertiesAndMethods.test_proxy_super.<locals>.Ccst�|���dS)Nz->C.f)r2rory)r�r�r;r<rorhz7ClassPropertiesAndMethods.test_proxy_super.<locals>.C.f)r�r�r�ror5r;r�r6r<r�r>r�rozB.f->C.f)r#rBrF)r6r:r?r�rdr;r�r<�test_proxy_super�s	z*ClassPropertiesAndMethods.test_proxy_supercCsdz	t�tdd�Wn	tyYnw|�d�zt�td�Wn
ty*YdSw|�d�dS)Nr�r�z"Carlo Verre __setattr__ succeeded!r�z"Carlo Verre __delattr__ succeeded!)r#r�r�r�r�r�ryr;r;r<�test_carloverres�
�z)ClassPropertiesAndMethods.test_carloverrecCsjGdd�dt�}Gdd�d�}Gdd�d||�}|dtfi�}zd|_WdSty4|�d	�YdSw)
Nc@r�)zHClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.AcS�t�|||�dSr�)rDr��r�r�r�r;r;r<r�rhzTClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.A.__setattr__N�r�r�r�r�r;r;r;r<r:r�r:c@r)zHClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.BNrr;r;r;r<r?rr?c@r)zHClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.CNrr;r;r;r<r�rr�rTz1setattr through direct base types should be legal�rDr#rr�r��r6r:r?r�r�r;r;r<�#test_carloverre_multi_inherit_valids�z=ClassPropertiesAndMethods.test_carloverre_multi_inherit_validcCslGdd�dt�}Gdd�d�}Gdd�d||�}|dtfi�}zd|_Wn
ty.YdSw|�d	�dS)
Nc@r�)zJClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.AcSr�r�)r#r�r�r;r;r<r�*rhzVClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.A.__setattr__Nr�r;r;r;r<r:)r�r:c@r)zJClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.BNrr;r;r;r<r?-rr?c@r)zJClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.CNrr;r;r;r<r�0rr�rTz6setattr through indirect base types should be rejectedr�r�r;r;r<�%test_carloverre_multi_inherit_invalid(s
�z?ClassPropertiesAndMethods.test_carloverre_multi_inherit_invalidcs@ddl�G�fdd�d�}Gdd�dt�}|�}||�|_~dS)Nrcrk)zAClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provokercs��|�|_dSr��rH)r6�	referrent�rGr;r<r0ArkzJClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__init__cSs|��}dSr�r�r[r;r;r<rDr�zIClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__del__N)r�r�r�r0rr;r�r;r<�Provoker@sr�c@r)z=ClassPropertiesAndMethods.test_weakref_segfault.<locals>.OopsNrr;r;r;r<�OopsGrr�)rGr#�whatever)r6r�r�rJr;r�r<�test_weakref_segfault;s
z/ClassPropertiesAndMethods.test_weakref_segfaultcCs$dd�}td�D]}|j}qd}dS)NcSr�r�r;r;r;r;r<rRPr�zAClassPropertiesAndMethods.test_wrapper_segfault.<locals>.<lambda>i@B)r�r*)r6ror�r;r;r<�test_wrapper_segfaultNsz/ClassPropertiesAndMethods.test_wrapper_segfaultcCshtj}Gdd�d�}|�t_z!ztd�Wn	tyYnw|�d�W|t_dSW|t_dS|t_w)Nc@r�)z>ClassPropertiesAndMethods.test_file_fault.<locals>.StdoutGuardcSstjt_td|��)Nz!Premature access to sys.stdout.%s)r��
__stdout__�stdoutrqr�r;r;r<r]YszJClassPropertiesAndMethods.test_file_fault.<locals>.StdoutGuard.__getattr__N�r�r�r�r]r;r;r;r<�StdoutGuardXr�r�zOops!zDidn't raise RuntimeError)r�r��printrqr�)r6�test_stdoutr�r;r;r<�test_file_faultUs�
�z)ClassPropertiesAndMethods.test_file_faultcspG�fdd�dt�}Gdd�dt��G�fdd�dt����}d|j|�<|�|jd�t��|�|d	�dS)
Ncr)zHClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.EvilcS�td�S)Nr;�r2ryr;r;r<r3nrYzQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__hash__cs z�`WdStyYdSwr�)r;r�r�r�r;r<r ps��zOClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__eq__N�r�r�r�r3r r;r�r;r<�Evilmrr�c@seZdZddd�ZdS)zIClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.DescrNcSr�r�r;)r6�obrDr;r;r<r'yr�zQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Descr.__get__r�rr;r;r;r<�Descrxrr�cr:)zEClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.CN)r�r�r�r;r;�r�r;r<r�|rr�rrfr;)r#rFrBr;rr+r�)r6r�rWr;)r�r�r<� test_vicious_descriptor_nonsensefsz:ClassPropertiesAndMethods.test_vicious_descriptor_nonsensecCs>Gdd�dt�}z|�Wn
tyYdSw|�d�dS)Nc@r�)z0ClassPropertiesAndMethods.test_init.<locals>.FoocSr�)Nr�r;ryr;r;r<r0�r�z9ClassPropertiesAndMethods.test_init.<locals>.Foo.__init__Nr�r;r;r;r<�Foo�r�rz'did not test __init__() for None return)r#r�r�)r6rr;r;r<�	test_init�s
�z#ClassPropertiesAndMethods.test_initcCs�|�t��||kWd�n1swY|�t��||kWd�n1s-wY|�t��||kWd�n1sFwY|�t��
||kWd�dS1s`wYdSr��r�r��r6r?rRr;r;r<�assertNotOrderable�s
�
�
�
"�z,ClassPropertiesAndMethods.assertNotOrderablecCs�g}|�|j|jk�|�|j|jk�|�|jgjk�|�|jgjk�|�|j|jk�|�|j|jk�|�|j|j�|�|jjd�|�|jj|�|�|jj	t
�|�|jjt
jj�t|j�dS)NrP)
r�rPr�rrrrBr�r�rs�__objclass__r2rr2�r6r�r;r;r<�test_method_wrapper�sz-ClassPropertiesAndMethods.test_method_wrappercCs�g}|�|j|jk�|�|j|jk�|�|jgjk�|�|jgjk�|�|j|jk�|�|j|jk�|�|j|j�|�|jjd�|�|jj|�|�|jj	t
jj	�t|j�dS)Nr})r�r}r��poprrBr�r�rsrr2r2rr;r;r<�test_builtin_function_or_method�sz9ClassPropertiesAndMethods.test_builtin_function_or_methodcCs�|�tjtjk�|�tjtjk�|�tjtjk�|�tjtjk�|�tjtj�|�tjjd�|�tjj	t�|�tj
tj
k�|�tj
tj
k�|�tj
tjk�|�tj
tjk�|�tj
tj
�|�tj
jd�|�tj
j	t�dS)NrPr})r�r2rPr�rrrrBr�r�rr}r	ryr;r;r<�!test_special_unbound_method_types�sz;ClassPropertiesAndMethods.test_special_unbound_method_typescs�ddl�dd�}��fdd�}tjd}tj}dD]c\}}}d|d	d�}td
d||i�}	|	�}
|||
|
�|||
|�|||
|�|r||||
|
�|||
|�|||
|�d|d	d�}td
d||i�}|�}
|||
|
�|||
|�|||
|�qdS)NrcSr�r�r�r�r;r;r<�
specialmethod�r�zEClassPropertiesAndMethods.test_not_implemented.<locals>.specialmethodcs@zt|||�d��Wn
tyYdSw��d|f�dS)N)r\r(�operatorzno TypeError from %r)r]r�r�)r:r\r(�r
r6r;r<r4�s�z=ClassPropertiesAndMethods.test_not_implemented.<locals>.checkrf))rPzx + yzx += y)�__sub__zx - yzx -= y)rrzx * 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 ^= y�__rrgr:r;�__ir�)r
r�r�rD)r6rr4�N1�N2r9r:�iexpr�rnamer:r?�inamer�rWr;rr<�test_not_implemented�s0
��z.ClassPropertiesAndMethods.test_not_implementedcCs4Gdd�dt�}|�}d|dd�<|�|jd�dS)Nc@r�)z6ClassPropertiesAndMethods.test_assign_slice.<locals>.CcSs
||_dSr��r�)r6�idxr�r;r;r<rar�zBClassPropertiesAndMethods.test_assign_slice.<locals>.C.__setitem__N)r�r�r�rar;r;r;r<r�r�r�rirfrg)r#rBr�)r6r�rWr;r;r<�test_assign_slice	sz+ClassPropertiesAndMethods.test_assign_slicecs�Gdd�dt�}|d��G�fdd�dt�}|�}|�|j��d|_|�|jd�Gdd�dt�}Gd	d�d|d
�}d|_|d�|_|�|jd�dS)Nc@rU)z<ClassPropertiesAndMethods.test_set_and_no_get.<locals>.DescrcSr�r��r9r�r;r;r<r0r�zEClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__init__cSs||j|j<dSr�)rFr9r�r;r;r<rMrkzDClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__set__N)r�r�r�r0rMr;r;r;r<r�sr�r?cr�z8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XNr�r;�r2r;r<r�"r�r�r�c@r)z;ClassPropertiesAndMethods.test_set_and_no_get.<locals>.MetaNrr;r;r;r<r=+rr=c@rr%rr;r;r;r<r�-rr)r#r�r?rBrD)r6r�r�r\r=r;r&r<�test_set_and_no_gets
z-ClassPropertiesAndMethods.test_set_and_no_getcs�Gdd�dt�}|��G�fdd�dt�}G�fdd�dt�}G�fdd�dt�}|�tt|�d	�|��jd
�|�tt|�d	�|��jd�|�tt|�d	�|��jd�G�fd
d�dt��|�tt��d	�dS)Nc@seZdZdZddd�ZdS)z@ClassPropertiesAndMethods.test_getattr_hooks.<locals>.DescriptorrNcs�fdd�}|S)Ncs�jd7_t|��r�)rdr�r$ryr;r<r]9szXClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__.<locals>.getterr;)r6r��objtyper]r;ryr<r'8szHClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__r�)r�r�r�rdr'r;r;r;r<�
Descriptor6sr)cr)z7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.AN)r�r�r�r�r;r&r;r<r:?r�r:cr)z7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.BNr�r;r&r;r<r?Ar�r?cseZdZ�Z�ZdS)z7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.CN)r�r�r�r�r]r;r&r;r<r�C�r�r;rfrgrlcr)zFClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattributecSst|��r�rUr�r;r;r<r]PrYzRClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattr__cs"�`td�D]}t��qt|���Nrv)r]r�r-�collectr�)r6r9r���EvilGetattributer;r<r�Rs
zWClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattribute__Nrr;r-r;r<r.Nsr.)r#r�r�rErBrd)r6r)r:r?r�r;)r.r2r<�test_getattr_hooks3s
z,ClassPropertiesAndMethods.test_getattr_hookscCs|�ttjtt�dSr�)r�r�rDr�r2ryr;r;r<�test_type___getattribute__Zr�z4ClassPropertiesAndMethods.test_type___getattribute__cCst|�tttd�Gdd�dt�}|�tt|d�Gdd�dt�}|�t��|`Wd�dS1s3wYdS)N�__abstractmethods__c@r)z<ClassPropertiesAndMethods.test_abstractmethods.<locals>.metaNrr;r;r;r<�meta`rr2c@r)z9ClassPropertiesAndMethods.test_abstractmethods.<locals>.XNrr;r;r;r<r�crr�)r�r�rErDr#r1)r6r2r�r;r;r<�test_abstractmethods]s"�z.ClassPropertiesAndMethods.test_abstractmethodscCs�Gdd�d�}|�}|�|t�|�t��
t�|�Wd�n1s%wY|�t��t�|d�Wd�dS1sAwYdS)Nc@seZdZeZdS)z:ClassPropertiesAndMethods.test_proxy_call.<locals>.FakeStrN)r�r�r�r�r�r;r;r;r<�FakeStrir�r4r)r�r�r�r�r�rP)r6r4�fake_strr;r;r<�test_proxy_callhs�"�z)ClassPropertiesAndMethods.test_proxy_callcCs<Gdd�d�}|j|_|�}|�tt|�|�tt|�dS)Nc@r)z7ClassPropertiesAndMethods.test_repr_as_str.<locals>.FooNrr;r;r;r<r{rr)r�r�r�r{r�r�)r6rr�r;r;r<�test_repr_as_strxs
z*ClassPropertiesAndMethods.test_repr_as_strcCs>Gdd�dt�}|�}d|_|�|dd�|�||�dS)Nc@seZdZejZejZdS)z>ClassPropertiesAndMethods.test_mixing_slot_wrappers.<locals>.XN)r�r�r�r�rar�r��__neg__r;r;r;r<r��rFr�r�r()r�r(rB)r6r�r\r;r;r<�test_mixing_slot_wrappers�s
z3ClassPropertiesAndMethods.test_mixing_slot_wrapperscCs�Gdd�dt�}|�}|�t��||kWd�n1swY|�t��
||Wd�dS1s9wYdS)Nc@seZdZejZejZdS)zBClassPropertiesAndMethods.test_wrong_class_slot_wrapper.<locals>.AN)r�r�r�r�r rPr;r;r;r<r:�rFr:)r)r�r�)r6r:r?r;r;r<�test_wrong_class_slot_wrapper�s
�
"�z7ClassPropertiesAndMethods.test_wrong_class_slot_wrappercCsR|�t��}Gdd�d�}Wd�n1swYt|j�}|�d|�dS)Nc@seZdZdgZdZdS)zEClassPropertiesAndMethods.test_slot_shadows_class_variable.<locals>.Xr�N)r�r�r�r�r�r;r;r;r<r��sr�z0'foo' in __slots__ conflicts with class variable)r�r�r�r�rB)r6rur�rLr;r;r<� test_slot_shadows_class_variable�s
�
z:ClassPropertiesAndMethods.test_slot_shadows_class_variablecCs�Gdd�d�}d|_|�|jd�|�t��}tt�jd�td�Wd�n1s,wY|�dt	|j
��|�t��}t|�jd�|�Wd�n1sTwY|�dt	|j
��|�|jd�dS)Nc@r�)z1ClassPropertiesAndMethods.test_set_doc.<locals>.X�elephantNr�r;r;r;r<r��r�r��bananar�blahz7cannot set '__doc__' attribute of immutable type 'list'z7cannot delete '__doc__' attribute of immutable type 'X')rrBr�r�rDr2rFrMr�r�r�r�)r6r�rur;r;r<�test_set_doc�s��z&ClassPropertiesAndMethods.test_set_doccCs4tjtjtjtjg}gd�}t||�D]\}}|�t	|�j
|d�q|D]}|jjd|j
}|�|j|�q%|�tjjd�|�tjjd�|�tjjd�|�tjjd�Gdd	�d	�}|�
t��
|`Wd�n1sqwY|�
tt	jd
jtd�Gdd
�d
�a|�tjd
�|�tjjd�dS)N)r\�member�getset�wrapper�_descriptor�.z	str.lowerzcomplex.realz
float.realzint.__add__c@r)z2ClassPropertiesAndMethods.test_qualname.<locals>.XNrr;r;r;r<r��rr�r��Oinkc@seZdZGdd�d�ZdS)r�c@r)�Y.InsideNrr;r;r;r<�Inside�rrGN)r�r�r�rGr;r;r;r<r��r�r�rF)r�r�r�r�r*r)rPr�rBrDr�rr�r�r�rFrMr�rG)r6�descriptorsr�rJ�n�qualnamer�r;r;r<�
test_qualname�s*��z'ClassPropertiesAndMethods.test_qualnamecCs^ddi}tdd|�}|�|jd�|�d|j�|�|ddi�ddi}|�ttdd|�dS)Nr�z	some.namerr;rf)rDrBr�r>rFr�r�)r6rrr�r;r;r<�test_qualname_dict�sz,ClassPropertiesAndMethods.test_qualname_dictcCs^Gdd�dt�}|�}d|_t�|�}~t��|�|��t��D]
}|�	t
|�|�q"dS)Nc@r�)z<ClassPropertiesAndMethods.test_cycle_through_dict.<locals>.XcSst�|�||_dSr�)r�r0rFryr;r;r<r0�s

zEClassPropertiesAndMethods.test_cycle_through_dict.<locals>.X.__init__Nr�r;r;r;r<r��r�r�r�)r�r;rGrHrr+�assertIsNoner-r�assertIsNotrD)r6r�r\�wrrJr;r;r<�test_cycle_through_dict�s
�z1ClassPropertiesAndMethods.test_cycle_through_dictcCs�Gdd�d�}|�t|d�|jt|dd�Gdd�d�}Gdd�d�}Gd	d
�d
||�}|||fD]}|d�|ddd�|�t|ddd�|jt|dddd
�q2dS)Nc@r)z[ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNeitherNrr;r;r;r<�OverrideNeither�rrQrfrqc@�eZdZddd�ZdS)zWClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNewrc_�tj|g|�Ri|��Sr�r�)r�r�r�r7r�r;r;r<r��r�z_ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNew.__new__Nrxrr;r;r;r<�OverrideNew�rrTc@rR)zXClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInitrc_rSr�)r#r0)r6r�r�r7r8r;r;r<r0�r�zaClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInit.__init__Nrxr�r;r;r;r<�OverrideInit�rrUc@r)zXClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideBothNrr;r;r;r<�OverrideBoth�rrVrgrir�r)r6rQrTrUrV�caser;r;r<�(test_object_new_and_init_with_parameters�s�zBClassPropertiesAndMethods.test_object_new_and_init_with_parameterscCs>Gdd�d�}Gdd�d|�}|�d|j�|�d|j�dS)Nc@r)z\ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.BaseNrr;r;r;r<r��rr�c@r)z[ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.SubNrr;r;r;r<r��rr�rF)r�rFr>)r6r�r�r;r;r<�4test_subclassing_does_not_duplicate_dict_descriptors�szNClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptorscsRGdd�d�}|�t|�j�d�Gdd�d�}Gdd�d|�}Gdd	�d	|�}|�}|�}|�}t||�}|�t|j�d
�|�t|j�d�|�t|j�d�|�t|j�d
�Gdd�d�}|�}	|�t|	j�d�|�t|j�d�Gdd�d�}
|
�}t�}t�||�}
|�t|
�d�d|_|�t|
�d�d|_|�t|
�d�dS)Nc@r�)�=ClassPropertiesAndMethods.test_bound_method_repr.<locals>.FoocSr�r�r;ryr;r;r<r\r��DClassPropertiesAndMethods.test_bound_method_repr.<locals>.Foo.methodN�r�r�r�r\r;r;r;r<rr�rz4<bound method .*Foo\.method of <.*Foo object at .*>>c@r�)z>ClassPropertiesAndMethods.test_bound_method_repr.<locals>.BasecSr�r�r;ryr;r;r<r\r�zEClassPropertiesAndMethods.test_bound_method_repr.<locals>.Base.methodNr\r;r;r;r<r�r�r�c@r)zBClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived1Nrr;r;r;r<�Derived1rr]c@r�)zBClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2cSr�r�r;ryr;r;r<r\r�zIClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2.methodNr\r;r;r;r<�Derived2r�r^z6<bound method .*Base\.method of <.*Base object at .*>>z:<bound method .*Base\.method of <.*Derived1 object at .*>>z><bound method .*Derived2\.method of <.*Derived2 object at .*>>z:<bound method .*Base\.method of <.*Derived2 object at .*>>c@rW)rZcSr�r�r;rr;r;r<r\!ryr[N)r�r�r�r{r\r;r;r;r<r r�z/<bound method .*Foo\.method of <class '.*Foo'>>c@r�)zDClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallablecSr�r�r;r�r;r;r<r*,r�zMClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallable.__call__N)r�r�r�r*r;r;r;r<�
MyCallable+r�r_z*<bound method \? of <object object at .*>>r9z,<bound method name of <object object at .*>>rJz0<bound method qualname of <object object at .*>>)	�assertRegexr�r\r2r#r��
MethodTyper�r�)r6rr�r]r^r��derived1�derived2�super_d2r�r_r��instancer\r6r;r<�test_bound_method_reprs\�
������
�
�
�z0ClassPropertiesAndMethods.test_bound_method_reprNzneed the _testcapi modulecs*Gdd�d��G�fdd�d�}|jdS)Nc@seZdZejZdS)z6ClassPropertiesAndMethods.test_bpo25750.<locals>.DescrN)r�r�r�rf�bad_getr'r;r;r;r<r�?rr�cseZdZ��Zdd�ZdS)z2ClassPropertiesAndMethods.test_bpo25750.<locals>.XcSsd|_dd�td�D�|_dS)NcSsg|]}d|�qSr�r;r�r;r;r<r�G�zNClassPropertiesAndMethods.test_bpo25750.<locals>.X.__new__.<locals>.<listcomp>i')r2r�r�rr;r;r<r�Dsz:ClassPropertiesAndMethods.test_bpo25750.<locals>.X.__new__N)r�r�r�r2r�r;r�r;r<r�Br�r�r&rhr;r�r<�
test_bpo25750:s
z'ClassPropertiesAndMethods.test_bpo25750)�r�r�r�r�r�r�rr�r�r�r�r�r�r�r�r�r�r6r9rHrOr_rfrwr�
refcount_testrr�r�r�r�r�r�r�r�r.�expectedFailurer�r�r�r�r�r�r�r+rDrLr[�skipIfr��flags�optimizerb�cpython_onlyrirtr�r�r�rr
rr*r0r7r>rKrYrargrjrurzr|r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr
rr r#r'r/r0r3r6r7r9r:r;r?rKrLrPrXrYrfrfrir5r;r;r6r<r��s4X*)%
%=Q&(F<:

1

"
"
G1
ib?�


CS\pN @OYYM	
.
',	

A( 63
+'!
4
'
	 
7r�c@s�eZdZdd�Ze�eed�oe��d�dd��Z	e�eed�o#e��d�dd��Z
e�eed�o4e��d�d	d
��Zdd�Zd
d�Z
dS)�DictProxyTestscCsGdd�dt�}||_dS)Nc@r�)zDictProxyTests.setUp.<locals>.CcSr�r�r;ryr;r;r<rINr�z$DictProxyTests.setUp.<locals>.C.methNr;r;r;r;r<r�Mr�r�)r#r�r�r;r;r<�setUpLs
zDictProxyTests.setUp�gettracez#trace function introduces __local__cCs<|jj��}|�|t�t|�}|��|�|gd��dS)N�rFrr�r7rI)r�rFr|�assertNotIsInstancer2�sortrB�r6r(r|r;r;r<�test_iter_keysRs
zDictProxyTests.test_iter_keyscCs4|jj��}|�|t�t|�}|�t|�d�dSr+)r�rFr�rtr2rBr�)r6r(r�r;r;r<�test_iter_values]szDictProxyTests.test_iter_valuescCsB|jj��}|�|t�dd�|D�}|��|�|gd��dS)NcSsg|]}|d�qSrxr;)r��itemr;r;r<r�lrhz2DictProxyTests.test_iter_items.<locals>.<listcomp>rs)r�rFr3rtr2rurBrvr;r;r<�test_iter_itemsfs
zDictProxyTests.test_iter_itemscCsNGdd�dt�}Gdd�dt�}Gdd�d|d�}|�t|j�t|j��dS)Nc@r)z7DictProxyTests.test_dict_type_with_metaclass.<locals>.BNrr;r;r;r<r?srr?c@r)z7DictProxyTests.test_dict_type_with_metaclass.<locals>.MNrr;r;r;r<r�urr�c@r)z7DictProxyTests.test_dict_type_with_metaclass.<locals>.CNrr;r;r;r<r�wr`r�r)r#rDrBrF)r6r?r�r�r;r;r<�test_dict_type_with_metaclassqsz,DictProxyTests.test_dict_type_with_metaclasscCs^t|jj�}|�|�d�|�|�|�d�|�|jj��D]\}}|�d�||�|�qdS)Nz
mappingproxy(�)z
{!r}: {!r})	r�r�rFr�r%�endswithr3r�r
)r6rIr�r�r;r;r<�	test_repr|s�zDictProxyTests.test_reprN)r�r�r�rqr.rlr�r�rrrwrxrzr{r~r;r;r;r<rpKs �
	�
�
	rpc@r�)�AAAPTypesLongInitTestcCs:Gdd�dt�}z	td|�d�WnYt�t�dS)Nc@r�)z>AAAPTypesLongInitTest.test_pytype_long_ready.<locals>.UserLongcWr�r�r;rer;r;r<r^�r�zFAAAPTypesLongInitTest.test_pytype_long_ready.<locals>.UserLong.__pow__Nr�r;r;r;r<�UserLong�r�r�r)r#rrDr�r�)r6r�r;r;r<�test_pytype_long_ready�sz,AAAPTypesLongInitTest.test_pytype_long_readyN)r�r�r�r�r;r;r;r<r�src@r�)�	MiscTestscsjG��fdd�dt�}Gdd�dt�}Gdd�dt��td|f|�di��|��jd	�|��jd
�dS)Ncs"eZdZdd�Z��fdd�ZdS)z7MiscTests.test_type_lookup_mro_reference.<locals>.MyKeycSr�)N�mykeyr�ryr;r;r<r3�rYz@MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__hash__cs�f�_dSr�rr���Base2r�r;r<r �r�z>MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__eq__Nr�r;r�r;r<�MyKey�sr�c@�eZdZdZdZdS)z6MiscTests.test_type_lookup_mro_reference.<locals>.Base�	from BaseN�r�r�r�r��mykey2r;r;r;r<r��r*r�c@r�)z7MiscTests.test_type_lookup_mro_reference.<locals>.Base2�
from Base2Nr�r;r;r;r<r��r*r�r�rvr�r�)r#rDrBr�r�)r6r�r�r;r�r<�test_type_lookup_mro_reference�sz(MiscTests.test_type_lookup_mro_referenceN)r�r�r�r�r;r;r;r<r��r�r�c@sfeZdZdidddfdd�Zdd�Zdd�Zdd	d
�Zedd��Zd
d�Z	dd�Z
dd�Zdd�ZdS)�
PicklingTestsr;Nc
CsD|dkro|�|�}|r"|�|dtj�|�|dt|�||f�n|�|dtj�|�|dt|�f|�|�|d|�|durO|�t|d�|�n|�|d�|durf|�	t
|d�|�dS|�|d�dSt|�j}	tjt|�|	|	t
ur�dn|	|�ff}|dur�||f7}|�|�|�|�|�|��|�dS)Nrgrrfrirl)�
__reduce_ex__rB�copyreg�
__newobj_ex__rD�
__newobj__�assertListEqualr2rM�assertDictEqualr��__base__�_reconstructorr#�
__reduce__)
r6�protor�r7r8r��	listitems�	dictitems�reduce_value�	base_typer;r;r<�
_check_reduce�s2

��
zPicklingTests._check_reducec
sxttjd�}d�ddd��ddi�G�fdd	�d	�}|�}|D]	}|�||��q ���D]
\}}t|||�q.|D]}|j||��d
�q;Gdd�d�}|�}|D] }|d
krs|�t��
|�|�Wd�n1snwYqSG��fdd�d�}|�}|D]}|d
kr�|�||���q�G�fdd�d�}	G�fdd�d�}
Gdd�d�}Gdd�d�}|D].}|	|
||fD]%}
|
�}|d
kr�|�tt	f��
|�|�Wd�n1s�wYq�q�G�fdd�d�}|�}|D]	}|�||��q�Gdd�d�}|�}|D]#}|d
k�r)|�t
��
|�|�Wd�n	1�s$wY�qG�fdd�d�}|�}|D]}|j||�d
��q9Gdd�d�}|�}|D]}|j||d d
��qQGd!d"�d"�}|�}|D]=}|�t
��
|�|�Wd�n	1�s�wY|d
k�r�|�t
��|��Wd�n	1�s�wY�qiG�fd#d$�d$�}|�}|D]I}|d
k�r�|j||d�fd
��q�|�t��
|�|�Wd�n	1�s�wY|�t��|��Wd�n	1�s�wY�q�Gd%d&�d&t�}|d'd(i�}|D]
}|j||t|�d)��qGd*d+�d+t
�}|d,g�}|D]
}|j||t
|�d-��q,dS).Nrf)i����r�i7���i���)�bacon�fish�cheeseio���cr�)z%PicklingTests.test_reduce.<locals>.C1cr�r�r;ryr�r;r<�__getnewargs__�r�z4PicklingTests.test_reduce.<locals>.C1.__getnewargs__N�r�r�r�r�r;r�r;r<r�r�rr�c@r�)z%PicklingTests.test_reduce.<locals>.C2cSr��Nzbad argsr;ryr;r;r<r��r�z4PicklingTests.test_reduce.<locals>.C2.__getnewargs__Nr�r;r;r;r<r��r�r�rgcr�)z%PicklingTests.test_reduce.<locals>.C3cs��fSr�r;ryrjr;r<�__getnewargs_ex__�rYz7PicklingTests.test_reduce.<locals>.C3.__getnewargs_ex__N�r�r�r�r�r;rjr;r<r�r�rcr�)z%PicklingTests.test_reduce.<locals>.C4cs�dfS)Nzbad dictr;ryr�r;r<r��rYz7PicklingTests.test_reduce.<locals>.C4.__getnewargs_ex__Nr�r;r�r;r<r�r�rcr�)z%PicklingTests.test_reduce.<locals>.C5csd�fS)Nz	bad tupler;ry�r8r;r<r�rYz7PicklingTests.test_reduce.<locals>.C5.__getnewargs_ex__Nr�r;r�r;r<�C5r�r�c@r�)z%PicklingTests.test_reduce.<locals>.C6cSr�)Nr;r;ryr;r;r<r�r�z7PicklingTests.test_reduce.<locals>.C6.__getnewargs_ex__Nr�r;r;r;r<�C6r�r�c@r�)z%PicklingTests.test_reduce.<locals>.C7cSr�r�r;ryr;r;r<r�r�z7PicklingTests.test_reduce.<locals>.C7.__getnewargs_ex__Nr�r;r;r;r<�C7r�r�cr�)z%PicklingTests.test_reduce.<locals>.C9cs�ifSr�r;ryr�r;r<r�rYz7PicklingTests.test_reduce.<locals>.C9.__getnewargs_ex__Nr�r;r�r;r<�C9r�r�c@r�)z&PicklingTests.test_reduce.<locals>.C10cSr�r�r.ryr;r;r<r�r�z8PicklingTests.test_reduce.<locals>.C10.__getnewargs_ex__Nr�r;r;r;r<�C10r�r�cr�)z&PicklingTests.test_reduce.<locals>.C11cr�r�r;ryr�r;r<r�"r�z3PicklingTests.test_reduce.<locals>.C11.__getstate__N�r�r�r�r�r;r�r;r<�C11!r�r�c@r�)z&PicklingTests.test_reduce.<locals>.C12cSr�)N�not dictr;ryr;r;r<r�)r�z3PicklingTests.test_reduce.<locals>.C12.__getstate__Nr�r;r;r;r<�C12(r�r�r�c@r�)z&PicklingTests.test_reduce.<locals>.C13cSr�r�r.ryr;r;r<r�0r�z3PicklingTests.test_reduce.<locals>.C13.__getstate__Nr�r;r;r;r<�C13/r�r�cs eZdZe��Z�fdd�ZdS)z&PicklingTests.test_reduce.<locals>.C14cs"���D]
\}}t|||�qdSr��r3r&r�r�r;r<r0<��z/PicklingTests.test_reduce.<locals>.C14.__init__N)r�r�r�r�r�r0r;r�r;r<�C14:sr�c@r)z&PicklingTests.test_reduce.<locals>.C15Nrr;r;r;r<�C15Jrr��quebeci����)r�c@r)z&PicklingTests.test_reduce.<locals>.C16Nrr;r;r;r<�C16Prr��yukon)r�)r��pickle�HIGHEST_PROTOCOLr�r3r&r�r�r�r�r/r�r�r2)r6�	protocolsrr�r�r9r�r�rrr�r�r�r�r�r�r�r�r�r�r�r�r;)r7r8r�r<�test_reduce�s�
������
���

��
�
��
�zPicklingTests.test_reducecCsLttjd�}Gdd�d�}|D]}|dkrind}|j||�|d�qdS)Nrfc@rU)z7PicklingTests.test_special_method_lookup.<locals>.PickycSrvr�r;ryr;r;r<r�Yr�zDPicklingTests.test_special_method_lookup.<locals>.Picky.__getstate__cSs|dvrt|��dS)N)r�r�r�r�r;r;r<r]\szCPicklingTests.test_special_method_lookup.<locals>.Picky.__getattr__N)r�r�r�r�r]r;r;r;r<�PickyXr}r�rgr�)r�r�r�r�)r6r�r��protocolr�r;r;r<r+Vs�z(PicklingTests.test_special_method_lookupcCs|dur
d�||�}t|�jtjurtd��|j|||d�|jt|�t|�|d�t|d�rC|j|j	|j	|d�|j|j	|j	|d�t|d�rv|j
|j|j|d�|jD] }|jt||�t||�|d�|jt
||d�t
||d�|d�qU|jt|�t|�|d�dS)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�rFr�)r
rDr�r#r�rNr�r�r�rFr�r�rBrEr�)r6r��objcopyr��slotr;r;r<�_assert_is_copyds&


��zPicklingTests._assert_is_copycsDGdd�d���fdd�t�ttjd�tjtjhtjtjh�D�S)zLUtility method to generate the many possible pickle configurations.
        c@s(eZdZdZdd�Zdd�Zdd�ZdS)	z<PicklingTests._generate_pickle_copiers.<locals>.PickleCopierz&This class copies object using pickle.cSr�r�)r��dumps�loads)r6r�r�r�r;r;r<r0�r�zEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__init__cSs|�|�||j��Sr�)r�r�r�r�r;r;r<r��r
zAPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.copycSs$d�|j|jj|jj|jj|jj�S)Nz0PickleCopier(proto={}, dumps={}.{}, loads={}.{}))r
r�r�r�r�r�ryr;r;r<r��s��zEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__repr__N)r�r�r�rr0r�r�r;r;r;r<�PickleCopier�s
r�c3s�|]}�|�VqdSr�r;)r�r7�r�r;r<�	<genexpr>�s�z9PicklingTests._generate_pickle_copiers.<locals>.<genexpr>rf)	�	itertools�productr�r�r�r��_dumpsr��_loadsr;r;r�r<�_generate_pickle_copiers~s


��z&PicklingTests._generate_pickle_copiersc	Cs�Gdd�d�a|�t��t�t�d�Wd�n1swYGdd�dt�a|�t��t�t�d�Wd�n1sBwYGdd�d�aGdd�dt�aGdd	�d	t�a|��D]\}|j|d
��Lt�}|�	|�}|�
||�d|_|�	|�}|�
||�t�}d|_d|_|�	|�}|�
||�t�}d|_d
|_|�	|�}|�
||�Wd�n1s�wYqbdS)Nc@r)r�r?Nr�r;r;r;r<r��rr�rc@r)rNrr;r;r;r<r�rrc@s.eZdZdZdgZdd�Zdd�Zdd�Zd	S)
r�z7A class with __getstate__ and __setstate__ implemented.r?c
Ss\t|di���}t|�jD]}|j�dd�D]}z	t||�||<Wqty*Yqwq
|S)NrFr�r;)rEr�rDr�rFr�r�)r6r�r�r�r;r;r<r��s��zC.__getstate__cSs"|��D]
\}}t|||�qdSr�r�)r6r�r�r�r;r;r<r��r�zC.__setstate__cSsdt|�j|��fS)Nz%s()<%r>)rDr�r�ryr;r;r<r��r�z
C.__repr__N)r�r�r�rr�r�r�r�r;r;r;r<r��s	c@r�)rz!A subclass of a class with slots.Nr�r;r;r;r<r�sc@r@)rJzA subclass with an extra slot.rRN)r�r�r�rr�r;r;r;r<rJ�rArJ)�
pickle_copierr�r�r�)
r�r�r�r�r�rrJr��subTestr�r�r?rR)r6r�r\r(r;r;r<�test_pickle_slots�s@��



���zPicklingTests.test_pickle_slotsc
	Cs�Gdd�d�aGdd�dt�aGdd�dt�aGdd�dt�aGd	d
�d
t�atttttf}|��}t�	||�D]N\}}|j
||d��;t|di�}||ji|��}|j
}|�|�}|�||�|d
krw|jsw|j��|�|�}	|�||	�Wd�n1s�wYq8|D]B}|j
|d��2t|di�}||ji|��}t|�}|�||�|js�|j��t|�}	|�||	�Wd�n1s�wYq�dS)Ncs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)rz:The state of this class is copyable via its instance dict.r�Tcst���||_||_dSr�)r2r0r?rRrr6r;r<r0�s

zC1.__init__cSr�)Nz
C1(%r, %r)rQryr;r;r<r��rkzC1.__repr__)	r�r�r�r�ARGS�NEED_DICT_COPYINGr0r�r5r;r;r6r<r�srcsHeZdZdZdZdZ�fdd�Z�fdd�Zedd	��Z	d
d�Z
�ZS)r�z,A list subclass copyable via __getnewargs__.r�Fcst��|�}||_||_|Sr��r2r�r?rR)r�r?rRr6r6r;r<r��sz
C2.__new__cst���|�d�dS�Nr�)r2r0r}rer6r;r<r0�s
zC2.__init__cSr�r��r�rr;r;r<r��rlzC2.__getnewargs__cS�d|j|jt|�fS)NzC2(%r, %r)<%r>�r?rRr2ryr;r;r<r��r�zC2.__repr__)r�r�r�rr�r�r�r0r{r�r�r5r;r;r6r<r��s
r�c@s<eZdZdZdZdZdd�Zedd��Zdd	�Z	d
d�Z
dS)
rz*A list subclass copyable via __getstate__.r�FcSs||_||_|�d�dSr�)r?rRr}rr;r;r<r0szC3.__init__cSr�r�r�rr;r;r<r�rlzC3.__getstate__cSs|\}}||_||_dSr�rQ)r6r�r?rRr;r;r<r�s
zC3.__setstate__cSr�)NzC3(%r, %r)<%r>r�ryr;r;r<r�r�zC3.__repr__N)r�r�r�rr�r�r0r{r�r�r�r;r;r;r<r�s
rcs<eZdZdZdZdZ�fdd�Zedd��Zdd	�Z	�Z
S)
rz,An int subclass copyable via __getnewargs__.)r�r�rfFc�t��||�}||_||_|Sr�r��r�r?rRr�r6r6r;r<r��z
C4.__new__cSr�r�r�rr;r;r<r�rlzC4.__getnewargs__cSr�)NzC4(%r, %r)<%r>�r?rRr)ryr;r;r<r�r�zC4.__repr__)r�r�r�rr�r�r�r{r�r�r5r;r;r6r<rs
rcsJeZdZdZdZddiZdZdd��fdd	�
Zed
d��Z	dd
�Z
�ZS)r�z/An int subclass copyable via __getnewargs_ex__.r�r�riFrr!cr�r�r�r�r6r;r<r�(r�z
C5.__new__cSs|j|jfSr�)r��KWARGSrr;r;r<r�-r�zC5.__getnewargs_ex__cSr�)NzC5(%r, %r)<%r>r�ryr;r;r<r�0r�zC5.__repr__)r�r�r�rr�r�r�r�r{r�r�r5r;r;r6r<r�#s
r�)r�r�r�rgr)rr2r�rr)rr�r�r�r�r�rEr�r�r�r�r�rFr�r)
r6�test_classes�pickle_copiersr�r�r8r�r�r��objcopy2r;r;r<�test_reduce_copying�sF


���
����z!PicklingTests.test_reduce_copyingcs^Gdd�dt��G��fdd�d��ddl}|j�fdddifddf}|����d�|�dS)	Nc@r)z(PicklingTests.test_issue24097.<locals>.SNrr;r;r;r<r`Xrr`cs$eZdZ�d�gZ��fdd�ZdS)z(PicklingTests.test_issue24097.<locals>.Ar�cs$|dkr�d�g�jdd�<dSt�)Nr�r�)�
__slotnames__r�r��r:r`r;r<r]\sz4PicklingTests.test_issue24097.<locals>.A.__getattr__N)r�r�r�r�r]r;r�r;r<r:Zs
r:rr�r�rg)r�r�r�rBr�)r6r�r�r;r�r<�test_issue24097Vs
	zPicklingTests.test_issue24097cCs�t���|�t��t��d�Wd�n1swYt��d�|�t��
t���Wd�n1s;wY|�t��t��d�Wd�dS1sWwYdSr�)r#r�r�r�r�ryr;r;r<�test_object_reducegs
��"�z PicklingTests.test_object_reducer�)
r�r�r�r�r�r+r�r+r�r�r�r�r�r;r;r;r<r��s
�{

C|r�c@seZdZejdd��ZdS)�SharedKeyTestscCs6Gdd�d�}Gdd�d|�}|�|�}}|�t�t|��t�t|���|�t�t|��t�ddi��td�\|_|_|_|_	|_
|_|�t�t|��t�t|���|�}|�t�t|��t�t|���|�t�t|��t�ddi��td�\|_|_
|_	|_
|_|_|�t�t|��t�ddi��dS)Nc@r)z)SharedKeyTests.test_subclasses.<locals>.ANrr;r;r;r<r:zrr:c@r)z)SharedKeyTests.test_subclasses.<locals>.BNrr;r;r;r<r?|rr?r?rfrw)rBr�r�vars�
assertLessr�r\r(r,�wr�rNr�rKr1rI)r6r:r?r?rRr�r;r;r<�test_subclassesws       $zSharedKeyTests.test_subclassesN)r�r�r�rror�r;r;r;r<r�usr�c@s eZdZdZdd�Zdd�ZdS)�DebugHelperMetaz<
    Sets default __doc__ and simplifies repr() output.
    cCs&|�d�dur||d<t�||||�S)Nr)r�rDr�)rqr9rrZr;r;r<r��szDebugHelperMeta.__new__cCr1r�)r�r�rr;r;r<r��r�zDebugHelperMeta.__repr__N)r�r�r�rr�r�r;r;r;r<r��sr�c@sheZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�MroTestz�
    Regressions for some bugs revealed through
    mcsl.mro() customization (typeobject.c: mro_internal()) and
    cls.__bases__ assignment (typeobject.c: type_set_bases()).
    cCr")NrF)�step�readyryr;r;r<rq�r$z
MroTest.setUpcCs |j|k}|r|jd7_|Sr�)r�)r6�limit�retr;r;r<�
step_until�s
zMroTest.step_untilc�*G�fdd�dt�}Gdd�d|d�}dS)zM
        type_set_bases must be aware that type->tp_mro can be NULL.
        cr�)z4MroTest.test_incomplete_set_bases_on_self.<locals>.Mcs0��d�r|jdusJ�|jd7_t�|�S)Nrfr;)r�r�rGrDr�rryr;r<r��s

z8MroTest.test_incomplete_set_bases_on_self.<locals>.M.mroNr�r;ryr;r<r��r�r�c@r)z4MroTest.test_incomplete_set_bases_on_self.<locals>.ANrr;r;r;r<r:�rr:rN�r��r6r�r:r;ryr<�!test_incomplete_set_bases_on_self�sz)MroTest.test_incomplete_set_bases_on_selfcsJG��fdd�dt�}Gdd�d|d��Gdd�d��}|jd7_d	S)
z?
        Deep reentrancy must not over-decref old_mro.
        cr�)z/MroTest.test_reent_set_bases_on_base.<locals>.Mcs6|jdur|jdkr��d�r�jd7_t�|�S)Nr?r�r;)r�r�r�rGrDr�r�r:r6r;r<r��s

z3MroTest.test_reent_set_bases_on_base.<locals>.M.mroNr�r;r�r;r<r��r�r�c@r)z/MroTest.test_reent_set_bases_on_base.<locals>.ANrr;r;r;r<r:�rr:rc@r)z/MroTest.test_reent_set_bases_on_base.<locals>.BNrr;r;r;r<r?�rr?r;N)r�rG)r6r�r?r;r�r<�test_reent_set_bases_on_base�s	z$MroTest.test_reent_set_bases_on_basecsJG�fdd�dt�}Gdd�d|d�}Gdd�d|�}Gdd	�d	|�}d
S)zU
        Similar to test_reent_set_bases_on_base, but may crash differently.
        cr�)z6MroTest.test_reent_set_bases_on_direct_base.<locals>.Mcs4|jd}|tur��d�r|jd7_t�|�S)Nrrvr;)rGr#r�rDr�)r�r�ryr;r<r��s



z:MroTest.test_reent_set_bases_on_direct_base.<locals>.M.mroNr�r;ryr;r<r��r�r�c@r)z6MroTest.test_reent_set_bases_on_direct_base.<locals>.ANrr;r;r;r<r:�rr:rc@r)z6MroTest.test_reent_set_bases_on_direct_base.<locals>.BNrr;r;r;r<r?�rr?c@r)z6MroTest.test_reent_set_bases_on_direct_base.<locals>.CNrr;r;r;r<r��rr�Nr�)r6r�r:r?r�r;ryr<�#test_reent_set_bases_on_direct_base�s	z+MroTest.test_reent_set_bases_on_direct_basecs�G���fdd�dt�}Gdd�d|d�}Gdd�d|��Gdd	�d	|��d
�_��t���jd7_Wd�dS1s@wYdS)
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���fdd�ZdS)z5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.Mcs4�jr|jdkr�f�_|jdkr�f�_t�|�S)N�B1�B2�r�r�rGrDr�r�r�r�r6r;r<r��s


z9MroTest.test_reent_set_bases_tp_base_cycle.<locals>.M.mroNr�r;r�r;r<r���r�c@r)z5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.ANrr;r;r;r<r:�rr:rc@r)z6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B1Nrr;r;r;r<r��rr�c@r)z6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B2Nrr;r;r;r<r��rr�Tr;N)r�r�r�r�rGr�r;r�r<�"test_reent_set_bases_tp_base_cycle�s	"�z*MroTest.test_reent_set_bases_tp_base_cyclecs�G���fdd�dt�}Gdd�d|d�}Gdd�d|�}Gdd	�d	|��Gd
d�d|��d�_|f�_�f|_���j�f�������g���|��g���|j�f������|g�d
S)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.
        cr�)z;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.Mcs(�jr|jdkrd�_�f�_t�|�S�Nr�Fr�r�r�r�r6r;r<r�s
z?MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.M.mroNr�r;r�r;r<r�
r�r�c@r)z;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.ANrr;r;r;r<r:rr:rc@r)z<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B1Nrr;r;r;r<r�rr�c@r)z<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B2Nrr;r;r;r<r�rr�c@r)z;MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.CNrr;r;r;r<r�rr�TN)r�r�rGrBr��r6r�r:r�r;r�r<�(test_tp_subclasses_cycle_in_update_slotss	z0MroTest.test_tp_subclasses_cycle_in_update_slotscs�Gdd�dt��G����fdd�dt�}Gdd�d|d�}Gdd	�d	|�}Gd
d�d|��Gdd
�d
|��d�_�����|f�_Wd�n1sMwY�f|_���j�f����jtt�	����dS)z�
        The same as test_tp_subclasses_cycle_in_update_slots, but tests
        a code path executed on error (goto bail).
        c@r)z=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ENrr;r;r;r<rJ-rrJcseZdZ����fdd�ZdS)z=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.Mcs:�jr|jdkr�j�fkrd�_n�f�_��t�|�Sr�r�r�r�r�rJr6r;r<r�0s
zAMroTest.test_tp_subclasses_cycle_error_return_path.<locals>.M.mroNr�r;r�r;r<r�/r>r�c@r)z=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ANrr;r;r;r<r:9rr:rc@r)z>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B1Nrr;r;r;r<r�;rr�c@r)z>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B2Nrr;r;r;r<r�=rr�c@r)z=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.CNrr;r;r;r<r�?rr�TN)
r&r�r�r�rGrBr�r�rDr�r�r;r�r<�*test_tp_subclasses_cycle_error_return_path(s

�z2MroTest.test_tp_subclasses_cycle_error_return_pathcr�)z�
        Extending an unitialized type with type->tp_mro == NULL must
        throw a reasonable TypeError exception, instead of failing
        with PyErr_BadInternalCall.
        cr�)z)MroTest.test_incomplete_extend.<locals>.McsX|jdur'|jdkr'��t��Gdd�d|�}Wd�n1s"wYt�|�S)Nr�c@r)z8MroTest.test_incomplete_extend.<locals>.M.mro.<locals>.XNrr;r;r;r<r�Tr)r�r�r�r�rDr�)r�r�ryr;r<r�Qs
�
z-MroTest.test_incomplete_extend.<locals>.M.mroNr�r;ryr;r<r�Pr�r�c@r)z)MroTest.test_incomplete_extend.<locals>.ANrr;r;r;r<r:Yrr:rNr�r�r;ryr<�test_incomplete_extendJs	zMroTest.test_incomplete_extendcr�)z�
        Attribute lookup on a super object must be aware that
        its target type can be uninitialized (type->tp_mro == NULL).
        cr/)z(MroTest.test_incomplete_super.<locals>.McsJ|jdur ��t��t||�jWd�n1swYt�|�Sr�)r�r�r�r2�xxxrDr�rr<r;r<r�bs

�
z,MroTest.test_incomplete_super.<locals>.M.mro)r�r�r�r�r5r;ryr6r<r�ar>r�c@r)z(MroTest.test_incomplete_super.<locals>.ANrr;r;r;r<r:irr:rNr�r�r;ryr<�test_incomplete_super\szMroTest.test_incomplete_supercsfGdd�d��G��fdd�dt��|�t��Gdd�d�d�}Wd�dS1s,wYdS)	z�
        gh-92112: A custom mro() returning a result conflicting with
        __bases__ and deleting itself caused a double free.
        c@r)z/MroTest.test_disappearing_custom_mro.<locals>.BNrr;r;r;r<r?qrr?cr�)z/MroTest.test_disappearing_custom_mro.<locals>.Mcs
�`�fSr�)r�r�r?r�r;r<r�usz3MroTest.test_disappearing_custom_mro.<locals>.M.mroNr�r;rr;r<r�tr�r�c@r)z/MroTest.test_disappearing_custom_mro.<locals>.ANrr;r;r;r<r:zrr:rN)r�r�r�r�r;rr<�test_disappearing_custom_mrols
"�z$MroTest.test_disappearing_custom_mroN)r�r�r�rrqr�r�r�r�r�r�rrrrr;r;r;r<r��s$$"r��__main__) r�r�r-r�r r�r�r�r�r�r.r�rGr�rrrrfrgr/rr�rprr�r�r�rDr�r�r��mainr;r;r;r<�<module>s��x`<=f�

Youez - 2016 - github.com/yon3zu
LinuXploit