
    xKg                         d dl Z d dl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                          yy)	    N)jit)override_configc                       e Zd Zd Zd Zy)TestJITMethodc                     G d dt               } |d      }t        j                  j                  |j	                  d      t        j
                  g dt        j                               |j                  j                  j                         \  }|j                  d   }|j                  j                         \  }| j                  |j                  j                         y )Nc                   0    e Zd Zd Z ed      d        Zy)ETestJITMethod.test_bound_jit_method_with_loop_lift.<locals>.Somethingc                     || _         y Nx0selfr   s     ^/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/tests/test_jitmethod.py__init__zNTestJITMethod.test_bound_jit_method_with_loop_lift.<locals>.Something.__init__   	        Tforceobjc                     t        j                  dt         j                        }| j                  }t	        |j
                  d         D ]
  }||z  ||<    |S )N   )shapedtyper   )npemptyfloat32r   ranger   )r   xar   is        r   methodzLTestJITMethod.test_bound_jit_method_with_loop_lift.<locals>.Something.method   sJ    HH1BJJ7WWqwwqz*A6AaD + r   N__name__
__module____qualname__r   r   r!    r   r   	Somethingr	      s      $  r   r'      r   )   r)   r)   r)   r)   )r   r   )objectr   testingassert_array_equalr!   arrayr   	overloadsvalueslifted
assertTruefndescnative)r   r'   	somethingcresjitlooploopcress         r   $test_bound_jit_method_with_loop_liftz2TestJITMethod.test_bound_jit_method_with_loop_lift
   s    	 	 aL	


%%i&6&6q&9HH)<	> !!++224++a.&&--/
../r   c                 t     G d dt               } |d      }| j                  |j                  |      d       y )Nc                   0    e Zd Zd Z ed      d        Zy)8TestJITMethod.test_unbound_jit_method.<locals>.Somethingc                     || _         y r   r   r   s     r   r   zATestJITMethod.test_unbound_jit_method.<locals>.Something.__init__%   r   r   Tr   c                     | j                   S r   r   )r   s    r   r!   z?TestJITMethod.test_unbound_jit_method.<locals>.Something.method(   s    wwr   Nr"   r&   r   r   r'   r;   $   s      $  r   r'   r(   )r*   assertEqualr!   )r   r'   r4   s      r   test_unbound_jit_methodz%TestJITMethod.test_unbound_jit_method#   s4    	 	 aL	)))4a8r   N)r#   r$   r%   r8   r?   r&   r   r   r   r   	   s    02
9r   r   c                       e Zd Zd Zd Zy)TestDisabledJITc                     t        dd      5  d }t        |      }d d d        | j                         | j                  d |d             | j                  d |d             y # 1 sw Y   LxY w)NDISABLE_JITTc                     | S r   r&   r   s    r   r!   z7TestDisabledJIT.test_decorated_function.<locals>.method3       r   
   r   r   r>   r   r!   jitteds      r   test_decorated_functionz'TestDisabledJIT.test_decorated_function1   sb    ]D1[F 2
 	(VBZ(VBZ( 21s   A''A0c                     t        dd      5  d } t        d      |      }d d d        | j                         | j                  d |d             | j                  d |d             y # 1 sw Y   LxY w)NrC   Tc                     | S r   r&   rE   s    r   r!   zCTestDisabledJIT.test_decorated_function_with_kwargs.<locals>.method=   rF   r   )nopythonrG   rH   rI   s      r   #test_decorated_function_with_kwargsz3TestDisabledJIT.test_decorated_function_with_kwargs;   sj    ]D1'S$'/F 2
 	(VBZ(VBZ( 21s   A..A7N)r#   r$   r%   rK   rO   r&   r   r   rA   rA   0   s    ))r   rA   __main__)unittestnumpyr   numbar   numba.tests.supportr   TestCaser   rA   r#   mainr&   r   r   <module>rW      sP       /$9H%% $9N)h'' )* zHMMO r   