Skip to content

Commit 2060bd5

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

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

mkl_fft/tests/test_patch.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@
2323
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2424
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525

26+
import pytest
27+
2628
import numpy as np
2729

2830
import mkl_fft
2931
import mkl_fft.interfaces.numpy_fft as _nfft
3032

3133

34+
@pytest.mark.skipif(
35+
np.fft.fft.__module__ != "numpy.fft",
36+
reason="NumPy is already patched by a different library"
37+
)
3238
def test_patch():
3339
mkl_fft.restore_numpy_fft()
3440
assert not mkl_fft.is_patched()

0 commit comments

Comments
 (0)