
    h                     b    S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJr   " S S\5      rg)	    )
ModuleNode)ModuleScope)TransformTest)MethodDispatcherTransform)NormalizeTreeAnalyseDeclarationsTransformAnalyseExpressionsTransformInterpretCompilerDirectivesc                   *    \ rS rSrSrS rS rS rSrg)TestMethodDispatcherTransform
   Nc                     U R                   cH  S nS nU[        U5      [        U0 5      [        U5      [	        U5      /nU R                  US5      U l         U R                   $ )Nc           	      L    [        SS S 5      n[        U R                  S U US0 S9$ )Ntest)docbodyscopefull_module_namedirective_comments)r   r   pos)noder   s     [/var/www/fran/franai/venv/lib/python3.13/site-packages/Cython/Compiler/Tests/TestVisitor.pyfake_module>TestMethodDispatcherTransform._build_tree.<locals>.fake_module   s/    #FD$7!$((4(-57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_tree)TestMethodDispatcherTransform._build_tree   sk    ::G9 g&+GR8,W5+G4H **8 6 DJ zzr   c                    ^ S/m " U4S jS[         5      nU R                  5       nU" S 5      " U5        U R                  STS   5        g )Nr   c                   "   > \ rS rSrU 4S jrSrg)?TestMethodDispatcherTransform.test_builtin_method.<locals>.Test'   c                 "   > TS==   S-  ss'   U$ )Nr       r   r   funcargsunboundcallss        r   _handle_simple_method_dict_get^TestMethodDispatcherTransform.test_builtin_method.<locals>.Test._handle_simple_method_dict_get(   s    aAr   r)   N)__name__
__module____qualname____firstlineno__r/   __static_attributes__r.   s   r   Testr%   '   s     r   r7   r(   r   r!   assertEqualr   r7   treer.   s      @r   test_builtin_method1TestMethodDispatcherTransform.test_builtin_method%   sG    	, 	
 !T
4E!H%r   c                    ^ SSS.m " U4S jS[         5      nU R                  5       nU" S 5      " U5        U R                  STS   5        U R                  STS   5        g )Nr   )bytesobjectc                   .   > \ rS rSrU 4S jrU 4S jrSrg)=TestMethodDispatcherTransform.test_binop_method.<locals>.Test2   c                 "   > TS==   S-  ss'   U$ )Nr?   r(   r)   r*   s        r   #_handle_simple_method_bytes___mul__aTestMethodDispatcherTransform.test_binop_method.<locals>.Test._handle_simple_method_bytes___mul__3   s    g!#r   c                 "   > TS==   S-  ss'   U$ )Nr@   r(   r)   r*   s        r   $_handle_simple_method_object___mul__bTestMethodDispatcherTransform.test_binop_method.<locals>.Test._handle_simple_method_object___mul__6   s    h1$r   r)   N)r1   r2   r3   r4   rE   rH   r5   r6   s   r   r7   rB   2   s     r   r7   r(   r?   r@   r8   r:   s      @r   test_binop_method/TestMethodDispatcherTransform.test_binop_method0   s^    q)	, 	 !T
4E'N+E(O,r   )r   )	r1   r2   r3   r4   r   r!   r<   rJ   r5   r)   r   r   r   r   
   s    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>rQ      s'    1 . * => >
3-M 3-r   