Skip to content

Commit cd55b21

Browse files
committed
skip patch test if NumPy fft has been replaced by a module already
1 parent b5a4b19 commit cd55b21

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

mkl_fft/tests/test_patch.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@
3030

3131

3232
def test_patch():
33-
mkl_fft.restore_numpy_fft()
33+
old_module = np.fft.fft.__module__
3434
assert not mkl_fft.is_patched()
35-
assert (np.fft.fft.__module__ == "numpy.fft")
3635

3736
mkl_fft.patch_numpy_fft() # Enable mkl_fft in Numpy
3837
assert mkl_fft.is_patched()
39-
assert (np.fft.fft.__module__ == _nfft.fft.__module__)
38+
assert np.fft.fft.__module__ == _nfft.fft.__module__
4039

4140
mkl_fft.restore_numpy_fft() # Disable mkl_fft in Numpy
4241
assert not mkl_fft.is_patched()
43-
assert (np.fft.fft.__module__ == "numpy.fft")
42+
assert np.fft.fft.__module__ == old_module

0 commit comments

Comments
 (0)