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_property.cpython-310.pyc
o

�9ji-�@sNddlZddlZddlmZGdd�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�ZGdd �d �ZGd!d"�d"eej�ZGd#d$�d$eej�Zed%kr�e��dSdS)&�N)�supportc@�eZdZdS)�PropertyBaseN��__name__�
__module__�__qualname__�r	r	�)/usr/lib/python3.10/test/test_property.pyr�rc@r)�PropertyGetNrr	r	r	r
rrrc@r)�PropertySetNrr	r	r	r
r
rr
c@r)�PropertyDelNrr	r	r	r
rrrc@s<eZdZdd�Zedd��Zejdd��Zejdd��ZdS)�	BaseClasscC�
d|_dS)N���_spam��selfr	r	r
�__init__s
zBaseClass.__init__cC�|jS)�BaseClass.getterrrr	r	r
�spam�zBaseClass.spamcCs
||_dS�Nr�r�valuer	r	r
r�
cCs|`dSrrrr	r	r
r!sN)rrrr�propertyr�setter�deleterr	r	r	r
rs

rc@s8eZdZejjdd��Zejdd��Zejdd��ZdS)�SubClasscC�
t|j��)�SubClass.getter)rrrr	r	r
r'�
z
SubClass.spamcCr#r)r
rrr	r	r
r,rcCr#r)rrrr	r	r
r0rN)rrrrr�getterr r!r	r	r	r
r"%s

r"c@s$eZdZdZdd�Zeedd�ZdS)�PropertyDocBase�cCrrrrr	r	r
�	_get_spam6�zPropertyDocBase._get_spam�spam spam spam��docN)rrrrr)rrr	r	r	r
r'4sr'c@�eZdZejjdd��ZdS)�PropertyDocSubcCr)z*The decorator does not use this doc stringrrr	r	r
r;rzPropertyDocSub.spamN)rrrr'rr&r	r	r	r
r/:�r/c@r.)�PropertySubNewGettercC�dS)�
new docstringrr	rr	r	r
rA�zPropertySubNewGetter.spamN)rrrrrr&r	r	r	r
r1@r0r1c@�&eZdZedd��Zejdd��ZdS)�PropertyNewGettercCr2)zoriginal docstringr(r	rr	r	r
rGr4zPropertyNewGetter.spamcCr2)r3�r	rr	r	r
rKr4N)rrrrrr&r	r	r	r
r6F�

r6c@seZdZdd�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��Zdd�Zdd�ZdS) �
PropertyTestscCs�t�}|�|jd�|�|jd�d|_|�|jd�|�|jd�t|d�|�t|d��|�t|d��d|_|�|jd�|�|jd�dS)Nr�
rr�)r�assertEqualrr�delattr�
assertTrue�hasattr�r�baser	r	r
�!test_property_decorator_baseclassQs
z/PropertyTests.test_property_decorator_baseclasscCs<t�}|�tt|d�|�tt|dd�|�tt|d�dS)Nr)r"�assertRaisesr�getattrr
�setattrrr=�r�subr	r	r
� test_property_decorator_subclass`sz.PropertyTests.test_property_decorator_subclass��)Docstrings are omitted with -O2 and abovecC�t�}|�|jjjd�dS)Nr$)r"r<�	__class__r�__doc__rFr	r	r
�$test_property_decorator_subclass_docg�z2PropertyTests.test_property_decorator_subclass_doccCrK)Nr)rr<rLrrMr@r	r	r
�%test_property_decorator_baseclass_docmrOz3PropertyTests.test_property_decorator_baseclass_doccCs4t�}t�}|�|jjjd�|�|jjjd�dS)Nr+)r'r/r<rLrrM)rrArGr	r	r
�test_property_decorator_docssz)PropertyTests.test_property_decorator_doccCsPt�}|�|jd�|�|jjjd�t�}|�|jd�|�|jjjd�dS)Nrr3r7)r1r<rrLrMr6)r�newgettersub�	newgetterr	r	r
�!test_property_getter_doc_overrideysz/PropertyTests.test_property_getter_doc_overridecs�ddgdgddfD]�G�fdd�dt�}|�|jjt���q	Gdd	�d	t��|�t��G�fd
d�dt�}|jjWd�dS1sGwYdS)NTFr(��1cs"eZdZdd�Z�e_ee�ZdS)�EPropertyTests.test_property___isabstractmethod__descriptor.<locals>.CcS�dSrr	rr	r	r
�foo���IPropertyTests.test_property___isabstractmethod__descriptor.<locals>.C.fooN�rrrrY�__isabstractmethod__rr	)�valr	r
�C�sr_c@seZdZdd�ZeZdS)zKPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBoolcSst��r)�
ValueErrorrr	r	r
�__bool__�r*zTPropertyTests.test_property___isabstractmethod__descriptor.<locals>.NotBool.__bool__N)rrrra�__len__r	r	r	r
�NotBool�srccs$eZdZdd�Z��e_ee�ZdS)rWcSrXrr	rr	r	r
rY�rZr[Nr\r	)rcr	r
r_�s)�object�assertIsrYr]�boolrCr`)rr_r	)rcr^r
�,test_property___isabstractmethod__descriptor�s
"�z:PropertyTests.test_property___isabstractmethod__descriptorcCs0tdd�}|�|jd�d|_|�|jd�dS)N�basicr,�extended)rr<rM)r�pr	r	r
�"test_property_builtin_doc_writable�s
z0PropertyTests.test_property_builtin_doc_writablecCsHGdd�dt�}|�}|�|jjjd�d|jj_|�|jjjd�dS)Nc@�eZdZedd��ZdS)zOPropertyTests.test_property_decorator_doc_writable.<locals>.PropertyWritableDoccSr2)�Eggs�eggsr	rr	r	r
r�r4zTPropertyTests.test_property_decorator_doc_writable.<locals>.PropertyWritableDoc.spamN)rrrrrr	r	r	r
�PropertyWritableDoc�srorm�Spam)rdr<rLrrM)rrorGr	r	r
�$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:)�delta)r�
get_attribute�sysr�ranger�assertAlmostEqual)rrr�	fake_prop�refs_before�ir	r	r
�test_refleaks_in___init__�sz'PropertyTests.test_refleaks_in___init__cC� Gdd�d�}|�|jd�dS)Nc@seZdZeedd���ZdS)z,PropertyTests.test_class_property.<locals>.AcSs
d|jS)NzA doc for %r)r��clsr	r	r
rM�r%z4PropertyTests.test_class_property.<locals>.A.__doc__N)rrr�classmethodrrMr	r	r	r
�A�sr�z
A doc for 'A'�r<rM�rr�r	r	r
�test_class_property�sz!PropertyTests.test_class_propertycCr�)Nc@s eZdZdZeedd���ZdS)z5PropertyTests.test_class_property_override.<locals>.A�FirstcSr2)N�Secondr	r�r	r	r
rM�r4z=PropertyTests.test_class_property_override.<locals>.A.__doc__N)rrrrMr�rr	r	r	r
r��s
r�r�r�r�r	r	r
�test_class_property_override�sz*PropertyTests.test_class_property_overridec	CsXt�}dD]$}|�td|�d���|jdg|�Wd�n1s$wYqdS)N)rr(�z3^__set_name__\(\) takes 2 positional arguments but z were given$r)r�assertRaisesRegex�	TypeError�__set_name__)rrjr~r	r	r
�%test_property_set_name_incorrect_args�s
����z3PropertyTests.test_property_set_name_incorrect_argscCsFGdd�dt�}Gdd�d�}t�|�}|�|d�|�dd��}dS)Nc@seZdZdd�ZdS)zEPropertyTests.test_property_setname_on_property_subclass.<locals>.proc_r2)N�abcdefr	)�typ�args�kwargsr	r	r
�__new__�rZzMPropertyTests.test_property_setname_on_property_subclass.<locals>.pro.__new__N)rrrr�r	r	r	r
�pro�sr�c@r)zCPropertyTests.test_property_setname_on_property_subclass.<locals>.ANrr	r	r	r
r��rr�r(cSr2�Nr(r	rr	r	r
�<lambda>�szJPropertyTests.test_property_setname_on_property_subclass.<locals>.<lambda>)rr�r�r&)rr�r�rj�npr	r	r
�*test_property_setname_on_property_subclass�s

z8PropertyTests.test_property_setname_on_property_subclassN)rrrrBrH�unittest�skipIfry�flags�optimizerNrPrQrTrgrkrqr�
refcount_testrr�r�r�r�r	r	r	r
r9PsJ�
�
�
�
�

�
�
	
r9c@seZdZdZdS)�PropertySubzThis is a subclass of propertyN)rrrrMr	r	r	r
r��sr�c@seZdZdZdZdS)�PropertySubSlotsz5This is a subclass of property that defines __slots__r	N)rrrrM�	__slots__r	r	r	r
r��sr�c@sheZdZdd�Ze�ejjdkd�dd��Z	e�ejjdkd�dd��Z
e�ejjdkd�d	d
��ZdS)�PropertySubclassTestscCs0z
Gdd�dt�}Wtd��tyYdSw)Nc@rl)zFPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.FoocSr2)z5Trying to copy this docstring will raise an exceptionr(r	rr	r	r
r�r4zKPropertySubclassTests.test_slots_docstring_copy_exception.<locals>.Foo.spamN)rrrr�rr	r	r	r
�Foo��r�zAttributeError not raised)rd�AttributeError�	Exception�rr�r	r	r
�#test_slots_docstring_copy_exception�s��z9PropertySubclassTests.test_slots_docstring_copy_exceptionrIrJcCs$Gdd�dt�}|�|jjd�dS)Nc@rl)z6PropertySubclassTests.test_docstring_copy.<locals>.FoocSr2)�!spam wrapped in property subclassr(r	rr	r	r
rr4z;PropertySubclassTests.test_docstring_copy.<locals>.Foo.spamN�rrrr�rr	r	r	r
r�r�r�r��rdr<rrMr�r	r	r
�test_docstring_copys
�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>.FoocSrr�rrr	r	r
rs
zXPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.__init__cSr)r�rrr	r	r
rrzTPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.Foo.spamcSs
||_dS)zthis docstring is ignoredNrrr	r	r
rr%N)rrrrr�rr r	r	r	r
r�s
r�r(rIr�c�eZdZ�jjdd��ZdS)zRPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSubcSs
d|_dS)zanother ignored docstringrnNrrr	r	r
r"r%zWPropertySubclassTests.test_property_setter_copies_getter_docstring.<locals>.FooSub.spamN)rrrrr r	�r�r	r
�FooSub!r0r��rnr�)rrYr��foosubr	r�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@r5)zIPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FoocSr2�za docstringr(r	rr	r	r
r3r4zNPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo.spamcSr2��a new docstringrIr	rr	r	r
r7r4N)rrrr�rr&r	r	r	r
r�2r8r�r�c@rl)zMPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBasecSr2r�r	rr	r	r
r=r4zRPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.FooBase.spamNr�r	r	r	r
�FooBase<r�r�cr�)zJPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2cSr2r�r	rr	r	r
rBr4zOPropertySubclassTests.test_property_new_getter_new_docstring.<locals>.Foo2.spamN)rrrrr&r	�r�r	r
�Foo2Ar0r�r�)rr�r�r	r�r
�&test_property_new_getter_new_docstring.s
	z<PropertySubclassTests.test_property_new_getter_new_docstringN)rrrr�r�r�ryr�r�r�r�r�r	r	r	r
r��s�

�
�r�c@sDeZdZdZdZdZdd�Zedd��Zdd�Z	dd	�Z
d
d�ZdS)�_PropertyUnreachableAttributeNcCs|j�|�Sr)�
msg_format�format)r�msgr	r	r
�_format_exc_msgNsz-_PropertyUnreachableAttribute._format_exc_msgcCs|��|_dSr)r��objr�r	r	r
�
setUpClassQsz(_PropertyUnreachableAttribute.setUpClasscCs@|�t|�d���
|jjWd�dS1swYdS)Nzunreadable attribute�r�r�r�r�rYrr	r	r
�test_get_propertyU�
"�z/_PropertyUnreachableAttribute.test_get_propertycCs@|�t|�d���
d|j_Wd�dS1swYdS)Nzcan't set attributer�rr	r	r
�test_set_propertyYr�z/_PropertyUnreachableAttribute.test_set_propertycCs>|�t|�d���|j`Wd�dS1swYdS)Nzcan't delete attributer�rr	r	r
�test_del_property]s"�z/_PropertyUnreachableAttribute.test_del_property)rrrr�r�r�r�r�r�r�r�r�r	r	r	r
r�Is
r�c@seZdZdZGdd�d�ZdS)�$PropertyUnreachableAttributeWithNamez
^{} 'foo'$c@seZdZe�ZdS)z(PropertyUnreachableAttributeWithName.clsN)rrrrrYr	r	r	r
r�es
r�N)rrrr�r�r	r	r	r
r�bsr�c@s&eZdZdZGdd�d�Ze�e_dS)�"PropertyUnreachableAttributeNoNamez^{}$c@r)z&PropertyUnreachableAttributeNoName.clsNrr	r	r	r
r�lrr�N)rrrr�r�rrYr	r	r	r
r�isr��__main__)ryr��testrr�rrr
rrdrr"r'r/r1r6�TestCaser9rr�r�r�r�r�r�r�mainr	r	r	r
�<module>s0
V	�

Youez - 2016 - github.com/yon3zu
LinuXploit