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.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)�BaseClass.getterrrrrr	�spamszBaseClass.spamcCs
||_dS�Nr�r�valuerrr	rscCs|`dSrrrrrr	r"sN)rrrrrr�setter�deleterrrrr	r
s

r
c@s@eZdZejdZejdd��Zejdd��Zejdd��ZdS)�SubClassrcCst|j��dS)�SubClass.getterN)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|jS)z*The decorator does not use this doc stringrrrrr	r?szPropertyDocSub.spamN)rrrrrrrrrrr	r$=s
r$c@s$eZdZejdZejdd��ZdS)�PropertySubNewGetterrcCsdS)�
new docstringrrrrrr	rFszPropertySubNewGetter.spamN)rrrr
rrrrrrr	r%Ds
r%c@s&eZdZedd��Zejdd��ZdS)�PropertyNewGettercCsdS)zoriginal docstringr rrrrr	rLszPropertyNewGetter.spamcCsdS)r&�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r3�r�subrrr	� test_property_decorator_subclassqsz.PropertyTests.test_property_decorator_subclass��)Docstrings are omitted with -O2 and abovecCs t�}|�|jjdjd�dS)Nrr)rr2�	__class__r�__doc__r;rrr	�$test_property_decorator_subclass_docxsz2PropertyTests.test_property_decorator_subclass_doccCs t�}|�|jjdjd�dS)Nrr)r
r2r@rrAr5rrr	�%test_property_decorator_baseclass_doc~sz3PropertyTests.test_property_decorator_baseclass_doccCs<t�}t�}|�|jjdjd�|�|jjdjd�dS)Nrr")rr$r2r@rrA)rr6r<rrr	�test_property_decorator_doc�sz)PropertyTests.test_property_decorator_doccCsXt�}|�|jd�|�|jjdjd�t�}|�|jd�|�|jjdjd�dS)Nrrr&r()r%r2rr@rrAr')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�rrrrI�__isabstractmethod__rr)�valrr	�C�srNrIc@seZdZdd�ZeZdS)zKPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolcSs
t��dSr)�
ValueErrorrrrr	�__bool__�szTPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__N)rrrrP�__len__rrrr	�NotBool�srRcs$eZdZdd�Z��e_ee�ZdS)rHcSsdSrrrrrr	rI�srJNrKr)rRrr	rN�s)�objectZassertIsrrL�boolr8rO)rrNr)rRrMr	�,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�srVc@seZdZdS)z0PropertyTests.test_abstract_virtual.<locals>.AVPNrrrrr	�AVP�srWc@s eZdZedd��Zdd�ZdS)z2PropertyTests.test_abstract_virtual.<locals>.Okay1cSs|jSr�Z_colorrrrr	r*�sz8PropertyTests.test_abstract_virtual.<locals>.Okay1.colorcSs
d|_dS)N�cyanrXrrrr	r�sz;PropertyTests.test_abstract_virtual.<locals>.Okay1.__init__N�rrrrr*rrrrr	�Okay1�s
r[rYc@s eZdZedd��Zdd�ZdS)z2PropertyTests.test_abstract_virtual.<locals>.Okay2cSs|jSrrXrrrr	r*�sz8PropertyTests.test_abstract_virtual.<locals>.Okay2.colorcSs
d|_dS)N�magentarXrrrr	r�sz;PropertyTests.test_abstract_virtual.<locals>.Okay2.__init__NrZrrrr	�Okay2�s
r]r\)r8�	TypeErrorr)r.�AttributeErrorr*r2)rrVrWr[r]rrr	�test_abstract_virtual�s$$z#PropertyTests.test_abstract_virtualN)rrrr7r=�unittest�skipIf�sys�flags�optimizerBrCrDrErUr`rrrr	r/as"�
�
�
r/c@seZdZdZdS)�PropertySubz+This is a subclass of DynamicClassAttributeN)rrrrArrrr	rf�srfc@seZdZdZdZdS)�PropertySubSlotszBThis is a subclass of DynamicClassAttribute that defines __slots__rN)rrrrA�	__slots__rrrr	rg�srgc@szeZdZe�eed�d�dd��Ze�ej	j
dkd�dd��Ze�ej	j
dkd�d	d
��Ze�ej	j
dkd�dd��Z
d
S)�PropertySubclassTestsrAz9__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>.FoocSsdS)z5Trying to copy this docstring will raise an exceptionr rrrrr	r�szKPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spam�
N)rrrrgr�printrArrrr	�Foo�s
rlzAttributeError not raised)rSr_�	Exception�rrlrrr	�#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>.FoocSsdS)�.spam wrapped in DynamicClassAttribute subclassr rrrrr	r�sz;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spamN�rrrrfrrrrr	rl�srlrrp�rSr2rrArnrrr	�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|_dS)Nr rrrrr	r��zXPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.__init__cSs|jS)rprrrrr	r�szTPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spamcSs
||_dS)zthis docstring is ignoredNrrrrr	r�sN)rrrrrfrrrrrr	rl�s

rlr r>rrpcs$eZdZ�jdZejdd��ZdS)zRPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSubrcSs
d|_dS)zanother ignored docstring�eggsNrrrrr	rszWPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spamN)rrrrrrr�rlrr	�FooSubs
rw�ru)rSr2rrrA)rrIrwZfoosubrrvr	�,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>.FoocSsdS�za docstringr rrrrr	rszNPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spamcSsdS��a new docstringr>rrrrr	rsN)rrrrfrrrrrr	rls
rlrr|c@seZdZedd��ZdS)zMPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasecSsdSrzrrrrr	rszRPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spamNrqrrrr	�FooBasesr}cs$eZdZ�jdZejdd��ZdS)zJPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2rcSsdSr{rrrrr	r#szOPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spamN)rrrrrrr�r}rr	�Foo2!s
rrr)rrlrrr~r	�&test_property_new_getter_new_docstrings
	z<PropertySubclassTests.test_property_new_getter_new_docstringN)rrrrarbr4rgrorcrdrersryr�rrrr	ri�s �

�

�
 �ri�__main__)r+rcra�typesrrmrr
rrrSr
rrr$r%r'�ABCMetar)r.ZTestCaser/rfrgrir�mainrrrr	�<module>s*
g\


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