o
    Z۷i                     @   sb   d dl Z d dlZd dlmZ d dlmZ dd ZG dd dejZe	  e
dkr/e  dS dS )	    N)njit)typesc                    s    fdd}|S )Nc                    s,   dd }t  |}| |dd d S )Nc                 S   s   | }|S )N )xyr   r   N/home/ubuntu/vllm_env/lib/python3.10/site-packages/numba/tests/test_numconv.pycast	   s   z'template.<locals>.closure.<locals>.cast   )r   assertAlmostEqual)selfr   cfuncfromtytotyr   r   closure   s   ztemplate.<locals>.closurer   )r   r   r   r   r   r   template   s   r   c                   @   s   e Zd ZdZedd ZdS )TestNumberConversionz
    Test all int/float numeric conversion to ensure we have all the external
    dependencies to perform these conversions.
    c                 C   sH   t jt jB }tj|ddD ]\}}dj||d}t| |t|| qd S )N   )rztest_{fromty}_to_{toty}r   )r   integer_domainreal_domain	itertoolspermutationsformatsetattrr   )clstysr   r   	test_namer   r   r   automatic_populate   s   z'TestNumberConversion.automatic_populateN)__name__
__module____qualname____doc__classmethodr   r   r   r   r   r      s    r   __main__)r   unittestnumbar   
numba.corer   r   TestCaser   r   r   mainr   r   r   r   <module>   s    