Skip to content

Commit 25a988d

Browse files
Jammy2211Jammy2211claude
authored
test: remove jax-using unit tests; assertions moved to autolens_workspace_test (#295)
Unit tests in test_autoarray/ that imported jax (directly via importorskip or indirectly via library helpers like ImagingSparseOperator and the KNN interpolator) caused two problems: they broke the no-jax CI matrix on Python 3.9 / 3.10, and they paid the jax import cost on every local run even when self-skipping. Per the project rule "library unit tests stay numpy-only; cross-xp checks live in workspace_test", move all 9 jax assertions into autolens_workspace_test/scripts/jax_assertions/. Library code unchanged. Conftest's collect_ignore_glob for test_jax_*.py removed since no such files remain (test_jax_changes.py renamed to test_changes.py since it never used jax in the first place). Co-authored-by: Jammy2211 <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 50ee61b commit 25a988d

8 files changed

Lines changed: 475 additions & 943 deletions

File tree

test_autoarray/conftest.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import importlib.util
21
import os
32
from os import path
43
import pytest
@@ -7,13 +6,6 @@
76
from autoarray import fixtures
87
from autoconf import conf
98

10-
# Skip JAX-only tests when jax isn't installed. find_spec checks availability
11-
# WITHOUT importing the module, so this conftest stays numpy-only per the
12-
# "library unit tests stay numpy-only" rule.
13-
collect_ignore_glob = []
14-
if importlib.util.find_spec("jax") is None:
15-
collect_ignore_glob = ["test_jax_*.py", "**/test_jax_*.py"]
16-
179

1810
class PlotPatch:
1911
def __init__(self):

0 commit comments

Comments
 (0)