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_dynamicclassattribute.cpython-39.opt-2.pyc

a

��gC&�@sFddlZddlZddlZddlmZGdd�de�ZGdd�de�ZGdd�de�ZGd	d
�d
e�Z	Gdd�de
�ZGd
d�de�ZGdd�de
�Z
Gdd�de
�ZGdd�de�ZGdd�de
�ZGdd�dejd�ZGdd�dejd�ZGdd�dej�ZGdd�de�ZGd d!�d!e�ZGd"d#�d#ej�Zed$k�rBe��dS)%�N)�DynamicClassAttributec@seZdZdS)�PropertyBaseN��__name__�
__module__�__qualname__�rr�;/usr/local/lib/python3.9/test/test_dynamicclassattribute.pyr	src@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)rrrrrr�setter�deleterrrrr	r
s

r
c@s@eZdZejdZejdd��Zejdd��Zejdd��ZdS)�SubClassrcCst|j��dSr)r
rrrrr	r*sz
SubClass.spamcCst|j��dSr)rrrrrr	r/scCst|j��dSr)rrrrrr	r3sN)	rrrr
�__dict__r�getterrrrrrr	r&s


rc@s$eZdZdZdd�Zeedd�ZdS)�PropertyDocBase�cCs|jSrrrrrr	�	_get_spam9szPropertyDocBase._get_spam�spam spam spam)�docN)rrrrr rrrrrr	r7src@s$eZdZejdZejdd��ZdS)�PropertyDocSubrcCs|jSrrrrrr	r?szPropertyDocSub.spamN)rrrrrrrrrrr	r#=s
r#c@s$eZdZejdZejdd��ZdS)�PropertySubNewGetterrcCsdSrrrrrr	rFszPropertySubNewGetter.spamN)rrrr
rrrrrrr	r$Ds
r$c@s&eZdZedd��Zejdd��ZdS)�PropertyNewGettercCsdS�Nrrrrrr	rLszPropertyNewGetter.spamcCsdS)N�rrrrr	rPsN)rrrrrrrrrr	r%Ks
r%c@seZdZeejdd���ZdS)� ClassWithAbstractVirtualPropertycCsdSrrrrrr	�colorVsz&ClassWithAbstractVirtualProperty.colorN)rrrr�abc�abstractmethodr)rrrr	r(Usr()�	metaclassc@seZdZejedd���ZdS)� ClassWithPropertyAbstractVirtualcCsdSrrrrrr	r)\sz&ClassWithPropertyAbstractVirtual.colorN)rrrr*r+rr)rrrr	r-[sr-c@s�eZdZdd�Zdd�Ze�ejj	dkd�dd��Z
e�ejj	dkd�d	d
��Zdd�Ze�ejj	dkd�d
d��Z
dd�Zdd�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_baseclassbs
z/PropertyTests.test_property_decorator_baseclasscCs<t�}|�tt|d�|�tt|dd�|�tt|d�dS)Nr)r�assertRaisesr
�getattrr�setattrrr2�r�subrrr	� test_property_decorator_subclassqsz.PropertyTests.test_property_decorator_subclass��)Docstrings are omitted with -O2 and abovecCs t�}|�|jjdjd�dS)NrzSubClass.getter)rr1�	__class__r�__doc__r:rrr	�$test_property_decorator_subclass_docxsz2PropertyTests.test_property_decorator_subclass_doccCs t�}|�|jjdjd�dS)NrzBaseClass.getter)r
r1r?rr@r4rrr	�%test_property_decorator_baseclass_doc~sz3PropertyTests.test_property_decorator_baseclass_doccCs<t�}t�}|�|jjdjd�|�|jjdjd�dS)Nrr!)rr#r1r?rr@)rr5r;rrr	�test_property_decorator_doc�sz)PropertyTests.test_property_decorator_doccCsXt�}|�|jd�|�|jjdjd�t�}|�|jd�|�|jjdjd�dS)Nrrz
new docstringr')r$r1rr?rr@r%)rZnewgettersubZ	newgetterrrr	�!test_property_getter_doc_override�sz/PropertyTests.test_property_getter_doc_overridecs�ddgdgddfD]0�G�fdd�dt�}|�|jdjt���qGd	d
�d
t��|�t��$G�fdd�dt�}Wd�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�rrrrH�__isabstractmethod__rr)�valrr	�C�srMrHc@seZdZdd�ZeZdS)zKPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolcSs
t��dSr)�
ValueErrorrrrr	�__bool__�szTPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__N)rrrrO�__len__rrrr	�NotBool�srQcs$eZdZdd�Z��e_ee�ZdS)rGcSsdSrrrrrr	rH�srINrJr)rQrr	rM�s)�objectZassertIsrrK�boolr7rN)rrMr)rQrLr	�,test_property___isabstractmethod__descriptor�sz:PropertyTests.test_property___isabstractmethod__descriptorcCs�|�tt�|�tt�Gdd�dt�}|�t|�Gdd�dt�}|�t|�Gdd�dt�}|�t��|jWd�n1s�0Y|�|�jd�Gdd	�d	t�}|�t��|jWd�n1s�0Y|�|�jd
�dS)Nc@seZdZdS)z0PropertyTests.test_abstract_virtual.<locals>.APVNrrrrr	�APV�srUc@seZdZdS)z0PropertyTests.test_abstract_virtual.<locals>.AVPNrrrrr	�AVP�srVc@s eZdZedd��Zdd�ZdS)z2PropertyTests.test_abstract_virtual.<locals>.Okay1cSs|jSr�Z_colorrrrr	r)�sz8PropertyTests.test_abstract_virtual.<locals>.Okay1.colorcSs
d|_dS)N�cyanrWrrrr	r�sz;PropertyTests.test_abstract_virtual.<locals>.Okay1.__init__N�rrrrr)rrrrr	�Okay1�s
rZrXc@s eZdZedd��Zdd�ZdS)z2PropertyTests.test_abstract_virtual.<locals>.Okay2cSs|jSrrWrrrr	r)�sz8PropertyTests.test_abstract_virtual.<locals>.Okay2.colorcSs
d|_dS)N�magentarWrrrr	r�sz;PropertyTests.test_abstract_virtual.<locals>.Okay2.__init__NrYrrrr	�Okay2�s
r\r[)r7�	TypeErrorr(r-�AttributeErrorr)r1)rrUrVrZr\rrr	�test_abstract_virtual�s$$z#PropertyTests.test_abstract_virtualN)rrrr6r<�unittest�skipIf�sys�flags�optimizerArBrCrDrTr_rrrr	r.as"�
�
�
r.c@seZdZdS)�PropertySubNrrrrr	re�srec@seZdZdZdS)�PropertySubSlotsrN)rrr�	__slots__rrrr	rf�srfc@szeZdZe�eed�d�dd��Ze�ej	j
dkd�dd��Ze�ej	j
dkd�d	d
��Ze�ej	j
dkd�dd��Z
d
S)�PropertySubclassTestsr@z9__doc__ is already present, __slots__ will have no effectcCs4zGdd�dt�}Wnty&Yn
0td��dS)Nc@s$eZdZedd��Zedej�dS)zFPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.FoocSsdSr&rrrrr	r�szKPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spam�
N)rrrrfr�printr@rrrr	�Foo�s
rkzAttributeError not raised)rRr^�	Exception�rrkrrr	�#test_slots_docstring_copy_exception�s
z9PropertySubclassTests.test_slots_docstring_copy_exceptionr=r>cCs(Gdd�dt�}|�|jdjd�dS)Nc@seZdZedd��ZdS)z6PropertySubclassTests.test_docstring_copy.<locals>.FoocSsdSr&rrrrr	r�sz;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spamN�rrrrerrrrr	rk�srkr�.spam wrapped in DynamicClassAttribute subclass�rRr1rr@rmrrr	�test_docstring_copy�s

�z)PropertySubclassTests.test_docstring_copycs�Gdd�dt����}|�|jd�d|_|�|jd�|��jdjd�G�fdd�d��}|�}|�|jd�d	|_|�|jd
�|�|jdjd�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)rrrrrerrrrrr	rk�s

rkrr=rrpcs$eZdZ�jdZejdd��ZdS)zRPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSubrcSs
d|_dS)N�eggsrrrrr	rszWPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spamN)rrrrrrr�rkrr	�FooSubs
rv�rt)rRr1rrr@)rrHrvZfoosubrrur	�,test_property_setter_copies_getter_docstring�s$

�
�zBPropertySubclassTests.test_property_setter_copies_getter_docstringcs`Gdd�dt�}|�|jdjd�Gdd�dt��G�fdd�d��}|�|jdjd�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�Nr=rrrrr	rsN)rrrrerrrrrr	rks
rkrza new docstringc@seZdZedd��ZdS)zMPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasecSsdSr&rrrrr	rszRPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spamNrorrrr	�FooBasesrzcs$eZdZ�jdZejdd��ZdS)zJPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2rcSsdSryrrrrr	r#szOPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spamN)rrrrrrr�rzrr	�Foo2!s
r|rq)rrkr|rr{r	�&test_property_new_getter_new_docstrings
	z<PropertySubclassTests.test_property_new_getter_new_docstringN)rrrr`rar3rfrnrbrcrdrrrxr}rrrr	rh�s �

�

�
 �rh�__main__)r*rbr`�typesrrlrr
rrrRr
rrr#r$r%�ABCMetar(r-ZTestCaser.rerfrhr�mainrrrr	�<module>s*
g\


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