
    J/Ph6
                         d dl Z d dlZd dlmZmZ d dlmZmZ d dlZ G d de          Z G d de          Z	e
dk    r ej                     dS dS )	    N)jitnjit)TestCasealways_testc                   .    e Zd ZdZd Zed             ZdS )TestNumbaModulez@
    Test the APIs exposed by the top-level `numba` module.
    c                     |                      t          t          |          |           |                     |t          j                   d S N)
assertTruehasattrnumbaassertIn__all__)selfnames     T/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/tests/test_api.pycheck_memberzTestNumbaModule.check_member   s<    t,,d333dEM*****    c                 D   |                      d           |                      d           |                      d           |                      d           |                      d           |                      d           |                      d           t          j         d S )Nr   	vectorizeguvectorizer   
NumbaErrorTypingErrorint32)r   r   __version__)r   s    r   test_numba_modulez!TestNumbaModule.test_numba_module   s     	%   +&&&-(((&!!!,'''-((('"""r   N)__name__
__module____qualname____doc__r   r   r    r   r   r   r   
   sH         + + +   [  r   r   c                       e Zd ZdZd Zd ZdS )TestJitDecoratorz*
    Test the jit and njit decorators
    c                    |                      t                    5 }t          dd           d d d            n# 1 swxY w Y   |                     dt	          |j                             d } t          d          |          } |d           |                     t          |j                  d            t          d          |          } |d           |                     t          |j                  d           d S )	NT)nopythonforceobjz1Only one of 'nopython' or 'forceobj' can be True.c                     | S r
   r!   xs    r   py_funcz<TestJitDecorator.test_jit_nopython_forceobj.<locals>.py_func/       Hr   r%      r&   r   )	assertRaises
ValueErrorr   r   str	exceptionassertEquallennopython_signatures)r   cmr*   jit_funcs       r   test_jit_nopython_forceobjz+TestJitDecorator.test_jit_nopython_forceobj'   sJ   z** 	.b----	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	.?	
 	
 	

	 	 	 &3%%%g.. 	X9::A>>>%3%%%g..X9::A>>>>>s   9= =c                    t          j        d          5 }t          j        dt                     t	          d           d d d            n# 1 swxY w Y   |                     t          |          d           |                     dt          |d         j	                             t          j        d          5 }t          j        dt                     t	          d           d d d            n# 1 swxY w Y   |                     t          |          d           |                     d	t          |d         j	                             d
 } t	          d          |          } |d           |                     t          |j
                  d            t	          d          |          } |d           |                     t          |j
                  d           d S )NT)recordalwaysr.   r-   z'forceobj is set for njit and is ignoredr   r,   z'nopython is set for njit and is ignoredc                     | S r
   r!   r(   s    r   r*   z=TestJitDecorator.test_njit_nopython_forceobj.<locals>.py_funcM   r+   r   )warningscatch_warningssimplefilterRuntimeWarningr   r3   r4   r   r1   messager5   )r   wr*   r7   s       r   test_njit_nopython_forceobjz,TestJitDecorator.test_njit_nopython_forceobj<   sM   $D111 	 Q!(N;;;$	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	Q###5s1Q4<7H7H	
 	
 	
 $D111 	 Q!(N;;;$	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	Q###5s1Q4<7H7H	
 	
 	
	 	 	 '4&&&w//X9::A>>>&4&&&w//X9::A>>>>>s#   +AAA>+C55C9<C9N)r   r   r   r    r8   rC   r!   r   r   r#   r#   #   s<         ? ? ?*? ? ? ? ?r   r#   __main__)r=   r   r   r   numba.tests.supportr   r   unittestr   r#   r   mainr!   r   r   <module>rH      s              5 5 5 5 5 5 5 5     h   24? 4? 4? 4? 4?x 4? 4? 4?n zHMOOOOO r   