
    xKg                         d dl Z d dlmZ d dlmZmZ d dlmZ d dlm	Z	  G d de j                        Z G d d	e j                        Zed
k(  r e j                          yy)    N)njit)PythonFunctionDescriptordefault_mangler)run_frontend)mangle_abi_tagc                       e Zd Zd Zy)
TestModulec                     d}d}d}t        ||      }t        ||d      }t        ||       t        |d         }| j	                   |d      d       y)	z Test of trying to run a compiled function
        where the module from which the function is being compiled
        doesn't exist in the namespace.
        ztest.py	mypackagez
def f(x):
    return x
)__file____name__execf   N)dictcompiler   r   assertEqual)selffilenamenamecodeobjscompiled
compiled_fs          ]/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/tests/test_funcdesc.pytest_module_not_in_namespacez'TestModule.test_module_not_in_namespace   s\    
 
 X5462Xt$s)_
A*    N)r   
__module____qualname__r    r   r   r	   r	   
   s    +r   r	   c                       e Zd Zd Zy)TestFuncDescMangledNamec           
         d }t        |      }i }d}d}t        }d}d}d}	t        j                  ||||||||	      }
| j	                  dj                  |	D cg c]  }t        |       c}      |
j                         yc c}w )zQ
        This is a minimal test for the abi-tags support in the mangler.
        c                       y )Nr    r    r   r   udtz;TestFuncDescMangledName.test_mangling_abi_tags.<locals>.udt$   s    r   Nr    F)	ShrubberyHerring)abi_tags )r   r   r   from_specialized_functionassertInjoinr   mangled_name)r   r%   func_irtypemaprestype	calltypesmanglerinlinenoaliasr(   fdxs               r   test_mangling_abi_tagsz.TestFuncDescMangledName.test_mangling_abi_tags    s    	 s#	!+%??Wgy'67
 	bgg(C(Q~a0(CDoo	'Cs   BN)r   r   r   r7   r    r   r   r"   r"      s    'r   r"   __main__)unittestnumbar   numba.core.funcdescr   r   numba.core.compilerr   numba.core.itanium_manglerr   TestCaser	   r"   r   mainr    r   r   <module>r@      sR      I , 5+"" +*'h// ': zHMMO r   