§
    Ètºf”_  ã                   ón  — d Z ddlZddlZddlmZ ddlmZ ddlmZm	Z	m
Z
mZmZ ddlmZ  G d„ d¦  «        Z G d	„ d
e¦  «        Z G d„ d¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d¦  «        Z G d„ de¦  «        Z G d„ d¦  «        Z G d„ dee¦  «        Z edefdddœ¦  «        Z G d „ d!e¦  «        Z G d"„ d#e¦  «        Z G d$„ d%e¦  «        Z G d&„ d'e¦  «        Z  G d(„ d)e¦  «        Z! G d*„ d+e¦  «        Z" G d,„ d-e¦  «        Z#dS ).z6
Test cases for the L{twisted.python.reflect} module.
é    N)Údeque)Úreflect)ÚaccumulateMethodsÚaddMethodNamesToDictÚfullyQualifiedNameÚprefixedMethodNamesÚprefixedMethods)ÚSynchronousTestCasec                   ó   — e Zd ZdZd„ ZdS )ÚBasez`
    A no-op class which can be used to verify the behavior of
    method-discovering APIs.
    c                 ó   — dS )z9
        A no-op method which can be discovered.
        N© ©Úselfs    úX/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/test/test_reflect.pyÚmethodzBase.method   ó   € € € ó    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      s-   € € € € € ðð ð
ð ð ð ð r   r   c                   ó   — e Zd ZdZdS )ÚSubzF
    A subclass of a class with a method which can be discovered.
    N)r   r   r   r   r   r   r   r   r   $   s   € € € € € ðð ð ð r   r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚSeparatez=
    A no-op class with methods with differing prefixes.
    c                 ó   — dS )zJ
        A no-op method which a matching prefix to be discovered.
        Nr   r   s    r   Úgood_methodzSeparate.good_method/   r   r   c                 ó   — dS )zO
        A no-op method with a mismatched prefix to not be discovered.
        Nr   r   s    r   Ú
bad_methodzSeparate.bad_method4   r   r   N)r   r   r   r   r   r    r   r   r   r   r   *   s<   € € € € € ðð ðð ð ð
ð ð ð ð r   r   c                   ó$   — e Zd ZdZd„ Zd„ Zd„ ZdS )ÚAccumulateMethodsTestszt
    Tests for L{accumulateMethods} which finds methods on a class hierarchy and
    adds them to a dictionary.
    c                 ó€   — t          ¦   «         }i }t          ||¦  «         |                      d|j        i|¦  «         dS )zí
        If x is and instance of Base and Base defines a method named method,
        L{accumulateMethods} adds an item to the given dictionary with
        C{"method"} as the key and a bound method object for Base.method value.
        r   N)r   r   ÚassertEqualr   ©r   ÚxÚoutputs      r   Útest_ownClassz$AccumulateMethodsTests.test_ownClass@   sE   € õ ‰FŒFˆØˆÝ˜!˜VÑ$Ô$Ð$Ø×Ò˜( A¤HÐ-¨vÑ6Ô6Ð6Ð6Ð6r   c                 ó€   — t          ¦   «         }i }t          ||¦  «         |                      d|j        i|¦  «         dS )a  
        If x is an instance of Sub and Sub is a subclass of Base and Base
        defines a method named method, L{accumulateMethods} adds an item to the
        given dictionary with C{"method"} as the key and a bound method object
        for Base.method as the value.
        r   N)r   r   r$   r   r%   s      r   Útest_baseClassz%AccumulateMethodsTests.test_baseClassK   sE   € õ ‰EŒEˆØˆÝ˜!˜VÑ$Ô$Ð$Ø×Ò˜( A¤HÐ-¨vÑ6Ô6Ð6Ð6Ð6r   c                 ó‚   — t          ¦   «         }i }t          ||d¦  «         |                      d|j        i|¦  «         dS )zÐ
        If a prefix is given, L{accumulateMethods} limits its results to
        methods beginning with that prefix.  Keys in the resulting dictionary
        also have the prefix removed from them.
        Úgood_r   N)r   r   r$   r   r%   s      r   Útest_prefixz"AccumulateMethodsTests.test_prefixW   sG   € õ ‰JŒJˆØˆÝ˜!˜V WÑ-Ô-Ð-Ø×Ò˜( A¤MÐ2°FÑ;Ô;Ð;Ð;Ð;r   N)r   r   r   r   r(   r*   r-   r   r   r   r"   r"   :   sK   € € € € € ðð ð
	7ð 	7ð 	7ð
7ð 
7ð 
7ð	<ð 	<ð 	<ð 	<ð 	<r   r"   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚPrefixedMethodsTestszr
    Tests for L{prefixedMethods} which finds methods on a class hierarchy and
    adds them to a dictionary.
    c                 óx   — t          ¦   «         }t          |¦  «        }|                      |j        g|¦  «         dS )zc
        L{prefixedMethods} returns a list of the methods discovered on an
        object.
        N)r   r	   r$   r   r%   s      r   Útest_onlyObjectz$PrefixedMethodsTests.test_onlyObjecti   s:   € õ
 ‰FŒFˆÝ  Ñ#Ô#ˆØ×Ò˜!œ(˜ VÑ,Ô,Ð,Ð,Ð,r   c                 óz   — t          ¦   «         }t          |d¦  «        }|                      |j        g|¦  «         dS )zo
        If a prefix is given, L{prefixedMethods} returns only methods named
        with that prefix.
        r,   N)r   r	   r$   r   r%   s      r   r-   z PrefixedMethodsTests.test_prefixr   s<   € õ
 ‰JŒJˆÝ   GÑ,Ô,ˆØ×Ò˜!œ-˜¨&Ñ1Ô1Ð1Ð1Ð1r   N)r   r   r   r   r1   r-   r   r   r   r/   r/   c   s<   € € € € € ðð ð
-ð -ð -ð2ð 2ð 2ð 2ð 2r   r/   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚPrefixedMethodNamesTestsz+
    Tests for L{prefixedMethodNames}.
    c                 óZ   — |                       dgt          t          d¦  «        ¦  «         dS )zŠ
        L{prefixedMethodNames} returns a list including methods with the given
        prefix defined on the class passed to it.
        r   r,   N)r$   r   r   r   s    r   Útest_methodz$PrefixedMethodNamesTests.test_method�   s-   € ð
 	×Ò˜(˜Õ%8½À7Ñ%KÔ%KÑLÔLÐLÐLÐLr   c                 óv   —  G d„ dt           ¦  «        }|                      dgt          |d¦  «        ¦  «         dS )z™
        L{prefixedMethodNames} returns a list included methods with the given
        prefix defined on base classes of the class passed to it.
        c                   ó   — e Zd ZdS )ú<PrefixedMethodNamesTests.test_inheritedMethod.<locals>.ChildN©r   r   r   r   r   r   ÚChildr9   Ž   ó   € € € € € ØˆDr   r;   r   r,   N)r   r$   r   )r   r;   s     r   Útest_inheritedMethodz-PrefixedMethodNamesTests.test_inheritedMethodˆ   sW   € ð	ð 	ð 	ð 	ð 	•Hñ 	ô 	ð 	ð 	×Ò˜(˜Õ%8¸ÀÑ%HÔ%HÑIÔIÐIÐIÐIr   N)r   r   r   r   r6   r=   r   r   r   r4   r4   |   sD   € € € € € ðð ðMð Mð Mð	Jð 	Jð 	Jð 	Jð 	Jr   r4   c                   ó   — e Zd ZdZd„ ZdS )ÚAddMethodNamesToDictTestsz,
    Tests for L{addMethodNamesToDict}.
    c                 ó    —  G d„ d¦  «        } G d„ dt           |¦  «        }i }t          ||d|¦  «         |                      ddi|¦  «         dS )	z¥
        If C{baseClass} is passed to L{addMethodNamesToDict}, only methods which
        are a subclass of C{baseClass} are added to the result dictionary.
        c                   ó   — e Zd ZdS )ú;AddMethodNamesToDictTests.test_baseClass.<locals>.AlternateNr:   r   r   r   Ú	AlternaterB   Ÿ   r<   r   rC   c                   ó   — e Zd Zd„ ZdS )ú7AddMethodNamesToDictTests.test_baseClass.<locals>.Childc                 ó   — d S ©Nr   r   s    r   Úgood_alternatezFAddMethodNamesToDictTests.test_baseClass.<locals>.Child.good_alternate£   ó   € Ø�r   N)r   r   r   rH   r   r   r   r;   rE   ¢   ó#   € € € € € ðð ð ð ð r   r;   r,   Ú	alternateé   N)r   r   r$   )r   rC   r;   Úresults       r   r*   z(AddMethodNamesToDictTests.test_baseClass™   s’   € ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð	ð 	ð 	ð 	ð 	•H˜iñ 	ô 	ð 	ð ˆÝ˜U F¨G°YÑ?Ô?Ð?Ø×Ò˜+ qÐ)¨6Ñ2Ô2Ð2Ð2Ð2r   N)r   r   r   r   r*   r   r   r   r?   r?   ”   s-   € € € € € ðð ð3ð 3ð 3ð 3ð 3r   r?   c                   ó   — e Zd ZdZd„ ZdS )ÚSummerz9
    A class we look up as part of the LookupsTests.
    c                 ó   — dS )z
        Do something.
        Nr   r   s    r   Ú	reallySetzSummer.reallySet°   r   r   N)r   r   r   r   rQ   r   r   r   rO   rO   «   s-   € € € € € ðð ðð ð ð ð r   rO   c                   ó`   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zd„ ZdS )ÚLookupsTestszC
    Tests for L{namedClass}, L{namedModule}, and L{namedAny}.
    c                 ó`   — |                       t          j        d¦  «        t          ¦  «         dS )zY
        L{namedClass} should return the class object for the name it is passed.
        ú twisted.test.test_reflect.SummerN)ÚassertIsr   Ú
namedClassrO   r   s    r   Útest_namedClassLookupz"LookupsTests.test_namedClassLookup»   s*   € ð 	�Š•gÔ(Ð)KÑLÔLÍfÑUÔUÐUÐUÐUr   c                 ób   — ddl m} |                      t          j        d¦  «        |¦  «         dS )zc
        L{namedModule} should return the module object for the name it is
        passed.
        r   ©Úmonkeyútwisted.python.monkeyN)Útwisted.pythonr[   rV   r   ÚnamedModule©r   r[   s     r   Útest_namedModuleLookupz#LookupsTests.test_namedModuleLookupÁ   s<   € ð
 	*Ð)Ð)Ð)Ð)Ð)à�Š•gÔ)Ð*AÑBÔBÀFÑKÔKÐKÐKÐKr   c                 óh   — ddl }|                      t          j        d¦  «        |j        ¦  «         dS )zY
        L{namedAny} should return the package object for the name it is passed.
        r   Nútwisted.python)r]   rV   r   ÚnamedAnyÚpython©r   Útwisteds     r   Útest_namedAnyPackageLookupz'LookupsTests.test_namedAnyPackageLookupÊ   s8   € ð 	ÐÐÐà�Š•gÔ&Ð'7Ñ8Ô8¸'¼.ÑIÔIÐIÐIÐIr   c                 ób   — ddl m} |                      t          j        d¦  «        |¦  «         dS )zX
        L{namedAny} should return the module object for the name it is passed.
        r   rZ   r\   N)r]   r[   rV   r   rc   r_   s     r   Útest_namedAnyModuleLookupz&LookupsTests.test_namedAnyModuleLookupÒ   s<   € ð 	*Ð)Ð)Ð)Ð)Ð)à�Š•gÔ&Ð'>Ñ?Ô?ÀÑHÔHÐHÐHÐHr   c                 ó`   — |                       t          j        d¦  «        t          ¦  «         dS )zW
        L{namedAny} should return the class object for the name it is passed.
        rU   N)rV   r   rc   rO   r   s    r   Útest_namedAnyClassLookupz%LookupsTests.test_namedAnyClassLookupÚ   s*   € ð 	�Š•gÔ&Ð'IÑJÔJÍFÑSÔSÐSÐSÐSr   c                 ój   — |                       t          j        d¦  «        t          j        ¦  «         dS )z–
        L{namedAny} should return the object an attribute of a non-module,
        non-package object is bound to for the name it is passed.
        z*twisted.test.test_reflect.Summer.reallySetN)r$   r   rc   rO   rQ   r   s    r   Útest_namedAnyAttributeLookupz)LookupsTests.test_namedAnyAttributeLookupà   s;   € ð 	×ÒÝÔÐIÑJÔJÝÔñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ót   — |                       t          j        d¦  «        t          j        j        ¦  «         dS )zÉ
        L{namedAny} should return the object an attribute of an object which
        itself was an attribute of a non-module, non-package object is bound to
        for the name it is passed.
        z2twisted.test.test_reflect.Summer.reallySet.__doc__N)rV   r   rc   rO   rQ   r   r   s    r   Ú"test_namedAnySecondAttributeLookupz/LookupsTests.test_namedAnySecondAttributeLookupí   s<   € ð 	�ŠÝÔÐTÑUÔUÝÔÔ$ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó6  — |                       t          t          j        d¦  «         |                       t          t          j        d¦  «         |                       t          t          j        d¦  «         |                       t
          t          j        d¦  «         dS )z�
        Exceptions raised by modules which L{namedAny} causes to be imported
        should pass through L{namedAny} to the caller.
        ztwisted.test.reflect_helper_ZDEztwisted.test.reflect_helper_VEztwisted.test.reflect_helper_IEN)ÚassertRaisesÚZeroDivisionErrorr   rc   Ú
ValueErrorÚImportErrorr   s    r   Útest_importExceptionsz"LookupsTests.test_importExceptionsø   s    € ð
 	×ÒÝ�wÔ/Ð1Rñ	
ô 	
ð 	
ð 	×ÒÝ�wÔ/Ð1Rñ	
ô 	
ð 	
ð 	×ÒÝ�Ô(Ð*Jñ	
ô 	
ð 	
ð
 	×ÒÝ�Ô)Ð+Kñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óê   — |                       t          t          j        d¦  «         |                       t          t          j        d¦  «         |                       t          t          j        d¦  «         dS )zï
        If segments on the end of a fully-qualified Python name represents
        attributes which aren't actually present on the object represented by
        the earlier segments, L{namedAny} should raise an L{AttributeError}.
        ztwisted.nosuchmoduleintheworldz twisted.nosuch.modulein.theworldz0twisted.test.test_reflect.Summer.nosuchattributeN)rq   ÚAttributeErrorr   rc   r   s    r   Útest_attributeExceptionsz%LookupsTests.test_attributeExceptions  s|   € ð 	×ÒÝ�GÔ,Ð.Nñ	
ô 	
ð 	
ð 	×ÒÝ�GÔ,Ð.Pñ	
ô 	
ð 	
ð 	×ÒÝÝÔØ>ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó"  — |                       t          j        t          j        d¦  «        }|                      t          |¦  «        d¦  «         |                       t          j        t          j        d¦  «        }|                      t          |¦  «        d¦  «         |                       t          j        t          j        d¦  «        }|                      t          |¦  «        d¦  «         |                       t          j        t          j        d¦  «        }|                      t          |¦  «        d¦  «         d	D ]S}|                       t          j        t          j        |¦  «        }|                      t          |¦  «        d
|›�¦  «         ŒTdS )a•  
        Passing a name which isn't a fully-qualified Python name to L{namedAny}
        should result in one of the following exceptions:
         - L{InvalidName}: the name is not a dot-separated list of Python
           objects
         - L{ObjectNotFound}: the object doesn't exist
         - L{ModuleNotFound}: the object doesn't exist and there is only one
           component in the name
        Únosuchmoduleintheworldz(No module named 'nosuchmoduleintheworld'z@#$@(#.!@(#!@#z('@#$@(#.!@(#!@#' does not name an objectztcelfer.nohtyp.detsiwtz0'tcelfer.nohtyp.detsiwt' does not name an objectÚ zEmpty module name)z.twistedztwisted.ztwisted..pythonzMname must be a string giving a '.'-separated list of Python identifiers, not N)rq   r   ÚModuleNotFoundrc   r$   ÚstrÚObjectNotFoundÚInvalidName)r   ÚerrÚinvalidNames      r   Útest_invalidNameszLookupsTests.test_invalidNames"  sn  € ð ×ÒÝÔ"¥GÔ$4Ð6Nñ
ô 
ˆð 	×Ò�˜S™œÐ#MÑNÔNÐNð ×ÒÝÔ"¥GÔ$4Ð6Fñ
ô 
ˆð 	×Ò�˜S™œÐ#MÑNÔNÐNà×ÒÝÔ"¥GÔ$4Ð6Nñ
ô 
ˆð 	×Ò�˜S™œÐ#UÑVÔVÐVà×Ò¥Ô 3µWÔ5EÀrÑJÔJˆØ×Ò�˜S™œÐ#6Ñ7Ô7Ð7àFð 	ð 	ˆKØ×#Ò#¥GÔ$7½Ô9IÈ;ÑWÔWˆCØ×ÒÝ�C‘”�à)4¨ð7ñô ð ð ð	ð 	r   c                 ó„   — dD ]<}t          ¦   «         }t          j        ||¬¦  «        }|                      ||¦  «         Œ=dS )zk
        When module import fails with ImportError it returns the specified
        default value.
        )Únosuchmtopoduleúno.such.module©ÚdefaultN)Úobjectr   ÚrequireModulerV   )r   Únamer‡   rM   s       r   Útest_requireModuleImportErrorz*LookupsTests.test_requireModuleImportErrorG  sR   € ð
 :ð 	+ð 	+ˆDÝ‘h”hˆGåÔ*¨4¸ÐAÑAÔAˆFà�MŠM˜& 'Ñ*Ô*Ð*Ð*ð	+ð 	+r   c                 óX   — t          j        d¦  «        }|                      |¦  «         dS )zI
        When module import fails it returns L{None} by default.
        r…   N)r   r‰   ÚassertIsNone)r   rM   s     r   Útest_requireModuleDefaultNonez*LookupsTests.test_requireModuleDefaultNoneS  s/   € õ Ô&Ð'7Ñ8Ô8ˆà×Ò˜&Ñ!Ô!Ð!Ð!Ð!r   c                 ó‚   — ddl m} t          ¦   «         }|                      t	          j        d|¬¦  «        |¦  «         dS )ze
        When module import succeed it returns the module and not the default
        value.
        r   rZ   r\   r†   N)r]   r[   rˆ   rV   r   r‰   )r   r[   r‡   s      r   Ú!test_requireModuleRequestedImportz.LookupsTests.test_requireModuleRequestedImport[  sV   € ð
 	*Ð)Ð)Ð)Ð)Ð)å‘(”(ˆà�ŠÝÔ!Ð"9À7ÐKÑKÔKØñ	
ô 	
ð 	
ð 	
ð 	
r   N)r   r   r   r   rX   r`   rg   ri   rk   rm   ro   ru   rx   r‚   r‹   rŽ   r�   r   r   r   rS   rS   ¶   sñ   € € € € € ðð ðVð Vð VðLð Lð LðJð Jð JðIð Ið IðTð Tð Tð
ð 
ð 
ð	
ð 	
ð 	
ð
ð 
ð 
ð*
ð 
ð 
ð*#ð #ð #ðJ
+ð 
+ð 
+ð"ð "ð "ð
ð 
ð 
ð 
ð 
r   rS   c                   ó.   — e Zd ZdZdZdefd„Zdefd„ZdS )Ú	BreakableFÚreturnc                 ó2   — | j         rt          d¦  «        ‚dS )Nzstr!z<Breakable>)ÚbreakStrÚRuntimeErrorr   s    r   Ú__str__zBreakable.__str__n  s   € ØŒ=ð 	!Ý˜vÑ&Ô&Ð&à �=r   c                 ó2   — | j         rt          d¦  «        ‚dS )Nzrepr!zBreakable())Ú	breakReprr–   r   s    r   Ú__repr__zBreakable.__repr__t  s   € ØŒ>ð 	!Ý˜wÑ'Ô'Ð'à �=r   N)r   r   r   r™   r•   r}   r—   rš   r   r   r   r’   r’   j  sT   € € € € € Ø€IØ€Hð!˜ð !ð !ð !ð !ð!˜#ð !ð !ð !ð !ð !ð !r   r’   c                   ó(   — e Zd ZdZed„ ¦   «         Z dS )Ú
BrokenTypeFc                 ó2   — | j         rt          d¦  «        ‚dS )Nzno namerœ   )Ú	breakNamer–   r   s    r   r   zBrokenType.__name__~  s   € àŒ>ð 	*Ý˜yÑ)Ô)Ð)Øˆ|r   N)r   r   r   rž   Úpropertyr   r   r   rœ   rœ   {  s2   € € € € € Ø€Iàðð ñ „Xðð ð r   rœ   ÚBTBaseT)r™   r•   c                   ó&   — e Zd Z ed„ ¦  «        ZdS )ÚNoClassAttrc                 ó   — | j         S rG   )Ú	not_class)r&   s    r   ú<lambda>zNoClassAttr.<lambda>‰  s   €  1¤;€ r   N)r   r   r   rŸ   Ú	__class__r   r   r   r¢   r¢   ˆ  s!   € € € € € Ø�Ð.Ð.Ñ/Ô/€I€I€Ir   r¢   c                   óB   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
S )ÚSafeReprTestsz2
    Tests for L{reflect.safe_repr} function.
    c           	      óÈ   — g d¢df}|                       t          t          t          j        |¦  «        ¦  «        t          t          t
          |¦  «        ¦  «        ¦  «         dS )zg
        L{reflect.safe_repr} produces the same output as C{repr} on a working
        object.
        ©rL   é   é   ó   aN)r$   ÚlistÚmapr   Ú	safe_reprÚrepr)r   Úxss     r   Útest_workingReprzSafeReprTests.test_workingRepr‘  sS   € ð
 ˆiˆi˜ÐˆØ×Ò��c¥'Ô"3°RÑ8Ô8Ñ9Ô9½4ÅÅDÈ"ÁÄÑ;NÔ;NÑOÔOÐOÐOÐOr   c                 ó,  — t          ¦   «         }d|_        t          j        |¦  «        }|                      d|¦  «         |                      t
          j                             t          ¦  «        d         |¦  «         |                      d|¦  «         dS )z‚
        L{reflect.safe_repr} returns a string with class name, address, and
        traceback when the repr call failed.
        TzBreakable instance at 0xr   úRuntimeError: repr!N)	r’   r™   r   r°   ÚassertInÚosÚpathÚsplitextÚ__file__©r   ÚbÚbReprs      r   Útest_brokenReprzSafeReprTests.test_brokenRepr™  s   € õ
 ‰KŒKˆØˆŒÝÔ! !Ñ$Ô$ˆØ�ŠÐ0°%Ñ8Ô8Ð8ð 	�Š•b”g×&Ò&¥xÑ0Ô0°Ô3°UÑ;Ô;Ð;Ø�ŠÐ+¨UÑ3Ô3Ð3Ð3Ð3r   c                 óš   — t          ¦   «         }d|_        |                      t          j        |¦  «        t          |¦  «        ¦  «         dS )zT
        L{reflect.safe_repr} isn't affected by a broken C{__str__} method.
        TN)r’   r•   r$   r   r°   r±   ©r   r¼   s     r   Útest_brokenStrzSafeReprTests.test_brokenStr§  sA   € õ ‰KŒKˆØˆŒ
Ø×Ò�Ô*¨1Ñ-Ô-­t°A©w¬wÑ7Ô7Ð7Ð7Ð7r   c                 óŒ   —  G d„ dt           ¦  «        }t          j        |¦  «         t          j         |¦   «         ¦  «         d S )Nc                   ó   — e Zd ZdZdS )ú-SafeReprTests.test_brokenClassRepr.<locals>.XTN©r   r   r   r™   r   r   r   ÚXrÄ   °  ó   € € € € € ØˆIˆIˆIr   rÆ   ©r    r   r°   ©r   rÆ   s     r   Útest_brokenClassReprz"SafeReprTests.test_brokenClassRepr¯  s\   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ 	Ô˜!ÑÔÐÝÔ˜!˜!™#œ#ÑÔÐÐÐr   c                 óÚ   —  G d„ dt           ¦  «        }t          j        |¦  «        }dt          |¦  «        d›d�}|                      ||                     d¦  «        d         ¦  «         dS )	zË
        C{id} is used to print the ID of the object in case of an error.

        L{safe_repr} includes a traceback after a newline, so we only check
        against the first line of the repr.
        c                   ó   — e Zd ZdZdS )ú2SafeReprTests.test_brokenReprIncludesID.<locals>.XTNrÅ   r   r   r   rÆ   rÍ   ¾  rÇ   r   rÆ   z<BrokenType instance at 0xr&   z with repr error:ú
r   N)r    r   r°   Úidr$   Úsplit)r   rÆ   ÚxReprÚxReprExpecteds       r   Útest_brokenReprIncludesIDz'SafeReprTests.test_brokenReprIncludesID¶  s„   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ Ô! !Ñ$Ô$ˆØOµR¸±U´UÐOÐOÐOÐOˆØ×Ò˜¨¯ª°DÑ(9Ô(9¸!Ô(<Ñ=Ô=Ð=Ð=Ð=r   c                 óŒ   —  G d„ dt           ¦  «        }t          j        |¦  «         t          j         |¦   «         ¦  «         d S )Nc                   ó   — e Zd ZdZdS )ú,SafeReprTests.test_brokenClassStr.<locals>.XTN©r   r   r   r•   r   r   r   rÆ   rÖ   Æ  ó   € € € € € ØˆHˆHˆHr   rÆ   rÈ   rÉ   s     r   Útest_brokenClassStrz!SafeReprTests.test_brokenClassStrÅ  s\   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ 	Ô˜!ÑÔÐÝÔ˜!˜!™#œ#ÑÔÐÐÐr   c                 ó,  — t          ¦   «         }d|_        t          j        |¦  «        }|                      d|¦  «         |                      t
          j                             t          ¦  «        d         |¦  «         |                      d|¦  «         dS )z­
        If an object raises an exception when accessing its C{__class__}
        attribute, L{reflect.safe_repr} uses C{type} to retrieve the class
        object.
        TúNoClassAttr instance at 0xr   rµ   N)	r¢   r™   r   r°   r¶   r·   r¸   r¹   rº   r»   s      r   Útest_brokenClassAttributez'SafeReprTests.test_brokenClassAttributeÌ  s}   € õ ‰MŒMˆØˆŒÝÔ! !Ñ$Ô$ˆØ�ŠÐ2°EÑ:Ô:Ð:Ø�Š•b”g×&Ò&¥xÑ0Ô0°Ô3°UÑ;Ô;Ð;Ø�ŠÐ+¨UÑ3Ô3Ð3Ð3Ð3r   c                 ó8  —  G d„ dt           ¦  «        }t          j         |¦   «         ¦  «        }|                      d|¦  «         |                      t          j                             t          ¦  «        d         |¦  «         |                      d|¦  «         dS )zã
        If a class raises an exception when accessing its C{__name__} attribute
        B{and} when calling its C{__str__} implementation, L{reflect.safe_repr}
        returns 'BROKEN CLASS' instead of the class name.
        c                   ó   — e Zd ZdZdS )ú6SafeReprTests.test_brokenClassNameAttribute.<locals>.XTN©r   r   r   rž   r   r   r   rÆ   rß   à  rÇ   r   rÆ   ú<BROKEN CLASS AT 0xr   rµ   N)r    r   r°   r¶   r·   r¸   r¹   rº   )r   rÆ   rÑ   s      r   Útest_brokenClassNameAttributez+SafeReprTests.test_brokenClassNameAttributeÙ  s�   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ Ô! ! !¡#¤#Ñ&Ô&ˆØ�ŠÐ+¨UÑ3Ô3Ð3Ø�Š•b”g×&Ò&¥xÑ0Ô0°Ô3°UÑ;Ô;Ð;Ø�ŠÐ+¨UÑ3Ô3Ð3Ð3Ð3r   N)r   r   r   r   r³   r¾   rÁ   rÊ   rÓ   rÙ   rÜ   râ   r   r   r   r¨   r¨   Œ  s™   € € € € € ðð ðPð Pð Pð4ð 4ð 4ð8ð 8ð 8ðð ð ð>ð >ð >ðð ð ð4ð 4ð 4ð4ð 4ð 4ð 4ð 4r   r¨   c                   óN   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ ZdS )ÚSafeStrTestsz1
    Tests for L{reflect.safe_str} function.
    c                 óx   — g d¢}|                       t          j        |¦  «        t          |¦  «        ¦  «         d S )Nrª   )r$   r   Úsafe_strr}   ©r   r&   s     r   Útest_workingStrzSafeStrTests.test_workingStrî  s8   € ØˆIˆIˆØ×Ò�Ô)¨!Ñ,Ô,­c°!©f¬fÑ5Ô5Ð5Ð5Ð5r   c                 óX   — t          ¦   «         }d|_        t          j        |¦  «         d S ©NT)r’   r•   r   ræ   rÀ   s     r   rÁ   zSafeStrTests.test_brokenStrò  s)   € Ý‰KŒKˆØˆŒ
ÝÔ˜ÑÔÐÐÐr   c                 óZ   — d}|                       t          j        |¦  «        d¦  «         dS )zh
        L{safe_str} for C{str} with ascii-only data should return the
        value unchanged.
        ÚaN)r$   r   ræ   rç   s     r   Útest_workingAsciizSafeStrTests.test_workingAscii÷  s0   € ð
 ˆØ×Ò�Ô)¨!Ñ,Ô,¨cÑ2Ô2Ð2Ð2Ð2r   c                 ó€   — d}|                       t          j        |¦  «        |                     d¦  «        ¦  «         dS )zw
        L{safe_str} for C{bytes} with utf-8 encoded data should return
        the value decoded into C{str}.
        s   tÃ¼stúutf-8N)r$   r   ræ   Údecoderç   s     r   Útest_workingUtf8_3zSafeStrTests.test_workingUtf8_3ÿ  s<   € ð
 ˆØ×Ò�Ô)¨!Ñ,Ô,¨a¯hªh°wÑ.?Ô.?Ñ@Ô@Ð@Ð@Ð@r   c                 óx   — d}t          j        |¦  «        }|                      |t          |¦  «        ¦  «         dS )z=
        Use str() for non-utf8 bytes: "b'non-utf8'"
        ó   ÿN)r   ræ   r$   r}   )r   r&   ÚxStrs      r   Útest_brokenUtf8zSafeStrTests.test_brokenUtf8  s;   € ð ˆÝÔ Ñ"Ô"ˆØ×Ò˜�s 1™vœvÑ&Ô&Ð&Ð&Ð&r   c                 óX   — t          ¦   «         }d|_        t          j        |¦  «         d S rê   )r’   r™   r   ræ   rÀ   s     r   r¾   zSafeStrTests.test_brokenRepr  s)   € Ý‰KŒKˆØˆŒÝÔ˜ÑÔÐÐÐr   c                 óŒ   —  G d„ dt           ¦  «        }t          j        |¦  «         t          j         |¦   «         ¦  «         d S )Nc                   ó   — e Zd ZdZdS )ú+SafeStrTests.test_brokenClassStr.<locals>.XTNr×   r   r   r   rÆ   rù     rØ   r   rÆ   ©r    r   ræ   rÉ   s     r   rÙ   z SafeStrTests.test_brokenClassStr  s\   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ 	Ô˜ÑÔÐÝÔ˜˜™œÑÔÐÐÐr   c                 óŒ   —  G d„ dt           ¦  «        }t          j        |¦  «         t          j         |¦   «         ¦  «         d S )Nc                   ó   — e Zd ZdZdS )ú,SafeStrTests.test_brokenClassRepr.<locals>.XTNrÅ   r   r   r   rÆ   rý     rÇ   r   rÆ   rú   rÉ   s     r   rÊ   z!SafeStrTests.test_brokenClassRepr  s\   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ 	Ô˜ÑÔÐÝÔ˜˜™œÑÔÐÐÐr   c                 ó,  — t          ¦   «         }d|_        t          j        |¦  «        }|                      d|¦  «         |                      t
          j                             t          ¦  «        d         |¦  «         |                      d|¦  «         dS )z¬
        If an object raises an exception when accessing its C{__class__}
        attribute, L{reflect.safe_str} uses C{type} to retrieve the class
        object.
        TrÛ   r   úRuntimeError: str!N)	r¢   r•   r   ræ   r¶   r·   r¸   r¹   rº   )r   r¼   ÚbStrs      r   rÜ   z&SafeStrTests.test_brokenClassAttribute"  s}   € õ ‰MŒMˆØˆŒ
ÝÔ Ñ"Ô"ˆØ�ŠÐ2°DÑ9Ô9Ð9Ø�Š•b”g×&Ò&¥xÑ0Ô0°Ô3°TÑ:Ô:Ð:Ø�ŠÐ*¨DÑ1Ô1Ð1Ð1Ð1r   c                 ó8  —  G d„ dt           ¦  «        }t          j         |¦   «         ¦  «        }|                      d|¦  «         |                      t          j                             t          ¦  «        d         |¦  «         |                      d|¦  «         dS )zâ
        If a class raises an exception when accessing its C{__name__} attribute
        B{and} when calling its C{__str__} implementation, L{reflect.safe_str}
        returns 'BROKEN CLASS' instead of the class name.
        c                   ó   — e Zd ZdZdS )ú5SafeStrTests.test_brokenClassNameAttribute.<locals>.XTNrà   r   r   r   rÆ   r  6  rÇ   r   rÆ   rá   r   rÿ   N)r    r   ræ   r¶   r·   r¸   r¹   rº   )r   rÆ   rô   s      r   râ   z*SafeStrTests.test_brokenClassNameAttribute/  s�   € ð	ð 	ð 	ð 	ð 	•ñ 	ô 	ð 	õ Ô  ¡¤Ñ$Ô$ˆØ�ŠÐ+¨TÑ2Ô2Ð2Ø�Š•b”g×&Ò&¥xÑ0Ô0°Ô3°TÑ:Ô:Ð:Ø�ŠÐ*¨DÑ1Ô1Ð1Ð1Ð1r   N)r   r   r   r   rè   rÁ   rí   rñ   rõ   r¾   rÙ   rÊ   rÜ   râ   r   r   r   rä   rä   é  s·   € € € € € ðð ð6ð 6ð 6ðð ð ð
3ð 3ð 3ðAð Að Að'ð 'ð 'ðð ð ð
ð ð ðð ð ð2ð 2ð 2ð2ð 2ð 2ð 2ð 2r   rä   c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚFilenameToModuleTestsz1
    Test L{filenameToModuleName} detection.
    c                 ód  — t           j                             |                      ¦   «         dd¦  «        | _        t          j        | j        ¦  «         t          t           j                             | j        d¦  «        d¦  «        5 }|                     d¦  «         d d d ¦  «         n# 1 swxY w Y   t          t           j                             t           j                             | j        ¦  «        d¦  «        d¦  «        5 }|                     d¦  «         d d d ¦  «         d S # 1 swxY w Y   d S )NÚfakepackageÚtestz__init__.pyÚwr{   )r·   r¸   ÚjoinÚmktempÚmakedirsÚopenÚwriteÚdirname)r   Úfs     r   ÚsetUpzFilenameToModuleTests.setUpD  sY  € Ý”G—L’L §¢¡¤°¸vÑFÔFˆŒ	Ý
Œ�D”IÑÔÐÝ•"”'—,’,˜tœy¨-Ñ8Ô8¸#Ñ>Ô>ð 	À!Ø�GŠG�B‰KŒKˆKð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	å•"”'—,’,�rœwŸš¨t¬yÑ9Ô9¸=ÑIÔIÈ3ÑOÔOð 	ÐSTØ�GŠG�B‰KŒKˆKð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s$   ÂB'Â'B+Â.B+ÄD%Ä%D)Ä,D)c                 óæ   — t          j        | j        ¦  «        }|                      |d¦  «         t          j        | j        t          j        j        z   ¦  «        }|                      |d¦  «         dS )zk
        L{filenameToModuleName} returns the correct module (a package) given a
        directory.
        zfakepackage.testN)r   ÚfilenameToModuleNamer¸   r$   r·   Úsep©r   Úmodules     r   Útest_directoryz$FilenameToModuleTests.test_directoryL  se   € õ
 Ô-¨d¬iÑ8Ô8ˆØ×Ò˜Ð!3Ñ4Ô4Ð4ÝÔ-¨d¬i½"¼'¼+Ñ.EÑFÔFˆØ×Ò˜Ð!3Ñ4Ô4Ð4Ð4Ð4r   c                 ó    — t          j        t          j                             | j        d¦  «        ¦  «        }|                      |d¦  «         dS )zh
        L{filenameToModuleName} returns the correct module given the path to
        its file.
        ztest_reflect.pyúfakepackage.test.test_reflectN)r   r  r·   r¸   r
  r$   r  s     r   Ú	test_filezFilenameToModuleTests.test_fileV  sK   € õ
 Ô-ÝŒG�LŠL˜œÐ$5Ñ6Ô6ñ
ô 
ˆð 	×Ò˜Ð!@ÑAÔAÐAÐAÐAr   c                 óÆ   — t          j        t          j                             | j                             d¦  «        d¦  «        ¦  «        }|                      |d¦  «         dS )zo
        L{filenameToModuleName} returns the correct module given a C{bytes}
        path to its file.
        rï   s   test_reflect.pyr  N)r   r  r·   r¸   r
  Úencoder$   r  s     r   Ú
test_bytesz FilenameToModuleTests.test_bytes`  sY   € õ
 Ô-ÝŒG�LŠL˜œ×)Ò)¨'Ñ2Ô2Ð4FÑGÔGñ
ô 
ˆð 	×Ò˜Ð!@ÑAÔAÐAÐAÐAr   N)r   r   r   r   r  r  r  r  r   r   r   r  r  ?  sb   € € € € € ðð ðð ð ð5ð 5ð 5ðBð Bð Bð	Bð 	Bð 	Bð 	Bð 	Br   r  c                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	S )
ÚFullyQualifiedNameTestsz)
    Test for L{fullyQualifiedName}.
    c                 óL   — |                       t          |¦  «        |¦  «         dS )ze
        Helper to check that fully qualified name of C{obj} results to
        C{expected}.
        N)r$   r   )r   ÚobjÚexpecteds      r   Ú_checkFullyQualifiedNamez0FullyQualifiedNameTests._checkFullyQualifiedNameq  s)   € ð
 	×ÒÕ+¨CÑ0Ô0°(Ñ;Ô;Ð;Ð;Ð;r   c                 óx   — ddl }|                      |d¦  «         ddl}|                      |j        d¦  «         dS )zd
        L{fullyQualifiedName} returns the full name of a package and a
        subpackage.
        r   Nrf   rb   )rf   r#  r]   rd   re   s     r   Útest_packagez$FullyQualifiedNameTests.test_packagex  sN   € ð
 	ˆˆˆà×%Ò% g¨yÑ9Ô9Ð9ØÐÐÐà×%Ò% g¤nÐ6FÑGÔGÐGÐGÐGr   c                 óN   — ddl }|                      |j        j        d¦  «         dS )zV
        L{fullyQualifiedName} returns the name of a module inside a package.
        r   Nztwisted.python.compat)Útwisted.python.compatr#  rd   Úcompatre   s     r   Útest_modulez#FullyQualifiedNameTests.test_module„  s2   € ð 	%Ð$Ð$Ð$à×%Ò% g¤nÔ&;Ð=TÑUÔUÐUÐUÐUr   c                 óL   — |                       t          t          › d�¦  «         dS )zS
        L{fullyQualifiedName} returns the name of a class and its module.
        z.FullyQualifiedNameTestsN)r#  r  r   r   s    r   Ú
test_classz"FullyQualifiedNameTests.test_classŒ  s4   € ð 	×%Ò%Ý#­Ð%JÐ%JÐ%Jñ	
ô 	
ð 	
ð 	
ð 	
r   c                 ó<   — |                       t          d¦  «         dS )zY
        L{fullyQualifiedName} returns the name of a function inside its module.
        z)twisted.python.reflect.fullyQualifiedNameN)r#  r   r   s    r   Útest_functionz%FullyQualifiedNameTests.test_function”  s,   € ð 	×%Ò%ÝÐ Kñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óf   — |                       | j        t          › d| j        j        › d�¦  «         dS )zs
        L{fullyQualifiedName} returns the name of a bound method inside its
        class and its module.
        ú.z.test_boundMethodN)r#  Útest_boundMethodr   r¦   r   s    r   r0  z(FullyQualifiedNameTests.test_boundMethodœ  sE   € ð
 	×%Ò%ØÔ!ÝÐDÐD˜$œ.Ô1ÐDÐDÐDñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óp   — |                       | j        j        t          › d| j        j        › d�¦  «         dS )zv
        L{fullyQualifiedName} returns the name of an unbound method inside its
        class and its module.
        r/  z.test_unboundMethodN)r#  r¦   Útest_unboundMethodr   r   s    r   r2  z*FullyQualifiedNameTests.test_unboundMethod¦  sG   € ð
 	×%Ò%ØŒNÔ-ÝÐFÐF˜$œ.Ô1ÐFÐFÐFñ	
ô 	
ð 	
ð 	
ð 	
r   N)r   r   r   r   r#  r%  r)  r+  r-  r0  r2  r   r   r   r  r  l  s�   € € € € € ðð ð<ð <ð <ð
Hð 
Hð 
HðVð Vð Vð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð
ð 
ð 
ð 
ð 
r   r  c                   óD   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
S )ÚObjectGrepTestsc                 ó  — t          ¦   «         }d|i}|di}|                      dt          j        ||t          j        ¦  «        ¦  «         |                      dt          j        ||t          j        ¦  «        ¦  «         dS )zV
        Test references search through a dictionary, as a key or as a value.
        Nz[None]z{None}©rˆ   r¶   r   ÚobjgrepÚisSame)r   ÚoÚd1Úd2s       r   Útest_dictionaryzObjectGrepTests.test_dictionary²  sm   € õ ‰HŒHˆØ�AˆYˆØ�ˆYˆà�Š�h¥¤°°Aµw´~Ñ FÔ FÑGÔGÐGØ�Š�h¥¤°°Aµw´~Ñ FÔ FÑGÔGÐGÐGÐGr   c                 ó’   — t          ¦   «         }d|g}|                      dt          j        ||t          j        ¦  «        ¦  «         dS )z8
        Test references search through a list.
        Nú[1]r6  )r   r9  ÚLs      r   Ú	test_listzObjectGrepTests.test_list½  s@   € õ ‰HŒHˆØ�1ˆIˆà�Š�e�Wœ_¨Q°µ7´>ÑBÔBÑCÔCÐCÐCÐCr   c                 ó’   — t          ¦   «         }|df}|                      dt          j        ||t          j        ¦  «        ¦  «         dS )z9
        Test references search through a tuple.
        Nú[0]r6  )r   r9  ÚTs      r   Ú
test_tuplezObjectGrepTests.test_tupleÆ  s@   € õ ‰HŒHˆØ�ˆIˆà�Š�e�Wœ_¨Q°µ7´>ÑBÔBÑCÔCÐCÐCÐCr   c                 óÆ   —  G d„ d¦  «        }t          ¦   «         } |¦   «         }||_        |                      dt          j        ||t          j        ¦  «        ¦  «         dS )zE
        Test references search through an object attribute.
        c                   ó   — e Zd ZdS )ú,ObjectGrepTests.test_instance.<locals>.DummyNr:   r   r   r   ÚDummyrG  Ô  r<   r   rH  z.oN)rˆ   r9  r¶   r   r7  r8  )r   rH  r9  Úds       r   Útest_instancezObjectGrepTests.test_instanceÏ  sq   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	õ ‰HŒHˆØˆE‰GŒGˆØˆŒà�Š�d�GœO¨A¨qµ'´.ÑAÔAÑBÔBÐBÐBÐBr   c                 óÄ   —  G d„ d¦  «        } |¦   «         }t          j        |¦  «        }|                      dt          j        ||t          j        ¦  «        ¦  «         dS )zB
        Test references search through a weakref object.
        c                   ó   — e Zd ZdS )ú+ObjectGrepTests.test_weakref.<locals>.DummyNr:   r   r   r   rH  rM  â  r<   r   rH  z()N)ÚweakrefÚrefr¶   r   r7  r8  )r   rH  r9  Úw1s       r   Útest_weakrefzObjectGrepTests.test_weakrefÝ  sn   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð ˆE‰GŒGˆÝŒ[˜‰^Œ^ˆà�Š�d�GœO¨B°µ7´>ÑBÔBÑCÔCÐCÐCÐCr   c                 ó¢  —  G d„ d¦  «        } |¦   «         }|j         }|                      dt          j        ||j        t          j        ¦  «        ¦  «         |                      dt          j        ||j        j        t          j        ¦  «        ¦  «         |                      dt          j        ||j        t          j        ¦  «        ¦  «         dS )zK
        Test references search through method special attributes.
        c                   ó   — e Zd Zd„ ZdS )ú/ObjectGrepTests.test_boundMethod.<locals>.Dummyc                 ó   — d S rG   r   r   s    r   Údummyz5ObjectGrepTests.test_boundMethod.<locals>.Dummy.dummyð  rI   r   N)r   r   r   rV  r   r   r   rH  rT  ï  rJ   r   rH  z	.__self__z.__self__.__class__z	.__func__N)rV  r¶   r   r7  Ú__self__r8  r¦   Ú__func__)r   rH  r9  Úms       r   r0  z ObjectGrepTests.test_boundMethodê  sÃ   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð ˆE‰GŒGˆØŒGˆà�Š�k¥7¤?°1°a´jÅ'Ä.Ñ#QÔ#QÑRÔRÐRØ�ŠØ!ÝŒO˜A˜qœzÔ3µW´^ÑDÔDñ	
ô 	
ð 	
ð 	�Š�k¥7¤?°1°a´jÅ'Ä.Ñ#QÔ#QÑRÔRÐRÐRÐRr   c                 ó6  —  G d„ d¦  «        } |¦   «         }dddd|di}dd|dg}|i  |¦   «         f}d	d
|dœ} |¦   «         }||_         |j        }t          j        |¦  «        }	|                      dt          j        |	|t
          j        ¦  «        ¦  «         dS )zF
        Test references search using complex set of objects.
        c                   ó   — e Zd Zd„ ZdS )ú.ObjectGrepTests.test_everything.<locals>.Dummyc                 ó   — d S rG   r   r   s    r   r   z5ObjectGrepTests.test_everything.<locals>.Dummy.method  rI   r   N)r   r   r   r   r   r   r   rH  r\    rJ   r   rH  r   ÚbazNÚQuuxÚFooshr¬   ÚfooÚbar)r   rL   r«   z"().__self__.attr[2][0][2]{'Foosh'})Úattrr   rN  rO  r¶   r   r7  r8  )
r   rH  r9  ÚD1r?  rC  ÚD2ÚirY  r	  s
             r   Útest_everythingzObjectGrepTests.test_everythingý  sÓ   € ð
	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð ˆE‰GŒGˆØ�%˜˜v q¨'Ð2ˆØ�2�r˜1ÐˆØ��E�E‘G”GÐˆØ˜5 QÐ'Ð'ˆØˆE‰GŒGˆØˆŒØŒHˆÝŒK˜‰NŒNˆà�ŠØ0µ'´/À!ÀQÍÌÑ2WÔ2Wñ	
ô 	
ð 	
ð 	
ð 	
r   c           	      ón  — g }|g}||g}||g}|                       dgt          j        ||t          j        d¬¦  «        ¦  «         |                       ddgt          j        ||t          j        d¬¦  «        ¦  «         |                       g d¢t          j        ||t          j        d¬¦  «        ¦  «         dS )	z6
        Test the depth of references search.
        rB  rL   )ÚmaxDepthú[1][0]r«   )rB  rj  z	[1][1][0]r¬   N)r$   r   r7  r8  )r   rì   r¼   ÚcrI  s        r   Útest_depthLimitzObjectGrepTests.test_depthLimit  sÌ   € ð ˆØˆCˆØ�ˆFˆØ�ˆFˆà×Ò˜%˜¥'¤/°!°Q½¼ÐQRÐ"SÑ"SÔ"SÑTÔTÐTØ×ÒØ�HÐ�wœ¨q°!µW´^ÈaÐPÑPÔPñ	
ô 	
ð 	
ð 	×ÒØ*Ð*Ð*ÝŒO˜A˜q¥'¤.¸1Ð=Ñ=Ô=ñ	
ô 	
ð 	
ð 	
ð 	
r   c                 óú   — t          ¦   «         }t          ¦   «         }|                     d¦  «         |                     |¦  «         |                      dt	          j        ||t          j        ¦  «        ¦  «         dS )z@
        Test references search through a deque object.
        Nr>  )rˆ   r   Úappendr¶   r   r7  r8  )r   r9  ÚDs      r   Ú
test_dequezObjectGrepTests.test_deque&  s^   € õ ‰HŒHˆÝ‰GŒGˆØ	�Š�‰ŒˆØ	�Š�‰Œˆà�Š�e�Wœ_¨Q°µ7´>ÑBÔBÑCÔCÐCÐCÐCr   N)r   r   r   r<  r@  rD  rJ  rQ  r0  rg  rl  rp  r   r   r   r4  r4  ±  s²   € € € € € ð	Hð 	Hð 	HðDð Dð DðDð Dð DðCð Cð CðDð Dð DðSð Sð Sð&
ð 
ð 
ð.
ð 
ð 
ð$	Dð 	Dð 	Dð 	Dð 	Dr   r4  c                   ó   — e Zd Zd„ ZdS )ÚGetClassTestsc                 óè   —  G d„ d¦  «        } |¦   «         }|                       t          j        |¦  «        j        d¦  «         |                       t          j        |¦  «        j        d¦  «         d S )Nc                   ó   — e Zd ZdS )ú(GetClassTests.test_new.<locals>.NewClassNr:   r   r   r   ÚNewClassru  4  r<   r   rv  Útype)r$   r   ÚgetClassr   )r   rv  Únews      r   Útest_newzGetClassTests.test_new3  s…   € ð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ð ˆh‰jŒjˆØ×Ò�Ô)¨(Ñ3Ô3Ô<¸fÑEÔEÐEØ×Ò�Ô)¨#Ñ.Ô.Ô7¸ÑDÔDÐDÐDÐDr   N)r   r   r   rz  r   r   r   rr  rr  2  s(   € € € € € ðEð Eð Eð Eð Er   rr  )$r   r·   rN  Úcollectionsr   r]   r   Útwisted.python.reflectr   r   r   r   r	   Útwisted.trial.unittestr
   ÚTestCaser   r   r   r"   r/   r4   r?   rO   rS   r’   rw  rœ   r    r¢   r¨   rä   r  r  r4  rr  r   r   r   ú<module>r     s
  ððð ð
 
€	€	€	Ø €€€Ø Ð Ð Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "ðð ð ð ð ð ð ð ð ð ð ð ð ð ð CÐ BÐ BÐ BÐ BÐ Bð	ð 	ð 	ð 	ð 	ñ 	ô 	ð 	ðð ð ð ð ˆ$ñ ô ð ðð ð ð ð ñ ô ð ð &<ð &<ð &<ð &<ð &<˜Xñ &<ô &<ð &<ðR2ð 2ð 2ð 2ð 2˜8ñ 2ô 2ð 2ð2Jð Jð Jð Jð J˜xñ Jô Jð Jð03ð 3ð 3ð 3ð 3 ñ 3ô 3ð 3ð.ð ð ð ð ñ ô ð ðq
ð q
ð q
ð q
ð q
�8ñ q
ô q
ð q
ðh!ð !ð !ð !ð !ñ !ô !ð !ð"ð ð ð ð �˜Dñ ô ð ð 
ˆ�H˜y˜l¸$ÈDÐ,QÐ,QÑ	RÔ	R€ð0ð 0ð 0ð 0ð 0�)ñ 0ô 0ð 0ðZ4ð Z4ð Z4ð Z4ð Z4�Hñ Z4ô Z4ð Z4ðzS2ð S2ð S2ð S2ð S2�8ñ S2ô S2ð S2ðl*Bð *Bð *Bð *Bð *B˜Hñ *Bô *Bð *BðZB
ð B
ð B
ð B
ð B
˜hñ B
ô B
ð B
ðJ~Dð ~Dð ~Dð ~Dð ~D�hñ ~Dô ~Dð ~DðBEð Eð Eð Eð E�Hñ Eô Eð Eð Eð Er   