Your IP : 216.73.216.213


Current Path : /opt/alt/python38/lib64/python3.8/test/test_email/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/test/test_email/__pycache__/test_pickleable.cpython-38.pyc

U

i�f�	�@s�ddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZeGdd�de
��ZeGdd�de
��Z
ed	kr�e��dS)
�N��policy)�HeaderRegistry)�
TestEmailBase�parameterizec@s:eZdZe�Zedd�Zddddd�Zdd	�Zd
d�ZdS)
�TestPickleCopyHeader�subject�this is a test)rr	)�from�frodo@mordor.net)�toza: k@b.com, y@z.com;, j@f.com)�date�Tue, 29 May 2012 09:24:26 +1000)rr
rr
cCs.|�||�}t�|�}|�t|�t|��dS�N)�header_factory�copy�deepcopy�assertEqual�str)�self�name�value�header�h�r�D/opt/alt/python38/lib64/python3.8/test/test_email/test_pickleable.py�header_as_deepcopys
z'TestPickleCopyHeader.header_as_deepcopycCsN|�||�}ttjd�D].}t�||�}t�|�}|�t|�t|��qdS�N�)r�range�pickle�HIGHEST_PROTOCOL�dumps�loadsrr)rrrr�proto�prrrr�header_as_pickles

z%TestPickleCopyHeader.header_as_pickleN)	�__name__�
__module__�__qualname__rrZunstructuredZ
header_paramsrr&rrrrrs
�rc@s�eZdZiZeje�d�ej	d�fed<ej
jej	d�fed<deddd<deddd	<d
eddd<deddd
<edd�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.
        rZparsedZcreatedrrZDaterZFromzbilbo@underhill.orgZTo�helpZSubjectzI think I forgot the ring.cCs"t�|�}|�|��|���dSr)rrr�	as_string)r�msg�msg2rrr�msg_as_deepcopy@s
z%TestPickleCopyMessage.msg_as_deepcopycCsBttjd�D].}t�||�}t�|�}|�|��|���qdSr)rr r!r"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/r0rrrrr*'s�	r*�__main__)Zunittestr2rr r1Z
email.messagerZemail.headerregistryrZtest.test_emailrrrr*r'�mainrrrr�<module>s#