HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/test_email/__pycache__/torture_test.cpython-312.opt-1.pyc
�

}h�e�
����ddlZddlZddlZddlmZddlmZddlZddlmZ	ddl
mZd�Zd�Z
Gd�d	e�ZGd
�de�Zd�Zd
�Zedk(rej&�yy)�N)�StringIO)�
TestEmailBase)�__file__)�
_structurec��ddlm}m}m}|||t�t
jd|��}t|d�S)Nr)�join�dirname�abspath�moredata�r)�os.pathrr	r
�testfile�os�pardir�open)�filenamerr	r
�paths     �C/opt/alt/python312/lib64/python3.12/test/test_email/torture_test.py�openfilers2��.�.��4���)�2�9�9�j�(�K�L�D���c�?��c�V�	td�y#t$rtj�wxYw)N�crispin-torture.txt)r�OSError�unittest�SkipTest�rr�setUpModulers+�� ��&�'��� ����� �s��(c��eZdZd�Zy)�TortureBasec��t|�}	tj|�}|j�|S#|j�wxYw�N)r�email�message_from_file�close)�selfr�fp�msgs    r�_msgobjzTortureBase._msgobj#s<��
�h�
��	��)�)�"�-�C��H�H�J��
��
�H�H�J�s	�4�AN)�__name__�
__module__�__qualname__r(rrrrr"s��rrc��eZdZd�Zy)�TestCrispinTorturec�n�|j}|j}|jd�}|j�}|t	|�t
�|t
|�d�||jd�||jd�t�}t||��||j�d�y)Nr��
)r&a:multipart/mixed
    text/plain
    message/rfc822
        multipart/alternative
            text/plain
            multipart/mixed
                text/richtext
            application/andrew-inset
    message/rfc822
        audio/basic
    audio/basic
    image/pbm
    message/rfc822
        multipart/mixed
            multipart/mixed
                text/plain
                audio/x-sun
            multipart/mixed
                image/gif
                image/gif
                application/x-be2
                application/atomicmail
            audio/x-sun
    message/rfc822
        multipart/mixed
            text/plain
            image/pgm
            text/plain
    message/rfc822
        multipart/mixed
            text/plain
            image/pbm
    message/rfc822
        application/postscript
    image/gif
    message/rfc822
        multipart/mixed
            audio/basic
            audio/basic
    message/rfc822
        multipart/mixed
            application/postscript
            text/plain
            message/rfc822
                multipart/mixed
                    text/plain
                    multipart/parallel
                        image/gif
                        audio/basic
                    application/atomicmail
                    message/rfc822
                        audio/x-sun
)�assertEqual�ndiffAssertEqualr(�get_payload�type�list�len�preamble�epiloguerr�getvalue)r%�eq�neqr'�payloadr&s      r�test_mondo_messagez%TestCrispinTorture.test_mondo_message/s���
�
�
���#�#���l�l�0�1���/�/�#��
�4��=�$��
�3�w�<���
�3�<�<���
�3�<�<����Z���3�2���B�K�K�M�5�5	rN)r)r*r+r=rrrr-r--s��Brr-c��tjt}t|�D�cgc] }|j	d�s�t||���"c}Scc}w)N�Test)�sys�modulesr)�dir�
startswith�getattr)�mod�names  r�_testclassesrGss:��

�+�+�h�
�C�+.�s�8�O�4�t���v�7N�G�C���O�O��Os
�A
�A
c��|j�}t�D]"}|j|j|���$|Sr!)�
suiteClassrG�addTest�loadTestsFromTestCase)�loader�tests�pattern�suite�	testclasss     r�
load_testsrQxs=������E�!�^�?�	�
�
�
�f�2�2�9�=�>�?��Lr�__main__)r@rr�ior�test.test_emailrr"rr�email.iteratorsrrrrr-rGrQr)�mainrrr�<module>rWsi���	���)��&�&�� ��-��D��D�LP�
��z���H�M�M�O�r