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.10/test/__pycache__/test_copyreg.cpython-310.opt-2.pyc
o

�i��@s�ddlZddlZddlmZGdd�d�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�Z	Gd
d�de�Z
Gdd�de�ZGdd�de�ZGdd�dej
�Zedkr`e��dSdS)�N)�ExtensionSaverc@�eZdZdS)�CN��__name__�
__module__�__qualname__�r	r	�./usr/local/lib/python3.10/test/test_copyreg.pyr�rc@r)�WithoutSlotsNrr	r	r	r
r
rrc@�eZdZdZdS)�WithWeakref)�__weakref__N�rrr�	__slots__r	r	r	r
r
�rc@r
)�WithPrivate��__spamNrr	r	r	r
rrrc@r
)� _WithLeadingUnderscoreAndPrivaterNrr	r	r	r
rrrc@r
)�___rNrr	r	r	r
rrrc@r
)�WithSingleString�spamNrr	r	r	r
rrrc@r
)�
WithInherited)�eggsNrr	r	r	r
rrrc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�CopyRegTestCasecCs|�ttjtdd�dS)N)�assertRaises�	TypeError�copyreg�pickler��selfr	r	r
�
test_class"s
�zCopyRegTestCase.test_classcCs|�ttjtd�d�dS�N�znot a callable)rrrr �typer!r	r	r
�test_noncallable_reduce&s
�z'CopyRegTestCase.test_noncallable_reducecCs|�ttjtd�td�dSr$)rrrr r&�intr!r	r	r
�test_noncallable_constructor*s

�z,CopyRegTestCase.test_noncallable_constructorcCsddl}|�d|�d��dS)NrT)�copy�assertEqual)r"r*r	r	r
�	test_bool.szCopyRegTestCase.test_boolc	Cs�d\}}}t|�}z�|�ttj|||�t�|||�|�tj||f|k�|�tj|||fk�|�	|tj
�t�|||�|�ttj|||d�|�ttj|||d�|�ttj|dd�||�|�ttj|dd�||�|�ttj||dd�|�|�ttj||dd�|�|dtjvr�|�ttj|dd�|dd�|d�W|��n|��w|�	||ftj�dD]}t|�}zt�|||�t�|||�W|��q�|��wdD]}|�ttj|||�q�dS)N)zjunk1 z junk2iͫr%)r%i���)���rl)rr�
ValueErrorr�remove_extension�
add_extensionZ
assertTrue�_extension_registry�_inverted_registryZassertNotIn�_extension_cacheZrestore)r"�mod�func�code�er	r	r
�test_extension_registry2s^

�

�

�
�
�
�
�
��
��z'CopyRegTestCase.test_extension_registrycCs�|�t�t�g�|�t�t�g�dg}|�t�t�|�dg}|�t�t�|�|�t�t�dg�|�t�t�dg�ddg}|�	�t�t
�}|�	�|�||�dS)NZ_WithPrivate__spamZ&_WithLeadingUnderscoreAndPrivate__spamrrr)r+r�
_slotnamesrrrrrr�sortr)r"Zexpected�resultr	r	r
�test_slotnamesls�
zCopyRegTestCase.test_slotnamesN)	rrrr#r'r)r,r8r<r	r	r	r
r s:r�__main__)rZunittestZtest.pickletesterrr�objectrrrrrrrZTestCaserr�mainr	r	r	r
�<module>s]�