Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/test/__pycache__/test_copyreg.cpython-35.opt-1.pyc



��Yf'�@s�ddlZddlZddlmZGdd�d�ZGdd�de�ZGdd�de�ZGd	d
�d
e�ZGdd�de�Z	Gd
d�de	�Z
Gdd�dej�Ze
dkr�ej�dS)�N)�ExtensionSaverc@seZdZdS)�CN)�__name__�
__module__�__qualname__�rr�6/opt/alt/python35/lib64/python3.5/test/test_copyreg.pyrsrc@seZdZdS)�WithoutSlotsN)rrrrrrrr	
sr	c@seZdZdZdS)�WithWeakref�__weakref__N)r)rrr�	__slots__rrrrr

sr
c@seZdZdZdS)�WithPrivate�__spamN)r)rrrrrrrrr
sr
c@seZdZdZdS)�WithSingleString�spamN)rrrrrrrrrsrc@seZdZdZdS)�
WithInherited�eggsN)r)rrrrrrrrrsrc@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�CopyRegTestCasecCs |jttjtdd�dS)N)�assertRaises�	TypeError�copyreg�pickler)�selfrrr�
test_classszCopyRegTestCase.test_classcCs#|jttjtd�d�dS)N�znot a callable)rrrr�type)rrrr�test_noncallable_reduce sz'CopyRegTestCase.test_noncallable_reducecCs&|jttjtd�td�dS)Nrznot a callable)rrrrr�int)rrrr�test_noncallable_constructor$sz,CopyRegTestCase.test_noncallable_constructorcCs)ddl}|jd|jd��dS)NrT)�copy�assertEqual)rrrrr�	test_bool(szCopyRegTestCase.test_boolcCs�d\}}}t|�}z�|jttj|||�tj|||�|jtj||f|k�|jtj|||fk�|j	|tj
�tj|||�|jttj|||d�|jttj|||d�|jttj|dd�||�|jttj|dd�||�|jttj||dd�|�|jttj||dd�|�|dtjkr�|jttj|dd�|dd�|d�Wd|j�X|j	||ftj�xRd	D]J}t|�}z*tj|||�tj|||�Wd|j�XqWx*dD]"}|jttj|||�qVWdS)N�junk1 � junk2�ͫr��r�)r"r#r$)rr%���)r'rr&)rr�
ValueErrorr�remove_extension�
add_extensionZ
assertTrue�_extension_registry�_inverted_registryZassertNotIn�_extension_cacheZrestore)r�mod�func�code�errr�test_extension_registry,sH
  )

z'CopyRegTestCase.test_extension_registrycCs�|jtjt�g�|jtjt�g�dg}|jtjt�|�|jtjt�dg�ddg}|j�tjt�}|j�|j||�dS)NZ_WithPrivate__spamrr)	r r�
_slotnamesr	r
r
r�sortr)rZexpected�resultrrr�test_slotnamesfs	

zCopyRegTestCase.test_slotnamesN)	rrrrrrr!r2r6rrrrrs:r�__main__)rZunittestZtest.pickletesterrr�objectr	r
r
rrZTestCaserr�mainrrrr�<module>sY