
\K]c           @  s   d  d l  m Z d  d l Z d  d l j Z d  d l m Z d  d l m	 Z	 d   Z
 d e j f d     YZ e j   e d k r e j   n  d S(	   i(   t   print_functionN(   t   compile_isolated(   t   typesc           s      f d   } | S(   Nc           sA   d   } t  | d   g d  } |  j | j d  d  d  S(   Nc         S  s
   |  } | S(   N(    (   t   xt   y(    (    s7   lib/python2.7/site-packages/numba/tests/test_numconv.pyt   cast
   s    t   argst   return_typei   (   R   t   assertAlmostEqualt   entry_point(   t   selfR   t   cres(   t   fromtyt   toty(    s7   lib/python2.7/site-packages/numba/tests/test_numconv.pyt   closure	   s    	(    (   R   R   R   (    (   R   R   s7   lib/python2.7/site-packages/numba/tests/test_numconv.pyt   template   s    t   TestNumberConversionc           B  s   e  Z d  Z e d    Z RS(   s   
    Test all int/float numeric conversion to ensure we have all the external
    dependencies to perform these conversions.
    c         C  sk   t  j t  j B} xT t j | d d D]= \ } } d j d | d |  } t |  | t | |   q& Wd  S(   Nt   ri   s   test_{fromty}_to_{toty}R   R   (   R   t   integer_domaint   real_domaint	   itertoolst   permutationst   formatt   setattrR   (   t   clst   tysR   R   t	   test_name(    (    s7   lib/python2.7/site-packages/numba/tests/test_numconv.pyt   automatic_populate   s
    "	(   t   __name__t
   __module__t   __doc__t   classmethodR   (    (    (    s7   lib/python2.7/site-packages/numba/tests/test_numconv.pyR      s   t   __main__(   t
   __future__R    R   t   numba.unittest_supportt   unittest_supportt   unittestt   numba.compilerR   t   numbaR   R   t   TestCaseR   R   R   t   main(    (    (    s7   lib/python2.7/site-packages/numba/tests/test_numconv.pyt   <module>   s   	
