You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix numba JIT configuration failing on airflow runner (#1117)
fix: prevent numba JIT errors during test collection on runner envs
Two issues caused collection-time failures when running tests in runner environments (e.g. the ome_sdc conda env where Airflow is
used):
1. os.environ.setdefault("NUMBA_DISABLE_JIT", "1") is a no-op if the environment already exports NUMBA_DISABLE_JIT=0. Switched to a
force-set assignment, and added a sys.modules patch for the case where a pytest plugin (fast-array-utils, npe2,
napari-plugin-engine) has already imported numba before conftest.py runs — numba reads its config once at import time, so the env
var alone is too late.
2. Module-level blobs() calls in four test files executed during pytest collection, before conftest.py had taken effect. Replaced
each with a @pytest.fixture(scope="module"), which fires during test execution. No performance change — blobs() is still called once
per file.
refactor: consolidate numba JIT disable into root conftest only
The sub-conftest files in core/operations/ and dataloader/ duplicated the same NUMBA_DISABLE_JIT logic already present in the root
tests/conftest.py. Removed the duplicates.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments