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
{{ message }}
Repository navigation
Strengthen MNE conversion tests for EEG and ICA invariants #183
🤖 Current MNE conversion tests mostly assert type and shape details, and one suite skips when EEGPREP_SKIP_MATLAB=1 even though it does not require MATLAB. This let the wrong EEG data orientation and invalid ICA field algebra survive.
The MNE conversion tests use shape-only checks and broad try/except blocks that turn AssertionError into skipTest, so the wrong data orientation (#178) and unmanaged temp files (#181) slip through. Both files also gate at module level on EEGPREP_SKIP_MATLAB, but neither test touches MATLAB — only MNE.
tests/conftest.py#L63-L66 — files marked as matlab
Proposed Fix
Tighten the two test files so they assert the EEGPrep invariants (channel-major data, ICA mixing/unmixing algebra reconstructs data, no stdout, no leftover temp files) and stop catching AssertionError via try/except → skipTest. Drop the EEGPREP_SKIP_MATLAB module guards (they are MNE-only tests) and remove the two files from MATLAB_FILE_SUFFIXES in conftest.py. Mark assertions that exercise the bugs in #178/#181 with pytest.mark.xfail(strict=True, reason=...) so CI is green today and XPASS forces the marker removal when those fixes land. Test-only change; the converter code is owned by #178 and #181.
Activity
claude commentedon Jun 10, 2026
🤖 Plan:
tests/test_eeg_mne2eeg_epochs.py— channel-major shape, ICA reconstruction algebra, no stdout, drop swallowingtry/except → skipTesttests/test_eeg_eeg2mne.py— no-temp-leak assertion around conversionEEGPREP_SKIP_MATLABgate from both files; remove fromtests/conftest.pyMATLAB_FILE_SUFFIXESpytest.mark.xfail(strict=True)referencing Fix MNE epochs conversion EEG shape and ICA fields #178 / Clean up MNE converter temp files and demo code #181 so CI is green now and XPASS signals once those land12 passed, 7 skipped, 9 xfailedResearch
The MNE conversion tests use shape-only checks and broad
try/exceptblocks that turnAssertionErrorintoskipTest, so the wrong data orientation (#178) and unmanaged temp files (#181) slip through. Both files also gate at module level onEEGPREP_SKIP_MATLAB, but neither test touches MATLAB — only MNE.Relevant code
tests/test_eeg_mne2eeg_epochs.py#L28-L29— wrong MATLAB skip gatetests/test_eeg_mne2eeg_epochs.py#L120-L124— shape-only ICA assertionstests/test_eeg_mne2eeg_epochs.py#L257— asserts MNE order(n_epochs, n_channels, n_times)tests/test_eeg_eeg2mne.py#L29-L30— wrong MATLAB skip gatetests/conftest.py#L63-L66— files marked asmatlabProposed Fix
Tighten the two test files so they assert the EEGPrep invariants (channel-major
data, ICA mixing/unmixing algebra reconstructsdata, no stdout, no leftover temp files) and stop catchingAssertionErrorviatry/except → skipTest. Drop theEEGPREP_SKIP_MATLABmodule guards (they are MNE-only tests) and remove the two files fromMATLAB_FILE_SUFFIXESinconftest.py. Mark assertions that exercise the bugs in #178/#181 withpytest.mark.xfail(strict=True, reason=...)so CI is green today and XPASS forces the marker removal when those fixes land. Test-only change; the converter code is owned by #178 and #181.PR
#187