
    J/Ph                         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                     dS dS )    N)njit)PythonFunctionDescriptordefault_mangler)run_frontendmangle_abi_tagc                       e Zd Zd ZdS )
TestModulec                     d}d}d}t          ||          }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.py	mypackagez
def f(x):
    return x
)__file____name__execf   N)dictcompiler   r   assertEqual)selffilenamenamecodeobjscompiled
compiled_fs          Y/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/tests/test_funcdesc.pytest_module_not_in_namespacez'TestModule.test_module_not_in_namespace   s}    
 
 X5554622Xt$s)__
A*****    N)r   
__module____qualname__r    r   r   r
   r
   
   s#        + + + + +r   r
   c                       e Zd Zd ZdS )TestFuncDescMangledNamec           
          d }t          |          }i }d}d}t          }d}d}d}	t          j        ||||||||	          }
|                     d                    d |	D                       |
j                   dS )	zQ
        This is a minimal test for the abi-tags support in the mangler.
        c                      d S )Nr!   r!   r   r   udtz;TestFuncDescMangledName.test_mangling_abi_tags.<locals>.udt$   s    Dr   Nr!   F)	ShrubberyHerring)abi_tags c                 ,    g | ]}t          |          S r!   r   ).0xs     r   
<listcomp>zBTestFuncDescMangledName.test_mangling_abi_tags.<locals>.<listcomp>8   s     CCCQ~a00CCCr   )r   r   r   from_specialized_functionassertInjoinmangled_name)r   r&   func_irtypemaprestype	calltypesmanglerinlinenoaliasr)   fds              r   test_mangling_abi_tagsz.TestFuncDescMangledName.test_mangling_abi_tags    s    	 	 	 s##	!+%?Wgy'67
 
 
 	bggCC(CCCDDo	' 	' 	' 	' 	'r   N)r   r   r    r;   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>rD      s           I I I I I I I I , , , , , , 5 5 5 5 5 5+ + + + +" + + +*' ' ' ' 'h/ ' ' ': zHMOOOOO r   