
    -Ph                     j    d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZmZ  G d de          ZdS )	    )
ModuleNode)ModuleScope)TransformTest)MethodDispatcherTransform)NormalizeTreeAnalyseDeclarationsTransformAnalyseExpressionsTransformInterpretCompilerDirectivesc                   $    e Zd ZdZd Zd Zd ZdS )TestMethodDispatcherTransformNc                     | j         \d }d }|t          |          t          |i           t          |          t	          |          g}|                     |d          | _         | j         S )Nc                 X    t          dd d           }t          | j        d | |di           S )Ntest)docbodyscopefull_module_namedirective_comments)r   r   pos)noder   s     a/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/Cython/Compiler/Tests/TestVisitor.pyfake_modulez>TestMethodDispatcherTransform._build_tree.<locals>.fake_module   s:    #FD$77!$(4(-579 9 9 9    z
                cdef bytes s = b'asdfg'
                cdef dict d = {1:2}
                x = s * 3
                d.get('test')
            )_treer   r
   r   r	   run_pipeline)selfcontextr   pipelines       r   _build_treez)TestMethodDispatcherTransform._build_tree   s    :G9 9 9 g&&+GR88,W55+G44H **8 6  DJ zr   c                     dg G fddt                     }|                                 }  |d           |           |                     dd                    d S )Nr   c                       e Zd Z fdZdS )?TestMethodDispatcherTransform.test_builtin_method.<locals>.Testc                 (    dxx         dz  cc<   |S )Nr       r   r   funcargsunboundcallss        r   _handle_simple_method_dict_getz^TestMethodDispatcherTransform.test_builtin_method.<locals>.Test._handle_simple_method_dict_get(   s    aAr   N)__name__
__module____qualname__r+   r*   s   r   Testr"   '   s.              r   r0   r$   r   r   assertEqualr   r0   treer*   s      @r   test_builtin_methodz1TestMethodDispatcherTransform.test_builtin_method%   s    	 	 	 	 	 	 	, 	 	 	
 !!T

4E!H%%%%%r   c                     ddd G fddt                     }|                                 }  |d           |           |                     dd                    |                     dd                    d S )Nr   )bytesobjectc                   $    e Zd Z fdZ fdZdS )=TestMethodDispatcherTransform.test_binop_method.<locals>.Testc                 (    dxx         dz  cc<   |S )Nr7   r$   r%   r&   s        r   #_handle_simple_method_bytes___mul__zaTestMethodDispatcherTransform.test_binop_method.<locals>.Test._handle_simple_method_bytes___mul__3   s    g!#r   c                 (    dxx         dz  cc<   |S )Nr8   r$   r%   r&   s        r   $_handle_simple_method_object___mul__zbTestMethodDispatcherTransform.test_binop_method.<locals>.Test._handle_simple_method_object___mul__6   s    h1$r   N)r,   r-   r.   r<   r>   r/   s   r   r0   r:   2   sG                  r   r0   r$   r7   r8   r1   r3   s      @r   test_binop_methodz/TestMethodDispatcherTransform.test_binop_method0   s    q))	 	 	 	 	 	 	, 	 	 	 !!T

4E'N+++E(O,,,,,r   )r,   r-   r.   r   r   r5   r?   r%   r   r   r   r   
   sF        E  0	& 	& 	&- - - - -r   r   N)Cython.Compiler.ModuleNoder   Cython.Compiler.Symtabr   Cython.TestUtilsr   Cython.Compiler.Visitorr   #Cython.Compiler.ParseTreeTransformsr   r   r	   r
   r   r%   r   r   <module>rE      s    1 1 1 1 1 1 . . . . . . * * * * * * = = = = = => > > > > > > > > > > >
3- 3- 3- 3- 3-M 3- 3- 3- 3- 3-r   