HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/__pycache__/test_dynamicclassattribute.cpython-37.opt-2.pyc
B

��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.7/test/test_dynamicclassattribute.pyr	src@seZdZdS)�PropertyGetN)rrrrrrrr	sr	c@seZdZdS)�PropertySetN)rrrrrrrr
sr
c@seZdZdS)�PropertyDelN)rrrrrrrrsrc@s<eZdZdd�Zedd��Zejdd��Zejdd��ZdS)�	BaseClasscCs
d|_dS)N�)�_spam)�selfrrr�__init__szBaseClass.__init__cCs|jS)N)r)rrrr�spamszBaseClass.spamcCs
||_dS)N)r)r�valuerrrrscCs|`dS)N)r)rrrrr"sN)rrrrrr�setter�deleterrrrrrsrc@s@eZdZejdZejdd��Zejdd��Zejdd��ZdS)�SubClassrcCst|j��dS)N)r	r)rrrrr*sz
SubClass.spamcCst|j��dS)N)r
r)rrrrrr/scCst|j��dS)N)rr)rrrrr3sN)	rrrr�__dict__r�getterrrrrrrr&s
rc@s$eZdZdZdd�Zeedd�ZdS)�PropertyDocBase�cCs|jS)N)r)rrrr�	_get_spam9szPropertyDocBase._get_spamzspam spam spam)�docN)rrrrrrrrrrrr7src@s$eZdZejdZejdd��ZdS)�PropertyDocSubrcCs|jS)N)r)rrrrr?szPropertyDocSub.spamN)rrrrrrrrrrrr=s
rc@s$eZdZejdZejdd��ZdS)�PropertySubNewGetterrcCsdS)Nr
r)rrrrrFszPropertySubNewGetter.spamN)rrrrrrrrrrrrDs
rc@s&eZdZedd��Zejdd��ZdS)�PropertyNewGettercCsdS)Nrr)rrrrrLszPropertyNewGetter.spamcCsdS)N�r)rrrrrPsN)rrrrrrrrrrrKsrc@seZdZeejdd���ZdS)� ClassWithAbstractVirtualPropertycCsdS)Nrrrrr�colorVsz&ClassWithAbstractVirtualProperty.colorN)rrrr�abc�abstractmethodr!rrrrr Usr )�	metaclassc@seZdZejedd���ZdS)� ClassWithPropertyAbstractVirtualcCsdS)Nrrrrrr!\sz&ClassWithPropertyAbstractVirtual.colorN)rrrr"r#rr!rrrrr%[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
�setattrrr*)r�subrrr� test_property_decorator_subclassqsz.PropertyTests.test_property_decorator_subclass�z)Docstrings are omitted with -O2 and abovecCs t�}|�|jjdjd�dS)NrzSubClass.getter)rr)�	__class__r�__doc__)rr1rrr�$test_property_decorator_subclass_docxsz2PropertyTests.test_property_decorator_subclass_doccCs t�}|�|jjdjd�dS)NrzBaseClass.getter)rr)r4rr5)rr,rrr�%test_property_decorator_baseclass_doc~sz3PropertyTests.test_property_decorator_baseclass_doccCs<t�}t�}|�|jjdjd�|�|jjdjd�dS)Nrzspam spam spam)rrr)r4rr5)rr,r1rrr�test_property_decorator_doc�sz)PropertyTests.test_property_decorator_doccCsXt�}|�|jd�|�|jjdjd�t�}|�|jd�|�|jjdjd�dS)Nr
rz
new docstringr)rr)rr4rr5r)rZnewgettersubZ	newgetterrrr�!test_property_getter_doc_override�sz/PropertyTests.test_property_getter_doc_overridec	s�xFddgdgddfD]0�G�fdd�dt�}|�|jdjt���qWGd	d
�d
t��|�t��G�fdd�dt�}WdQRXdS)NTFr��1cs"eZdZdd�Z�e_ee�ZdS)zEPropertyTests.test_property___isabstractmethod__descriptor.<locals>.CcSsdS)Nr)rrrr�foo�szIPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.fooN)rrrr<�__isabstractmethod__rr)�valrr�C�sr?r<c@seZdZdd�ZeZdS)zKPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolcSs
t��dS)N)�
ValueError)rrrr�__bool__�szTPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__N)rrrrA�__len__rrrr�NotBool�srCcs$eZdZdd�Z��e_ee�ZdS)zEPropertyTests.test_property___isabstractmethod__descriptor.<locals>.CcSsdS)Nr)rrrrr<�szIPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.fooN)rrrr<r=rr)rCrrr?�s)�objectZassertIsrr=�boolr.r@)rr?r)rCr>r�,test_property___isabstractmethod__descriptor�sz:PropertyTests.test_property___isabstractmethod__descriptorc	Cs�|�tt�|�tt�Gdd�dt�}|�t|�Gdd�dt�}|�t|�Gdd�dt�}|�t��|jWdQRX|�|�jd�Gdd	�d	t�}|�t��|jWdQRX|�|�jd
�dS)Nc@seZdZdS)z0PropertyTests.test_abstract_virtual.<locals>.APVN)rrrrrrr�APV�srGc@seZdZdS)z0PropertyTests.test_abstract_virtual.<locals>.AVPN)rrrrrrr�AVP�srHc@s eZdZedd��Zdd�ZdS)z2PropertyTests.test_abstract_virtual.<locals>.Okay1cSs|jS)N)�_color)rrrrr!�sz8PropertyTests.test_abstract_virtual.<locals>.Okay1.colorcSs
d|_dS)N�cyan)rI)rrrrr�sz;PropertyTests.test_abstract_virtual.<locals>.Okay1.__init__N)rrrrr!rrrrr�Okay1�srKrJc@s eZdZedd��Zdd�ZdS)z2PropertyTests.test_abstract_virtual.<locals>.Okay2cSs|jS)N)rI)rrrrr!�sz8PropertyTests.test_abstract_virtual.<locals>.Okay2.colorcSs
d|_dS)N�magenta)rI)rrrrr�sz;PropertyTests.test_abstract_virtual.<locals>.Okay2.__init__N)rrrrr!rrrrr�Okay2�srMrL)r.�	TypeErrorr r%�AttributeErrorr!r))rrGrHrKrMrrr�test_abstract_virtual�sz#PropertyTests.test_abstract_virtualN)rrrr-r2�unittest�skipIf�sys�flags�optimizer6r7r8r9rFrPrrrrr&as	r&c@seZdZdS)�PropertySubN)rrrrrrrrV�srVc@seZdZdZdS)�PropertySubSlotsrN)rrr�	__slots__rrrrrW�srWc@szeZdZe�eed�d�dd��Ze�ej	j
dkd�dd��Ze�ej	j
dkd�d	d
��Ze�ej	j
dkd�dd��Z
d
S)�PropertySubclassTestsr5z9__doc__ is already present, __slots__ will have no effectcCs6yGdd�dt�}Wntk
r(Yn
Xtd��dS)Nc@s$eZdZedd��Zedej�dS)zFPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.FoocSsdS)Nrr)rrrrr�szKPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spam�
N)rrrrWr�printr5rrrr�Foo�sr\zAttributeError not raised)rDrO�	Exception)rr\rrr�#test_slots_docstring_copy_exception�s
z9PropertySubclassTests.test_slots_docstring_copy_exceptionr3z)Docstrings are omitted with -O2 and abovecCs(Gdd�dt�}|�|jdjd�dS)Nc@seZdZedd��ZdS)z6PropertySubclassTests.test_docstring_copy.<locals>.FoocSsdS)Nrr)rrrrr�sz;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spamN)rrrrVrrrrrr\�sr\rz.spam wrapped in DynamicClassAttribute subclass)rDr)rr5)rr\rrr�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)r)rrrrr��zXPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.__init__cSs|jS)N)r)rrrrr�szTPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spamcSs
||_dS)N)r)rrrrrr�sN)rrrrrVrrrrrrr\�sr\rr3rz.spam wrapped in DynamicClassAttribute subclasscs$eZdZ�jdZejdd��ZdS)zRPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSubrcSs
d|_dS)N�eggs)r)rrrrrrszWPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spamN)rrrrrrr)r\rr�FooSubs
rb�ra)rDr)rrr5)rr<rbZfoosubr)r\r�,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)Nrr)rrrrrszNPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spamcSsdS)Nr3r)rrrrrsN)rrrrVrrrrrrr\sr\rza new docstringc@seZdZedd��ZdS)zMPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasecSsdS)Nrr)rrrrrszRPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spamN)rrrrVrrrrr�FooBasesrecs$eZdZ�jdZejdd��ZdS)zJPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2rcSsdS)Nr3r)rrrrr#szOPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spamN)rrrrrrr)rerr�Foo2!s
rf)rDr)rr5)rr\rfr)rer�&test_property_new_getter_new_docstrings
	z<PropertySubclassTests.test_property_new_getter_new_docstringN)rrrrQrRr+rWr^rSrTrUr_rdrgrrrrrY�s!rY�__main__)r"rSrQ�typesrr]rr	r
rrDrrrrrr�ABCMetar r%ZTestCaser&rVrWrYr�mainrrrr�<module>s*
g\