Your IP : 216.73.216.213


Current Path : /proc/242857/root/opt/alt/python34/lib64/python3.4/test/__pycache__/
Upload File :
Current File : //proc/242857/root/opt/alt/python34/lib64/python3.4/test/__pycache__/test_copyreg.cpython-34.pyc

�
f fy�@s�ddlZddlZddlmZddlmZGdd�d�ZGdd�de�ZGdd	�d	e�Z	Gd
d�de�Z
Gdd
�d
e�ZGdd�de�ZGdd�dej
�Zdd�Zedkr�e�ndS)�N)�support)�ExtensionSaverc@seZdZdS)�CN)�__name__�
__module__�__qualname__�rr�6/opt/alt/python34/lib64/python3.4/test/test_copyreg.pyrsrc@seZdZdS)�WithoutSlotsN)rrrrrrr	r
sr
c@seZdZdZdS)�WithWeakref�__weakref__N)z__weakref__)rrr�	__slots__rrrr	rsrc@seZdZdZdS)�WithPrivate�__spamN)r)rrrr
rrrr	rsrc@seZdZdZdS)�WithSingleString�spamN)rrrr
rrrr	rsrc@seZdZdZdS)�
WithInherited�eggsN)r)rrrr
rrrr	rs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)rr rrr	�	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�nWd|j�X|j	||ftj�xRd	D]J}t|�}z*tj|||�tj|||�Wd|j�XqWx*dD]"}|jttj|||�qYWdS)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
rrr�sortr)rZexpected�resultrrr	�test_slotnamesgs	

zCopyRegTestCase.test_slotnamesN)	rrrrrrr"r3r7rrrr	rs:rcCstjt�dS)N)rZrun_unittestrrrrr	�	test_maintsr8�__main__)rZunittestZtestrZtest.pickletesterrr�objectr
rrrrZTestCaserr8rrrrr	�<module>sY