Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_property.cpython-39.opt-2.pyc

a

��g�%�@sddlZddlZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de	�Z
Gd
d�de
�ZGdd�de	�ZGdd�de�Z
Gdd�de
�ZGdd�de	�ZGdd�dej�ZGdd�de�ZGdd�de�ZGdd�dej�Zedk�re��dS) �N)�supportc@seZdZdS)�PropertyBaseN��__name__�
__module__�__qualname__�rr�./usr/local/lib/python3.9/test/test_property.pyrsrc@seZdZdS)�PropertyGetNrrrrr	r
sr
c@seZdZdS)�PropertySetNrrrrr	rsrc@seZdZdS)�PropertyDelNrrrrr	rsrc@s<eZdZdd�Zedd��Zejdd��Zejdd��ZdS)�	BaseClasscCs
d|_dS�N���_spam��selfrrr	�__init__szBaseClass.__init__cCs|jS�Nrrrrr	�spamszBaseClass.spamcCs
||_dSrr�r�valuerrr	rscCs|`dSrrrrrr	r!sN)rrrr�propertyr�setter�deleterrrrr	r
s

r
c@s8eZdZejjdd��Zejdd��Zejdd��ZdS)�SubClasscCst|j��dSr)r
rrrrr	r'sz
SubClass.spamcCst|j��dSr)rrrrrr	r,scCst|j��dSr)rrrrrr	r0sN)rrrr
r�getterrrrrrr	r%s

rc@s$eZdZdZdd�Zeedd�ZdS)�PropertyDocBase�cCs|jSrrrrrr	�	_get_spam6szPropertyDocBase._get_spam�spam spam spam��docN)rrrrr rrrrrr	r4src@seZdZejjdd��ZdS)�PropertyDocSubcCs|jSrrrrrr	r;szPropertyDocSub.spamN)rrrrrrrrrr	r$:sr$c@seZdZejjdd��ZdS)�PropertySubNewGettercCsdSrrrrrr	rAszPropertySubNewGetter.spamN)rrrr
rrrrrr	r%@sr%c@s&eZdZedd��Zejdd��ZdS)�PropertyNewGettercCsdS�Nrrrrrr	rGszPropertyNewGetter.spamcCsdS)N�rrrrr	rKsN)rrrrrrrrrr	r&Fs
r&c@s�eZdZdd�Zdd�Ze�ejj	dkd�dd��Z
e�ejj	dkd�d	d
��Zdd�Ze�ejj	dkd�d
d��Z
dd�Ze�ejj	dkd�dd��Ze�ejj	dkd�dd��Zejdd��Ze�ejj	dkd�dd��Ze�ejj	dkd�dd��ZdS)�
PropertyTestscCs�t�}|�|jd�|�|jd�d|_|�|jd�|�|jd�t|d�|�t|d��|�t|d��d|_|�|jd�|�|jd�dS)Nr�
rr�)r
�assertEqualrr�delattrZ
assertTrue�hasattr�r�baserrr	�!test_property_decorator_baseclassQs
z/PropertyTests.test_property_decorator_baseclasscCs<t�}|�tt|d�|�tt|dd�|�tt|d�dS)Nr)r�assertRaisesr
�getattrr�setattrrr-�r�subrrr	� test_property_decorator_subclass`sz.PropertyTests.test_property_decorator_subclass��)Docstrings are omitted with -O2 and abovecCst�}|�|jjjd�dS)NzSubClass.getter)rr,�	__class__r�__doc__r5rrr	�$test_property_decorator_subclass_docgsz2PropertyTests.test_property_decorator_subclass_doccCst�}|�|jjjd�dS)NzBaseClass.getter)r
r,r:rr;r/rrr	�%test_property_decorator_baseclass_docmsz3PropertyTests.test_property_decorator_baseclass_doccCs4t�}t�}|�|jjjd�|�|jjjd�dS)Nr!)rr$r,r:rr;)rr0r6rrr	�test_property_decorator_docssz)PropertyTests.test_property_decorator_doccCsPt�}|�|jd�|�|jjjd�t�}|�|jd�|�|jjjd�dS)Nrz
new docstringr()r%r,rr:r;r&)rZnewgettersubZ	newgetterrrr	�!test_property_getter_doc_overrideysz/PropertyTests.test_property_getter_doc_overridecs�ddgdgddfD],�G�fdd�dt�}|�|jjt���qGdd	�d	t��|�t��,G�fd
d�dt�}|jjWd�n1s�0YdS)NTFr��1cs"eZdZdd�Z�e_ee�ZdS)�EPropertyTests.test_property___isabstractmethod__descriptor.<locals>.CcSsdSrrrrrr	�foo�s�IPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.fooN�rrrrC�__isabstractmethod__rr)�valrr	�C�srHc@seZdZdd�ZeZdS)zKPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolcSs
t��dSr)�
ValueErrorrrrr	�__bool__�szTPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__N)rrrrJ�__len__rrrr	�NotBool�srLcs$eZdZdd�Z��e_ee�ZdS)rBcSsdSrrrrrr	rC�srDNrEr)rLrr	rH�s)�objectZassertIsrCrF�boolr2rI)rrHr)rLrGr	�,test_property___isabstractmethod__descriptor�sz:PropertyTests.test_property___isabstractmethod__descriptorcCs0tdd�}|�|jd�d|_|�|jd�dS)NZbasicr"Zextended)rr,r;)r�prrr	�"test_property_builtin_doc_writable�s
z0PropertyTests.test_property_builtin_doc_writablecCsHGdd�dt�}|�}|�|jjjd�d|jj_|�|jjjd�dS)Nc@seZdZedd��ZdS)zOPropertyTests.test_property_decorator_doc_writable.<locals>.PropertyWritableDoccSsdS�N�eggsrrrrr	r�szTPropertyTests.test_property_decorator_doc_writable.<locals>.PropertyWritableDoc.spamN)rrrrrrrrr	�PropertyWritableDoc�srTZEggsZSpam)rMr,r:rr;)rrTr6rrr	�$test_property_decorator_doc_writable�s

z2PropertyTests.test_property_decorator_doc_writablecCsXt�td�}tdddd�}|�}td�D]}|�dddd�q(|j|�|ddd	�dS)
N�gettotalrefcount�fget�fset�fdelr#�drr*)Zdelta)rZ
get_attribute�sysr�rangerZassertAlmostEqual)rrVZ	fake_propZrefs_before�irrr	�test_refleaks_in___init__�sz'PropertyTests.test_refleaks_in___init__cCs Gdd�d�}|�|jd�dS)Nc@seZdZeedd���ZdS)z,PropertyTests.test_class_property.<locals>.AcSs
d|jS)NzA doc for %r)r��clsrrr	r;�sz4PropertyTests.test_class_property.<locals>.A.__doc__N�rrr�classmethodrr;rrrr	�A�srcz
A doc for 'A'�r,r;�rrcrrr	�test_class_property�sz!PropertyTests.test_class_propertycCs Gdd�d�}|�|jd�dS)Nc@seZdZeedd���ZdS)z5PropertyTests.test_class_property_override.<locals>.AcSsdS)N�Secondrr_rrr	r;�sz=PropertyTests.test_class_property_override.<locals>.A.__doc__Nrarrrr	rc�srcrgrdrerrr	�test_class_property_override�sz*PropertyTests.test_class_property_overrideN)rrrr1r7�unittest�skipIfr[�flags�optimizer<r=r>r?rOrQrUrZ
refcount_testr^rfrhrrrr	r)PsD�
�
�
�
�


�
�r)c@seZdZdS)�PropertySubNrrrrr	rm�srmc@seZdZdZdS)�PropertySubSlotsrN)rrr�	__slots__rrrr	rn�srnc@sheZdZdd�Ze�ejjdkd�dd��Z	e�ejjdkd�dd��Z
e�ejjdkd�d	d
��ZdS)�PropertySubclassTestscCs4zGdd�dt�}Wnty&Yn
0td��dS)Nc@seZdZedd��ZdS)zFPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.FoocSsdSr'rrrrr	r�szKPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spamN)rrrrnrrrrr	�Foo�srqzAttributeError not raised)rM�AttributeError�	Exception�rrqrrr	�#test_slots_docstring_copy_exception�s
z9PropertySubclassTests.test_slots_docstring_copy_exceptionr8r9cCs$Gdd�dt�}|�|jjd�dS)Nc@seZdZedd��ZdS)z6PropertySubclassTests.test_docstring_copy.<locals>.FoocSsdSr'rrrrr	r�sz;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spamN�rrrrmrrrrr	rq�srq�!spam wrapped in property subclass�rMr,rr;rtrrr	�test_docstring_copy�s
�z)PropertySubclassTests.test_docstring_copycs�Gdd�dt����}|�|jd�d|_|�|jd�|��jjd�G�fdd�d��}|�}|�|jd�d|_|�|jd	�|�|jjd�dS)
Nc@s.eZdZdd�Zedd��Zejdd��ZdS)zOPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FoocSs
d|_dSr'rrrrr	r��zXPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.__init__cSs|jSrrrrrr	r�szTPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spamcSs
||_dSrrrrrr	r�sN)rrrrrmrrrrrr	rq�s

rqrr8rwcseZdZ�jjdd��ZdS)zRPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSubcSs
d|_dSrRrrrrr	rszWPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spamN)rrrrrr�rqrr	�FooSubsr|�rSrx)rrCr|Zfoosubrr{r	�,test_property_setter_copies_getter_docstring�s$
��zBPropertySubclassTests.test_property_setter_copies_getter_docstringcsXGdd�dt�}|�|jjd�Gdd�dt��G�fdd�d��}|�|jjd�dS)Nc@s&eZdZedd��Zejdd��ZdS)zIPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FoocSsdSr'rrrrr	rszNPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spamcSsdS�Nr8rrrrr	rsN)rrrrmrrrrrr	rqs
rqza new docstringc@seZdZedd��ZdS)zMPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasecSsdSr'rrrrr	r"szRPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spamNrvrrrr	�FooBase!sr�cseZdZ�jjdd��ZdS)zJPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2cSsdSrrrrrr	r'szOPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spamN)rrrrrr�r�rr	�Foo2&sr�rx)rrqr�rr�r	�&test_property_new_getter_new_docstrings
	z<PropertySubclassTests.test_property_new_getter_new_docstringN)rrrrurirjr[rkrlryr~r�rrrr	rp�s�

�
�rp�__main__)r[ri�testrrsrr
rrrMr
rrr$r%r&ZTestCaser)rrmrnrpr�mainrrrr	�<module>s&
W


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