Skip to content

Commit efbd93b

Browse files
committed
fix patching test
1 parent db76eb2 commit efbd93b

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

mkl_fft/_patch_numpy.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def _is_tls_initialized():
9292
def patch_numpy_fft(verbose=False):
9393
if verbose:
9494
print("Now patching NumPy FFT submodule with mkl_fft NumPy interface.")
95-
print("Please direct bug reports to https://github.com/IntelPython/mkl_fft")
95+
print(
96+
"Please direct bug reports to https://github.com/IntelPython/mkl_fft"
97+
)
9698
if not _is_tls_initialized():
9799
_initialize_tls()
98100
_tls.patch.do_patch()

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)