diff --git a/pytests/test_torchoperator.py b/pytests/test_torchoperator.py index edada492f..85d9c4be0 100644 --- a/pytests/test_torchoperator.py +++ b/pytests/test_torchoperator.py @@ -11,7 +11,6 @@ from numpy.testing import assert_array_equal backend = "numpy" -import numpy as npp import pytest import torch @@ -33,7 +32,7 @@ def test_TorchOperator(par): # temporarily, skip tests on mac as torch seems not to recognized # numpy when v2 is installed if platform.system() == "Darwin": - return + pytest.skip("torch not recognized on macOS with numpy v2") device = "cpu" if backend == "numpy" else "cuda" Dop = MatrixMult(np.random.normal(0.0, 1.0, (par["ny"], par["nx"]))) @@ -63,7 +62,7 @@ def test_TorchOperator_batch(par): # temporarily, skip tests on mac as torch seems not to recognized # numpy when v2 is installed if platform.system() == "Darwin": - return + pytest.skip("torch not recognized on macOS with numpy v2") device = "cpu" if backend == "numpy" else "cuda" Dop = MatrixMult(np.random.normal(0.0, 1.0, (par["ny"], par["nx"]))) @@ -85,7 +84,7 @@ def test_TorchOperator_batch_nd(par): # temporarily, skip tests on mac as torch seems not to recognized # numpy when v2 is installed if platform.system() == "Darwin": - return + pytest.skip("torch not recognized on macOS with numpy v2") device = "cpu" if backend == "numpy" else "cuda" Dop = MatrixMult(np.random.normal(0.0, 1.0, (par["ny"], par["nx"])), otherdims=(2,))