
    xKg6
                         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                          yy)	    N)jitnjit)TestCasealways_testc                   &    e Zd ZdZd Zed        Zy)TestNumbaModulez@
    Test the APIs exposed by the top-level `numba` module.
    c                     | j                  t        t        |      |       | j                  |t        j                         y N)
assertTruehasattrnumbaassertIn__all__)selfnames     X/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/tests/test_api.pycheck_memberzTestNumbaModule.check_member   s)    t,d3dEMM*    c                    | j                  d       | j                  d       | j                  d       | j                  d       | j                  d       | j                  d       | j                  d       t        j                   y )Nr   	vectorizeguvectorizer   
NumbaErrorTypingErrorint32)r   r   __version__)r   s    r   test_numba_modulez!TestNumbaModule.test_numba_module   so     	% +&-(&!,'-('"r   N)__name__
__module____qualname____doc__r   r   r    r   r   r   r   
   s     +  r   r   c                       e Zd ZdZd Zd Zy)TestJitDecoratorz*
    Test the jit and njit decorators
    c                    | j                  t              5 }t        dd       d d d        | j                  dt	        j
                               d } t        d      |      } |d       | j                  t        |j                        d        t        d      |      } |d       | j                  t        |j                        d       y # 1 sw Y   xY w)	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'   s    z*b- +?	

	 &3%g. 	X99:A>%3%g.X99:A>% +*s   CCc                 X   t        j                  d      5 }t        j                  dt               t	        d       d d d        | j                  t              d       | j                  dt        |d   j                               t        j                  d      5 }t        j                  dt               t	        d       d d d        | j                  t        |      d       | j                  d	t        |d   j                               d
 } t	        d      |      } |d       | j                  t        |j                        d        t	        d      |      } |d       | j                  t        |j                        d       y # 1 sw Y   WxY w# 1 sw Y   xY w)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<   sE   $$D1Q!!(N;$ 2 	Q#5s1Q4<<7H	
 $$D1Q!!(N;$ 2 	Q#5s1Q4<<7H	
	 '4&w/X99:A>&4&w/X99:A>5 21 21s   'F'F F F)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      sG       5 h 24?x 4?n zHMMO r   