o
    i                     @   sx   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 de j
ZG dd	 d	e j
Zed
kr:e   dS dS )    N)njit)PythonFunctionDescriptordefault_mangler)run_frontendmangle_abi_tagc                   @      e Zd Zdd ZdS )
TestModulec                 C   sN   d}d}d}t ||d}t||d}t|| t|d }| |dd dS )	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.pyZ	mypackagez
def f(x):
    return x
)__file____name__execf   N)dictcompiler   r   assertEqual)selffilenamenamecodeZobjscompiledZ
compiled_f r   h/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/numba/tests/test_funcdesc.pytest_module_not_in_namespace   s   
z'TestModule.test_module_not_in_namespaceN)r   
__module____qualname__r   r   r   r   r   r	   
       r	   c                   @   r   )TestFuncDescMangledNamec              
   C   sh   dd }t |}i }d}d}t}d}d}d}	tj||||||||	d}
| dd	d
 |	D |
j dS )zQ
        This is a minimal test for the abi-tags support in the mangler.
        c                   S   s   d S )Nr   r   r   r   r   udt$   s   z;TestFuncDescMangledName.test_mangling_abi_tags.<locals>.udtNr   F)Z	ShrubberyZHerring)abi_tags c                 S   s   g | ]}t |qS r   r   ).0xr   r   r   
<listcomp>8   s    zBTestFuncDescMangledName.test_mangling_abi_tags.<locals>.<listcomp>)r   r   r   Zfrom_specialized_functionZassertInjoinZmangled_name)r   r   Zfunc_irtypemaprestypeZ	calltypesZmanglerinlineZnoaliasr   fdr   r   r   test_mangling_abi_tags    s    z.TestFuncDescMangledName.test_mangling_abi_tagsN)r   r   r   r)   r   r   r   r   r      r   r   __main__)ZunittestZnumbar   Znumba.core.funcdescr   r   Znumba.core.compilerr   Znumba.core.itanium_manglerr   ZTestCaser	   r   r   mainr   r   r   r   <module>   s   