Your IP : 216.73.216.213


Current Path : /opt/alt/python36/lib64/python3.6/test/test_email/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/test/test_email/__pycache__/test_pickleable.cpython-36.opt-2.pyc

3

��2a�	�@s�ddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZeGdd�de
��ZeGdd�de
��Z
ed	kr�ej�dS)
�N)�policy)�HeaderRegistry)�
TestEmailBase�parameterizec@s:eZdZe�Zedd�Zddddd	�Zd
d�Zdd
�ZdS)�TestPickleCopyHeader�subject�this is a test�from�frodo@mordor.net�to�a: k@b.com, y@z.com;, j@f.com�date�Tue, 29 May 2012 09:24:26 +1000)rr	rr
cCs.|j||�}tj|�}|jt|�t|��dS)N)�header_factory�copy�deepcopy�assertEqual�str)�self�name�value�header�h�r�4/opt/alt/python36/lib64/python3.6/test_pickleable.py�header_as_deepcopys
z'TestPickleCopyHeader.header_as_deepcopycCsR|j||�}x@ttjd�D].}tj||�}tj|�}|jt|�t|��qWdS)N�)r�range�pickle�HIGHEST_PROTOCOL�dumps�loadsrr)rrrr�proto�prrrr�header_as_pickles

z%TestPickleCopyHeader.header_as_pickleN)rr)r	r
)rr)r
r)	�__name__�
__module__�__qualname__rrZunstructuredZ
header_paramsrr$rrrrrs
rc@s�eZdZiZejejd�ej	d�fed<ej
jej	d�fed<deddd<deddd	<d
eddd<deddd
<eddjd�dd�Z
dd�ZdS)�TestPickleCopyMessagez�        Date: Tue, 29 May 2012 09:24:26 +1000
        From: frodo@mordor.net
        To: bilbo@underhill.org
        Subject: help

        I think I forgot the ring.
        )rZparsedZcreatedzTue, 29 May 2012 09:24:26 +1000rZDatezfrodo@mordor.netZFromzbilbo@underhill.orgZTo�helpZSubjectzI think I forgot the ring.cCs"tj|�}|j|j�|j��dS)N)rrr�	as_string)r�msg�msg2rrr�msg_as_deepcopy@s
z%TestPickleCopyMessage.msg_as_deepcopycCsFx@ttjd�D].}tj||�}tj|�}|j|j�|j��qWdS)Nr)rrrr r!rr*)rr+r"r#r,rrr�
msg_as_pickleDs
z#TestPickleCopyMessage.msg_as_pickleN)r%r&r'Z
msg_params�emailZmessage_from_string�textwrap�dedentr�default�messageZMessageZset_payloadr-r.rrrrr('sr(�__main__)Zunittestr0rrr/Z
email.messagerZemail.headerregistryrZtest.test_emailrrrr(r%�mainrrrr�<module>s#