Skip to content

Commit ffafa86

Browse files
Jammy2211claude
andcommitted
Skip JAX-only InterferometerSparseOperator unit tests when jax is absent
The four new operator tests call methods that import jax internally, so the unittest-nojax leg failed with ModuleNotFoundError. Guard each with pytest.importorskip("jax"), matching test_kernel_jax_gradients.py. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012JM45sA4YGEUw6KYW8Pm96
1 parent 539d9ff commit ffafa86

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎test_autoarray/inversion/inversion/interferometer/test_inversion_interferometer_util.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def _dense_from_triplets(rows, cols, vals, M, S):
122122

123123

124124
def test__interferometer_sparse_operator__curvature_matrix_off_diag_from():
125+
pytest.importorskip("jax")
126+
125127
operator, mask, rng = _sparse_operator_and_mask()
126128

127129
M = operator.M
@@ -157,6 +159,8 @@ def test__interferometer_sparse_operator__curvature_matrix_off_diag_from():
157159

158160

159161
def test__interferometer_sparse_operator__curvature_matrix_off_diag_func_list_from():
162+
pytest.importorskip("jax")
163+
160164
operator, mask, rng = _sparse_operator_and_mask()
161165

162166
M = operator.M
@@ -193,6 +197,8 @@ def test__interferometer_sparse_operator__curvature_matrix_off_diag_func_list_fr
193197

194198

195199
def test__interferometer_sparse_operator__curvature_matrix_func_list_from():
200+
pytest.importorskip("jax")
201+
196202
operator, mask, rng = _sparse_operator_and_mask()
197203

198204
M = operator.M
@@ -222,6 +228,8 @@ def test__interferometer_sparse_operator__curvature_matrix_func_list_from():
222228

223229

224230
def test__interferometer_sparse_operator__operated_matrix_slim_from():
231+
pytest.importorskip("jax")
232+
225233
operator, mask, rng = _sparse_operator_and_mask()
226234

227235
M = operator.M

0 commit comments

Comments
 (0)