o
    i                      @   s*  d dl mZ d dlZd dlZd dlmZmZmZ d dl	m
Z
 d dlmZmZ d dlZdZejjejjejjejjejjejjejjejjejjejjejjejjejjejejejjej ej!ej"ej#ej$ej%ej&ej'ej(ej)eej*ddd	eej+ddd	fZ,ejjejjejjejjejjejjejjejjejjejjejjejjejjejjejjejjejj ejj!ejj"ejj#ejj$ejj%ejj&ejj'ejj(ejj)eejj*ddd	eejj+ddd	fZ-e
je
je
je
je
je
je
je
je
je
je
je
je
je
je
je
je
j e
j!e
j"e
j#e
j$e
j%e
j&e
j'e
j(e
j)e
j*e
j+fZ.ej/0d
e1e-e,e.dd Z2ejjejjejjejjejjejjejjejjejjejjejjejjejjejjejjejjejj ejj!fZ3e
je
je
je
je
je
je
je
je
je
je
je
je
je
je
je
je
j e
j!fZ4ej/0de1e3e4dd Z5dS )    )partialN)_fftlog
_pocketfftset_backend)mock_backend)assert_allcloseassert_equal)fftfft2fftnifftifft2ifftnrfftrfft2rfftnirfftirfft2irfftndctidctdctnidctndstidstdstnidstnfhtifht   g      ?)Zdlnmuzfunc, np_func, mockc                 C   s   t dd}||}t| ||dd ttdd d|_| |}t||j t|jd W d    n1 s9w   Y  t| ||dd d S )	N   
   r   g|=)ZatolTonlyr      )	nparangereshaper   r   r   number_callsr   return_value)funcZnp_funcmockxZanswery r0   k/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/scipy/fft/tests/test_backend.pytest_backend_call8   s   r2   z
func, mockc                 C   s   t dd}tjtdd | |dd W d    n1 s w   Y  ttdd( d	|_| |dd}t	||j
 t	|jd
 t	|jd
 d d W d    d S 1 sVw   Y  d S )Nr!   r"   zprecomputed plan)matchZfoo)planTr$   r   r&   r4   )r'   r(   r)   pytestZraisesNotImplementedErrorr   r   r*   r   r+   Z	last_args)r,   r-   r.   r/   r0   r0   r1   test_backend_planV   s   "r7   )6	functoolsr   numpyr'   Z	scipy.fftZscipyr   r   r   Zscipy.fft.testsr   Znumpy.testingr   r   r5   fnamesr	   r
   r   r   r   r   r   r   r   r   r   r   ZhfftZhfft2ZhfftnZihfftZihfft2Zihfftnr   r   r   r   r   r   r   r   r   r   Znp_funcsfuncsZmocksmarkZparametrizezipr2   Z
plan_funcsZ
plan_mocksr7   r0   r0   r0   r1   <module>   sx    
