
    ^Mh                     \    d Z ddlmZ ddlZddlZddlZddlmZ ddlZ G d d          Z	dS )a  Test possibility of patching fftpack with pyfftw.

No module source outside of scipy.fftpack should contain an import of
the form `from scipy.fftpack import ...`, so that a simple replacement
of scipy.fftpack by the corresponding fftw interface completely swaps
the two FFT implementations.

Because this simply inspects source files, we only need to run the test
on one version of Python.
    )PathN)assert_c                   8    e Zd Zej        j        d             ZdS )TestFFTPackImportc                 \   t          t          j                  j        }d|                    d          D ]t}|dz  |j        v rt          j        t          |                    5 }t          t          fd|D                       | d           d d d            n# 1 swxY w Y   ud S )Nz\s*from.+\.fftpack import .*\nz*.pyfftpackc              3   D   K   | ]}t          j        |           V  d S )N)re	fullmatch).0lineregexps     _/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/fftpack/tests/test_import.py	<genexpr>z8TestFFTPackImport.test_fftpack_import.<locals>.<genexpr>   sF       . . $ !#VT : :: . . . . . .    z  contains an import from fftpack)r   scipy__file__parentrglobparentstokenizeopenstrr   all)selfbasepathfiler   s       @r   test_fftpack_importz%TestFFTPackImport.test_fftpack_import   s&   EN##*2JJv&& 	C 	CDi4<// s4yy)) CT . . . .(,. . . . .AAAC C CC C C C C C C C C C C C C C C	C 	Cs   '-B  B$	'B$	N)__name__
__module____qualname__pytestmarkslowr    r   r   r   r      s8        [C C C C Cr   r   )
__doc__pathlibr   r
   r   r#   numpy.testingr   r   r   r&   r   r   <module>r*      s   	 	       				   ! ! ! ! ! ! C C C C C C C C C Cr   