o
    h                      @   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      ?)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|=)atolTonlyr      )	nparangereshaper   r   r   number_callsr   return_value)funcnp_funcmockxanswery r4   W/var/www/html/scripts/venv/lib/python3.10/site-packages/scipy/fft/tests/test_backend.pytest_backend_call8   s   r6   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)matchfoo)planTr&   r   r(   r9   )r)   r*   r+   pytestraisesNotImplementedErrorr   r   r,   r   r-   	last_args)r.   r0   r1   r3   r4   r4   r5   test_backend_planV   s   "r>   )6	functoolsr   numpyr)   	scipy.fftscipyr   r   r   scipy.fft.testsr   numpy.testingr   r   r:   fnamesr	   r
   r   r   r   r   r   r   r   r   r   r   hffthfft2hfftnihfftihfft2ihfftnr   r   r   r   r   r   r   r   r   r   np_funcsfuncsmocksmarkparametrizezipr6   
plan_funcs
plan_mocksr>   r4   r4   r4   r5   <module>   sx    
