ó
\K]c           @  s—   d  d l  m Z d  d l Z d  d l m Z d d l m Z d  d l j Z	 d  d l
 m Z d „  Z d e f d	 „  ƒ  YZ e d
 k r“ e	 j ƒ  n  d S(   iÿÿÿÿ(   t   print_functionN(   t   compile_isolatedi   (   t   TestCase(   t   testingc         C  s   ~  |  S(   N(    (   t   x(    (    s3   lib/python2.7/site-packages/numba/tests/test_del.pyt   del_ref_func   s    t	   TestListsc           B  s   e  Z e j d  „  ƒ Z RS(   c         C  sæ   t  } t | d ƒ } | j } d } |  j t ƒ  } | d ƒ Wd  QXt j t | j ƒ | ƒ d  k rƒ |  j
 d j | j ƒ ƒ n  |  j t ƒ  } | d ƒ Wd  QXt j t | j ƒ | ƒ d  k râ |  j
 d j | j ƒ ƒ n  d  S(   Ns/   local variable 'x' referenced before assignmenti   s   unexpected exception: {0}(    (   R   R   t   entry_pointt   assertRaisest   UnboundLocalErrort   ret   searcht   strt	   exceptiont   Nonet   failt   format(   t   selft   pyfunct   crt   cfunct   errmsgt   raised(    (    s3   lib/python2.7/site-packages/numba/tests/test_del.pyt   test_del_ref_func   s    	!!(   t   __name__t
   __module__R   t   allow_interpreter_modeR   (    (    (    s3   lib/python2.7/site-packages/numba/tests/test_del.pyR      s   t   __main__(   t
   __future__R    R
   t   numba.compilerR   t   supportR   t   numba.unittest_supportt   unittest_supportt   unittestt   numbaR   R   R   R   t   main(    (    (    s3   lib/python2.7/site-packages/numba/tests/test_del.pyt   <module>   s   	