[med-svn] [Git][med-team/python-mne][master] 2 commits: debian/tests: fix architecture-specific test failures
Karsten Schöke (@karso)
gitlab at salsa.debian.org
Mon Oct 5 09:11:38 BST 2026
Karsten Schöke pushed to branch master at Debian Med / python-mne
Commits:
9998d8a5 by Karsten Schöke at 2026-10-05T08:15:55+02:00
debian/tests: fix architecture-specific test failures
Pass the previously computed $DESELECT option to pytest; it was set for
ppc64el but never actually appended to the pytest command line, so the
Welch spectrum skip never took effect there.
Also handle 32-bit architectures explicitly:
- ppc64el: deselect test_spectrum_complex[welch-False]. A Welch PSD bin
can underflow to exactly 0.0 (denormal/flush-to-zero behavior), which
triggers a "Zero value in spectrum" UserWarning that MNE/pytest turn
into a FAIL (filterwarnings="error:").
- armhf/i386: skip via -k the non-parameterized test_peak_finder and
test_split_saving_and_loading_back. C long is 32-bit here, so
np.index/int indices come back as int32 (peak finder asserts int64),
and MNE's split-file size prediction misses the last expected file.
- armhf/i386: deselect test_decimate_surface_vtk[2..4]. Debian VTK on
32-bit builds vtkIdType as int32, but MNE casts triangle indices to
np.int64 before numpy_to_vtkIdTypeArray, raising ValueError. The [0]
and [1] variants do not exercise the VTK path and stay enabled.
Architectures not affected (amd64/arm64/s390x) keep running the full
suite: both KEXTRA and DESELECT expand to nothing for them.
- - - - -
3ed9c205 by Karsten Schöke at 2026-10-05T09:20:37+02:00
Update changelog for 1.13.2-4 release
- - - - -
2 changed files:
- debian/changelog
- debian/tests/python-tests
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+python-mne (1.13.2-4) unstable; urgency=medium
+
+ * Team upload.
+ * debian/tests: fix architecture-specific test failures
+
+ -- Karsten Schöke <karsten.schoeke at geobasis-bb.de> Mon, 05 Oct 2026 09:20:21 +0200
+
python-mne (1.13.2-3) unstable; urgency=medium
* add 0016-Reproducible-documentation.patch (Closes: #1148979)
=====================================
debian/tests/python-tests
=====================================
@@ -4,7 +4,7 @@ set -e
cd "${AUTOPKGTEST_BUILDTREE:-$PWD}"
mkdir -p build
-export HOME=$PWD/build
+export HOME="$PWD"/build
export MNE_DONTWRITE_HOME=true
export MNE_SKIP_SAMPLE_DATASET_TESTS=true
export MNE_FORCE_SERIAL=true
@@ -15,9 +15,36 @@ export ETS_TOOLKIT=qt4
PYVER=$(python3 -c 'import sys; v=sys.version_info; print(f"{v.major}.{v.minor}")')
export PYTHONPATH="$PWD:$PWD/.pybuild/cpython3_${PYVER}_mne/build"
+# --- Architecture-specific test adjustments ---
+arch="$(dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null || uname -m)"
+KEXTRA=""
+DESELECT=""
+
+case "$arch" in
+ ppc64el|ppc64|riscv64)
+ # test_spectrum_complex[welch-False]: a Welch PSD bin can underflow to exactly
+ # 0.0 on ppc64el (denormal/flush-to-zero), producing a "Zero value in spectrum"
+ # UserWarning which MNE/pytest (filterwarnings="error:") turns into a FAIL.
+ # Only this one node is deselected; the other welch/multitaper variants run.
+ DESELECT="--deselect=mne/time_frequency/tests/test_spectrum.py::test_spectrum_complex[welch-False]"
+ ;;
+ armhf|i386)
+ # 32-bit arches (C long == int32):
+ # - test_peak_finder expects int64 indices, but they come back as int32
+ # - test_split_saving_and_loading_back writes fewer part files than predicted
+ # (the last expected file is always missing)
+ # - test_decimate_surface_vtk[2..4]: Debian armhf VTK has vtkIdType==int32,
+ # but MNE casts triangles to np.int64 -> ValueError. [0]/[1] don't use VTK,
+ # so they stay enabled via the --deselect list (brackets are invalid in -k).
+ KEXTRA=" and not test_peak_finder and not test_split_saving_and_loading_back"
+ DESELECT="--deselect=mne/tests/test_surface.py::test_decimate_surface_vtk[2] \
+--deselect=mne/tests/test_surface.py::test_decimate_surface_vtk[3] \
+--deselect=mne/tests/test_surface.py::test_decimate_surface_vtk[4]"
+ ;;
+esac
+
xvfb-run \
--auto-servernum \
--server-num=20 \
-s "-screen 0 1024x768x24 -ac +extension GLX +render -noreset" \
- pytest mne -k "not test_parallel_func_n_jobs_none and not test_qt_block_sigint"
-
+ pytest mne -k "not test_parallel_func_n_jobs_none and not test_qt_block_sigint${KEXTRA}" "$DESELECT"
View it on GitLab: https://salsa.debian.org/med-team/python-mne/-/compare/d13c37a9db9c6ec75971c3c67afb2625a6ac8011...3ed9c20564b235376ebac52eb033fd457bf77778
--
View it on GitLab: https://salsa.debian.org/med-team/python-mne/-/compare/d13c37a9db9c6ec75971c3c67afb2625a6ac8011...3ed9c20564b235376ebac52eb033fd457bf77778
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20261005/1c68dd4e/attachment-0001.htm>
More information about the debian-med-commit
mailing list