File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525
2626import numpy as np
27+ import pytest
2728
2829import mkl_fft
2930import mkl_fft .interfaces .numpy_fft as _nfft
3031
3132
33+ @pytest .mark .skipif (
34+ np .fft .fft .__module__ != "numpy.fft" ,
35+ reason = "NumPy is already patched by a different library" ,
36+ )
3237def test_patch ():
3338 mkl_fft .restore_numpy_fft ()
3439 assert not mkl_fft .is_patched ()
35- assert ( np .fft .fft .__module__ == "numpy.fft" )
40+ assert np .fft .fft .__module__ == "numpy.fft"
3641
3742 mkl_fft .patch_numpy_fft () # Enable mkl_fft in Numpy
3843 assert mkl_fft .is_patched ()
39- assert ( np .fft .fft .__module__ == _nfft .fft .__module__ )
44+ assert np .fft .fft .__module__ == _nfft .fft .__module__
4045
4146 mkl_fft .restore_numpy_fft () # Disable mkl_fft in Numpy
4247 assert not mkl_fft .is_patched ()
43- assert ( np .fft .fft .__module__ == "numpy.fft" )
48+ assert np .fft .fft .__module__ == "numpy.fft"
You can’t perform that action at this time.
0 commit comments