a
    –§»a:  ã                   @   s:   d dl Z d dlmZ G dd„ de jƒZedkr6e  ¡  dS )é    N)Únjitc                   @   s   e Zd Zdd„ ZdS )Ú
TestModulec           	      C   s†   d}d}d}t ||d�}t||dƒ}t||ƒ t|d ƒ}|  t¡�}|dƒ W d  ƒ n1 sb0    Y  d	}|  |t|jƒ¡ 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Úfr   Nz2can't compile f: import of module mypackage failed)	ÚdictÚcompiler   r   ÚassertRaisesÚModuleNotFoundErrorZassertInÚstrÚ	exception)	ÚselfÚfilenameÚnameÚcodeÚobjsZcompiledZ
compiled_fZraisesÚmsg© r   úS/home/yuhw/wc/pochoir/venv/lib/python3.9/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      s   r   Ú__main__)ZunittestZnumbar   ZTestCaser   r   Úmainr   r   r   r   Ú<module>   s   