HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/test_email/__pycache__/torture_test.cpython-311.opt-2.pyc
�

��VcK����ddlZddlZddlZddlmZddlmZddlZddlmZ	ddl
mZd�Zd�Z
Gd�d	e��ZGd
�de��Zd�Zd
�Zedkrej��dSdS)�N)�StringIO)�
TestEmailBase)�__file__)�
_structurec��ddlm}m}m}|||t��t
jd|����}t|d��S)Nr)�join�dirname�abspath�moredata�r)�os.pathrr	r
�testfile�os�pardir�open)�filenamerr	r
�paths     �0D:\Python311\Lib\test\test_email\torture_test.py�openfilersY��.�.�.�.�.�.�.�.�.�.��7�4�4����)�)�2�9�j�(�K�K�L�L�D���c�?�?��c�Z�	td��dS#t$r
tj�wxYw)N�crispin-torture.txt)r�OSError�unittest�SkipTest�rr�setUpModulers@�� ��&�'�'�'�'�'��� � � ���� ���s��*c��eZdZd�ZdS)�TortureBasec��t|��}	tj|��}|���n#|���wxYw|S�N)r�email�message_from_file�close)�selfr�fp�msgs    r�_msgobjzTortureBase._msgobj#sJ��
�h�
�
��	��)�"�-�-�C��H�H�J�J�J�J��B�H�H�J�J�J�J�����
s	�:�AN)�__name__�
__module__�__qualname__r(rrrrr"s#����������rrc��eZdZd�ZdS)�TestCrispinTorturec��|j}|j}|�d��}|���}|t	|��t
��|t
|��d��||jd��||jd��t��}t||���||���d��dS)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�1���/�/�#�#��
��4��=�=�$����
��3�w�<�<�����
��3�<�����
��3�<������Z�Z���3�2�������B�K�K�M�M�5�5	�5	�5	�5	�5	rN)r)r*r+r=rrrr-r--s(������B�B�B�B�Brr-c�h��tjt��fd�t���D��S)Nc�Z��g|]'}|�d���t�|����(S)�Test)�
startswith�getattr)�.0�name�mods  �r�
<listcomp>z _testclasses.<locals>.<listcomp>us4���O�O�O�4�t���v�7N�7N�O�G�C����O�O�Or)�sys�modulesr)�dir)rEs@r�_testclassesrJss/���

�+�h�
�C�O�O�O�O�3�s�8�8�O�O�O�Orc��|���}t��D]*}|�|�|�����+|Sr!)�
suiteClassrJ�addTest�loadTestsFromTestCase)�loader�tests�pattern�suite�	testclasss     r�
load_testsrTxsN�������E�!�^�^�?�?�	�
�
�
�f�2�2�9�=�=�>�>�>�>��Lr�__main__)rGrr�ior�test.test_emailrr"rr�email.iteratorsrrrrr-rJrTr)�mainrrr�<module>rZs9���
�
�
�	�	�	�	�����������)�)�)�)�)�)�����&�&�&�&�&�&�&�&�&�&�&�&���� � � ������-����D�D�D�D�D��D�D�D�LP�P�P�
����z����H�M�O�O�O�O�O��r