Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/test/test_email/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/test/test_email/__pycache__/__init__.cpython-33.pyc

�
��f�c@s�ddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZdd�Z
dd�Zd	d
�ZGdd�dej�Zd
d�ZdS(iN(uMessage(ucompat32(u__file__cCsPtjjt�}|dkr'd}n|jd|d|�}|j|�|S(Nutest*u	start_dirupattern(uosupathudirnameu__file__uNoneudiscoveruaddTests(uloaderustandard_testsupatternuthis_diru
package_tests((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu
load_testss	
u
load_testscCsXtjjt�}tjdd�}tjjtj	j
|��|tjdd�<dS(N(uosupathudirnameu__file__usysutestusupportu
_run_suiteuunittestudefaultTestLoaderudiscover(uhereusavepath((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu	test_mainsu	test_maincOs4tjjtjjt�d|�}t|||�S(Nudata(uosupathujoinudirnameulandmarkuopen(ufilenameuargsukwsupath((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyuopenfile s$uopenfilecs�|EeZdZd
ZeZ�fdd�Zej	j
Zdd�Ze
d
dd�Zdd�Zd	d
�Zdd�Z�S(u
TestEmailBasecs*t�j||�|jt|j�dS(N(usuperu__init__uaddTypeEqualityFuncubytesuassertBytesEqual(uselfuargsukw(u	__class__(u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu__init__.suTestEmailBase.__init__cCs/t|��}tj|d|j�SWdQXdS(Nupolicy(uopenfileuemailumessage_from_fileupolicy(uselfufilenameufp((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu_msgobj5suTestEmailBase._msgobjcCs.|dkr|j}ntj||d|�S(Nupolicy(uNoneupolicyuemailumessage_from_string(uselfustringumessageupolicy((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu_str_msg9suTestEmailBase._str_msgcCsdd�|jdd�D�S(NcSsg|]}t|��qS((urepr(u.0ux((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu
<listcomp>?s	u-TestEmailBase._bytes_repr.<locals>.<listcomp>ukeependsT(u
splitlinesuTrue(uselfub((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu_bytes_repr>suTestEmailBase._bytes_reprcCs&|j|j|�|j|��dS(u@Our byte strings are really encoded strings; improve diff outputN(uassertEqualu_bytes_repr(uselfufirstusecondumsg((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyuassertBytesEqualAsuTestEmailBase.assertBytesEqualcCsd|jt|�t|�|�x>tt|��D]*}|j||||dj|��q2WdS(Nuitem {}(uassertEqualulenurangeuassertIsInstanceuformat(uselfuactualuexpectedui((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyuassertDefectsEqualEsu TestEmailBase.assertDefectsEqualN(u__name__u
__module__u__qualname__uNoneumaxDiffucompat32upolicyu__init__uunittestuTestCaseuassertEqualundiffAssertEqualu_msgobjuMessageu_str_msgu_bytes_repruassertBytesEqualuassertDefectsEqual(u
__locals__((u	__class__u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu
TestEmailBase&su
TestEmailBasecCs�i}x�|jj�D]�\}}|jd�rt|d�s�i}x[|D]S}t|d�sn|f}ndjdd�|D��jdd�}|||<qMW|}n|||dd�d
<qqWi}x�|jj�D]�\}}x�|j�D]�\}}	|j|�r�d|t|�d�}
xP|	j�D]?\}}||dd
�}
|
d|}||
_|
||<q=Wq�q�Wq�Wx*|j�D]\}}t	|||�q�W|S(u]A 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 dictioanry, 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.

    u_paramsukeysu__iter__u_css|]}t|�VqdS(N(ustr(u.0uv((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu	<genexpr>�suparameterize.<locals>.<genexpr>u Niu_as_utest_cSst||�|�S(N(ugetattr(uselfunameuparams((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu<lambda>�suparameterize.<locals>.<lambda>i����(
u__dict__uitemsuendswithuhasattrujoinureplaceu
startswithulenu__name__usetattr(uclsu
paramdictsunameuattruduxunu	testfuncsu
paramsnameu
paramsdictutestnamerootu	paramnameuparamsutestutestnameukeyuvalue((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyuparameterizeLs21
(		uparameterize(uosusysuunittestutest.supportutestuemailu
email.messageuMessageuemail._policybaseucompat32utest.test_emailu__file__ulandmarku
load_testsu	test_mainuopenfileuTestCaseu
TestEmailBaseuparameterize(((u=/opt/alt/python33/lib64/python3.3/test/test_email/__init__.pyu<module>s
&