ó
Uś\c           @   sŐ   d  d l  Z  d  d l Z d  d l m Z m Z m Z d  d l Z d   Z d   Z	 d   Z
 d   Z d   Z d d	 d
 d d d g Z d   Z d   Z d   Z d   Z d   Z d   Z e d k rŃ e   n  d S(   i˙˙˙˙N(   t   assert_warnst   run_module_suitet   assert_array_equalc          C   s&   t  j d  }  t t t  j |   d  S(   Nt   db3(   t   pywtt   WaveletR    t   DeprecationWarningt   intwave(   t   wavelet(    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_intwave_deprecation	   s    c          C   s&   t  j d  }  t t t  j |   d  S(   NR   (   R   R   R    R   t   centrfrq(   R   (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_centrfrq_deprecation   s    c          C   s)   t  j d  }  t t t  j |  d  d  S(   NR   i   (   R   R   R    R   t   scal2frq(   R   (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_scal2frq_deprecation   s    c           C   s   t  t t j t d   d  S(   Ni   (   R    R   R   t   orthfiltt   range(    (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_orthfilt_deprecation   s    c          C   sA   d d d d g }  d d d d g } t  t t j |  | f  d  S(   Ni    i   i   i   (   R    R   R   t   integrate_wavelet(   t   sigt   xgrid(    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_integrate_wave_tuple   s    t   zpdt   cpdt   symt   ppdt   sp1t   perc          C   s+   x$ t  D] }  t t t j j |   q Wd  S(   N(   t	   old_modesR    R   R   t   Modest   from_object(   t   mode(    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt"   test_MODES_from_object_deprecation+   s    c          C   s4   d   }  x$ t  D] } t t |  t j |  q Wd  S(   Nc         S   s   t  |  |  S(   N(   t   getattr(   R   t   name(    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   get_mode1   s    (   R   R    R   R   R   (   R"   R   (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt!   test_MODES_attributes_deprecation0   s    	c          C   s   d   }  t  t |   d  S(   Nc           S   s
   t  j j S(   N(   R   t   MODESt	   symmetric(    (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   use_MODES_new9   s    (   R    R   (   R&   (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_MODES_deprecation_new8   s    	c          C   s   d   }  t  t |   d  S(   Nc           S   s
   t  j j S(   N(   R   R$   R   (    (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   use_MODES_old@   s    (   R    R   (   R(   (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_MODES_deprecation_old?   s    	c          C   s   d   }  t  t |   d  S(   Nc           S   s   t  t j d  S(   NR%   (   R    R   R$   (    (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyR&   G   s    (   R    R   (   R&   (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_MODES_deprecation_getattrF   s    	c          C   s   d d d d d d g }  t  j d  } t j   ] t j d t  xE |  D]= \ } } t t j | d d | t j | d d |  qK WWd  QXd  S(   NR   t   zeroR   t   constantR   R%   R   t   periodicR   t   smoothR   t   periodizationg       @t   ignoret   db2R   (   R   R+   (   R   R,   (   R   R%   (   R   R-   (   R   R.   (   R   R/   (	   t   npt   aranget   warningst   catch_warningst   simplefilterR   R   R   t   dwt(   t   old_newt   xt   oldt   new(    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   test_mode_equivalenceM   s    	t   __main__(   R4   t   numpyR2   t   numpy.testingR    R   R   R   R	   R   R   R   R   R   R   R#   R'   R)   R*   R<   t   __name__(    (    (    s;   lib/python2.7/site-packages/pywt/tests/test_deprecations.pyt   <module>   s,   												