Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/test_email/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/test_email/__pycache__/__init__.cpython-312.pyc

�

(Μg����ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZd�Z
d�ZGd�d	ej�Zd
�Zy)�N)�Message)�compat32)�load_package_tests)�__file__c�\�ttjjt�g|���S�N)r�os�path�dirnamer)�argss �5/usr/local/lib/python3.12/test/test_email/__init__.py�
load_testsrs���b�g�g�o�o�h�7�?�$�?�?�c��tjjtjjt�d|�}t|g|��i|��S)N�data)r	r
�joinr�landmark�open)�filenamer�kwsr
s    r
�openfilers:��
�7�7�<�<�������1�6�8�D�D���#�t�#�s�#�#rc���eZdZdZeZeZ�fd�Ze	jjZd�Z
d
d�Zd
d�Zd�Zd�Zd�Zd	�Z�xZS)�
TestEmailBaseNc�d��t�|�|i|��|jt|j�yr)�super�__init__�addTypeEqualityFunc�bytes�assertBytesEqual)�selfr�kw�	__class__s   �r
rzTestEmailBase.__init__!s+���
���$�%�"�%�� � ���(=�(=�>rc��t|d��5}tj||j��cddd�S#1swYyxYw)Nzutf-8)�encoding��policy)r�email�message_from_filer&)r r�fps   r
�_msgobjzTestEmailBase._msgobj(s.��
�h��
1�R��*�*�2�d�k�k�B�2�
1�
1�s	�!9�Ac�j�|�|j}|�|j}tj|||��S�Nr%)r&�messager'�message_from_string)r �stringr-r&s    r
�_str_msgzTestEmailBase._str_msg,s3���>��[�[�F��?��l�l�G��(�(����H�Hrc�j�|�|j}|�|j}tj|||��Sr,)r&r-r'�message_from_bytes)r �
bytestringr-r&s    r
�
_bytes_msgzTestEmailBase._bytes_msg3s3���>��[�[�F��?��l�l�G��'�'�
�G�F�K�Krc�:�|j|j��Sr,)r-r&)r s r
�
_make_messagezTestEmailBase._make_message:s���|�|�4�;�;�|�/�/rc�^�|jd��D�cgc]
}t|���c}Scc}w)NT)�keepends)�
splitlines�repr)r �b�xs   r
�_bytes_reprzTestEmailBase._bytes_repr=s+��!"���t��!<�=�!<�A��Q��!<�=�=��=s�*c�d�|j|j|�|j|��y)z@Our byte strings are really encoded strings; improve diff outputN)�assertEqualr=)r �first�second�msgs    r
rzTestEmailBase.assertBytesEqual@s(������)�)�%�0�$�2B�2B�6�2J�Krc���|jt|�t|�|�tt|��D]*}|j||||dj	|���,y)Nzitem {})r?�len�range�assertIsInstance�format)r �actual�expected�is    r
�assertDefectsEqualz TestEmailBase.assertDefectsEqualDsW������V��c�(�m�V�<��s�6�{�#�A��!�!�&��)�X�a�[�$-�$4�$4�Q�$7�
9�$r)NN)�__name__�
__module__�__qualname__�maxDiffrr&rr-r�unittest�TestCaser?�ndiffAssertEqualr*r0r4r6r=rrK�
__classcell__)r"s@r
rrsT����G��F��G�?�
 �(�(�4�4��C�I�L�0�>�L�9rrc���i}tjt�}|jj	�D]�\}}|jd�r^t
|d�sGi}|D]>}t
|d�s|f}djd�|D��jdd�}|||<�@|}|||ddd	z<d	|vs�z||jd	�d
d	zj|���i}|D] }||vs�tdj|���|D] }||vs�tdj|���|jj	�D]�\}}|j	�D]m\}	}
|j|	�s�d
|t|	�dz}|
j	�D]2\}}
t
|
d�r||
fd�}n||
fd�}|dz|z}||_|||<�4�o��|j	�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�2K�|]}t|����y�wr)�str)�.0�vs  r
�	<genexpr>zparameterize.<locals>.<genexpr>�s���� 3��A��Q���s�� Ni�����_as_rzNo tester found for {}zNo params found for {}�test_c�&�t||�di|��S)N���getattr�r �name�paramss   r
�<lambda>zparameterize.<locals>.<lambda>�s��$7�G�D�$�$7�$A�&�$Arc� �t||�|�Srrcres   r
rhzparameterize.<locals>.<lambda>�s��(;���d�(;�V�(Dr)�collections�defaultdict�list�__dict__�items�endswith�hasattrr�replace�split�append�
ValueErrorrG�
startswithrDrL�setattr)�cls�
paramdicts�testersrf�attr�dr<�n�	testfuncs�
paramsname�
paramsdict�testnameroot�	paramnamerg�test�testname�key�values                  r
�parameterizer�Ks��j�J��%�%�d�+�G��l�l�(�(�*�
��d��=�=��#��4��(����A�"�1�j�1��D����� 3�� 3�3�;�;�C��E�A��A�a�D�	�
��-1�J�t�C�R�y�6�)�*��T�>��D�J�J�v�&�q�)�F�2�3�:�:�4�@�+��I����w���5�<�<�T�B�C�C�����z�!��5�<�<�T�B�C�C���l�l�(�(�*�
��d�&0�&6�&6�&8�"�J�
����z�*�&��c�*�o�.>�)?�?��)3�)9�)9�);�%�I�v��v�v�.�26�v�!B��37�v�!E��+�c�1�I�=�H�$,�D�M�*.�I�h�'�*<�'9�+� �o�o�'�
��U���S�%� �(��Jr)r	rPrjr'�
email.messager�email._policybaser�test.supportr�test.test_emailrrrrrQrr�rbrr
�<module>r�sA��	����!�&�+�0�@�$�19�H�%�%�19�h[r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists