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__/__init__.cpython-311.pyc
�

��Vck���ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZd�Z
d�ZGd�d	ej��Zd
�ZdS)�N)�Message)�compat32)�load_package_tests)�__file__c�`�ttj�t��g|�R�S�N)r�os�path�dirnamer)�argss �,D:\Python311\Lib\test\test_email\__init__.py�
load_testsrs&���b�g�o�o�h�7�7�?�$�?�?�?�?�c��tj�tj�t��d|��}t|g|�Ri|��S)N�data)r	r
�joinr�landmark�open)�filenamer�kwsr
s    r
�openfilersE��
�7�<�<������1�1�6�8�D�D�D���#�t�#�#�#�s�#�#�#rc�p��eZdZdZeZeZ�fd�Ze	j
jZd�Z
d
d�Zd
d�Zd�Zd�Zd�Zd	�Z�xZS)�
TestEmailBaseNc�z��t��j|i|��|�t|j��dSr)�super�__init__�addTypeEqualityFunc�bytes�assertBytesEqual)�selfr�kw�	__class__s   �r
rzTestEmailBase.__init__!s>��������$�%�"�%�%�%�� � ���(=�>�>�>�>�>rc��t|d���5}tj||j���cddd��S#1swxYwYdS)Nzutf-8)�encoding��policy)r�email�message_from_filer&)r r�fps   r
�_msgobjzTestEmailBase._msgobj(s���
�h��
1�
1�
1�	C�R��*�2�d�k�B�B�B�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C����	C�	C�	C�	C�	C�	Cs
�:�>�>c�T�|�|j}|�|j}tj|||���S�Nr%)r&�messager'�message_from_string)r �stringr-r&s    r
�_str_msgzTestEmailBase._str_msg,s8���	!��[�F��	#��l�G��(����H�H�H�Hrc�T�|�|j}|�|j}tj|||���Sr,)r&r-r'�message_from_bytes)r �
bytestringr-r&s    r
�
_bytes_msgzTestEmailBase._bytes_msg3s8���	!��[�F��	#��l�G��'�
�G�F�K�K�K�Krc�8�|�|j���Sr,)r-r&)r s r
�
_make_messagezTestEmailBase._make_message:s���|�|�4�;�|�/�/�/rc�B�d�|�d���D��S)Nc�,�g|]}t|����S�)�repr)�.0�xs  r
�
<listcomp>z-TestEmailBase._bytes_repr.<locals>.<listcomp>>s��=�=�=�A��Q���=�=�=rT)�keepends)�
splitlines)r �bs  r
�_bytes_reprzTestEmailBase._bytes_repr=s$��=�=����t��!<�!<�=�=�=�=rc�~�|�|�|��|�|����dS)z@Our byte strings are really encoded strings; improve diff outputN)�assertEqualrA)r �first�second�msgs    r
rzTestEmailBase.assertBytesEqual@s:������)�)�%�0�0�$�2B�2B�6�2J�2J�K�K�K�K�Krc��|�t|��t|��|��tt|����D]8}|�||||d�|�����9dS)Nzitem {})rC�len�range�assertIsInstance�format)r �actual�expected�is    r
�assertDefectsEqualz TestEmailBase.assertDefectsEqualDs�������V���c�(�m�m�V�<�<�<��s�6�{�{�#�#�	9�	9�A��!�!�&��)�X�a�[�$-�$4�$4�Q�$7�$7�
9�
9�
9�
9�	9�	9r)NN)�__name__�
__module__�__qualname__�maxDiffrr&rr-r�unittest�TestCaserC�ndiffAssertEqualr*r0r4r6rArrO�
__classcell__)r"s@r
rrs���������G��F��G�?�?�?�?�?�
 �(�4��C�C�C�I�I�I�I�L�L�L�L�0�0�0�>�>�>�L�L�L�9�9�9�9�9�9�9rrc�n�i}tjt��}|j���D]�\}}|�d��rtt
|d��sTi}|D]M}t
|d��s|f}d�d�|D�����dd��}|||<�N|}|||dd�d	z<d	|vr7||�	d	��d
d	z�
|����i}|D](}||vr"td�|������)|D](}||vr"td�|������)|j���D]�\}}|���D]\}	}
|�
|	��red
|t|	��d�z}|
���D]6\}}
t
|
d��r||
fd�}n||
fd�}|dz|z}||_|||<�7����|���D]\}}t!|||���|S)a2A test method parameterization class decorator.

    Parameters are specified as the value of a class attribute that ends with
    the string '_params'.  Call the portion before '_params' the prefix.  Then
    a method to be parameterized must have the same prefix, the string
    '_as_', and an arbitrary suffix.

    The value of the _params attribute may be either a dictionary or a list.
    The values in the dictionary and the elements of the list may either be
    single values, or a list.  If single values, they are turned into single
    element tuples.  However derived, the resulting sequence is passed via
    *args to the parameterized test function.

    In a _params dictionary, the keys become part of the name of the generated
    tests.  In a _params list, the values in the list are converted into a
    string by joining the string values of the elements of the tuple by '_' and
    converting any blanks into '_'s, and this become part of the name.
    The  full name of a generated test is a 'test_' prefix, the portion of the
    test function name after the  '_as_' separator, plus an '_', plus the name
    derived as explained above.

    For example, if we have:

        count_params = range(2)

        def count_as_foo_arg(self, foo):
            self.assertEqual(foo+1, myfunc(foo))

    we will get parameterized test methods named:
        test_foo_arg_0
        test_foo_arg_1
        test_foo_arg_2

    Or we could have:

        example_params = {'foo': ('bar', 1), 'bing': ('bang', 2)}

        def example_as_myfunc_input(self, name, count):
            self.assertEqual(name+str(count), myfunc(name, count))

    and get:
        test_myfunc_input_foo
        test_myfunc_input_bing

    Note: if and only if the generated test name is a valid identifier can it
    be used to select the test individually from the unittest command line.

    The values in the params dict can be a single value, a tuple, or a
    dict.  If a single value of a tuple, it is passed to the test function
    as positional arguments.  If a dict, it is a passed via **kw.

    �_params�keys�__iter__�_c3�4K�|]}t|��V��dSr)�str)r;�vs  r
�	<genexpr>zparameterize.<locals>.<genexpr>�s(���� 3� 3�A��Q��� 3� 3� 3� 3� 3� 3r� Ni�����_as_rzNo tester found for {}zNo params found for {}�test_c�.�t||��di|��S)Nr9��getattr�r �name�paramss   r
�<lambda>zparameterize.<locals>.<lambda>�s$��$7�G�D�$�$7�$7�$A�$A�&�$A�$A�rc�(�t||��|�Srrergs   r
rjzparameterize.<locals>.<lambda>�s��(;���d�(;�(;�V�(D�r)�collections�defaultdict�list�__dict__�items�endswith�hasattrr�replace�split�append�
ValueErrorrK�
startswithrHrP�setattr)�cls�
paramdicts�testersrh�attr�dr<�n�	testfuncs�
paramsname�
paramsdict�testnameroot�	paramnameri�test�testname�key�values                  r
�parameterizer�Ks���j�J��%�d�+�+�G��l�(�(�*�*�A�A�
��d��=�=��#�#�		2��4��(�(�
������A�"�1�j�1�1�!��D����� 3� 3�� 3� 3� 3�3�3�;�;�C��E�E�A��A�a�D�D���-1�J�t�C�R�C�y�6�)�*��T�>�	A��D�J�J�v�&�&�q�)�F�2�3�:�:�4�@�@�@���I��D�D���w��	D��5�<�<�T�B�B�C�C�C�	D��D�D���z�!�	D��5�<�<�T�B�B�C�C�C�	D��l�(�(�*�*�
/�
/�
��d�&0�&6�&6�&8�&8�	/�	/�"�J�
����z�*�*�
/�&��c�*�o�o�.>�.>�)?�?��)3�)9�)9�);�);�	/�	/�%�I�v��v�v�.�.�F�26�v�!B�!B�!B���37�v�!E�!E�!E��+�c�1�I�=�H�$,�D�M�*.�I�h�'�'��	/� �o�o�'�'�!�!�
��U���S�%� � � � ��Jr)r	rTrlr'�
email.messager�email._policybaser�test.supportr�test.test_emailrrrrrUrr�r9rr
�<module>r�s���	�	�	�	�������������!�!�!�!�!�!�&�&�&�&�&�&�+�+�+�+�+�+�0�0�0�0�0�0�@�@�@�$�$�$�19�19�19�19�19�H�%�19�19�19�h[�[�[�[�[r