We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c3c77d commit 0d5987bCopy full SHA for 0d5987b
1 file changed
mkl_fft/tests/test_patch.py
@@ -24,6 +24,7 @@
24
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
26
import numpy as np
27
+import pytest
28
29
import mkl_fft
30
import mkl_fft.interfaces.numpy_fft as _nfft
@@ -78,3 +79,10 @@ def test_patch_reentrant():
78
79
80
assert not mkl_fft.is_patched()
81
assert np.fft.fft.__module__ == old_module
82
+
83
84
+def test_patch_warning():
85
+ if mkl_fft.is_patched():
86
+ pytest.skip("This test should not be run with a pre-patched NumPy.")
87
+ with pytest.warns(RuntimeWarning, match="restore_numpy_fft*"):
88
+ mkl_fft.restore_numpy_fft()
0 commit comments