Repository navigation
[tests] Make the test suite able to fail (Fable 5 Phase 1) - #200
Conversation
Part of the Fable 5 Findings epic (#193); addresses issue #194. - Remove assertion-swallowing try/except->skipTest wrappers across test_clean_artifacts, test_clean_drifts, test_eeg_picard, test_ICL_feature_extractor, and test_eeg_mne2eeg so assertions run instead of converting failures into skips. Genuine optional-dependency skips are kept as explicit @skipUnless guards. - Deduplicate the per-module create_test_eeg fixtures onto the shared tests/fixtures.py fixture. - Tighten the eeg_autocorr_fftw vs eeg_autocorr cross-check from rtol/atol=0.1 to 1e-4/1e-7 (documented: the only divergence is the single-precision FFT cast in eeg_autocorr). - Add a real (unmocked) calc_projector test that runs the actual sphericalSplineInterpolate and validates channel mapping/assembly. - Replace the ASR numpy-error-injection log-string tests with real degenerate-input tests asserting finite, sane cleaned output. - Assert real clustering behavior (shared labels within tight pairs, far point isolated) in the study clustering helper test. test_eeg_picard_different_random_states now xfails honestly: eeg_picard converges identically regardless of random_state (tracked under the epic for Phase 2/3); marked xfail rather than re-hidden.
|
Claude finished @suraj-ranganath's task in 3m 15s —— View job Code review
What I verified statically:
BlockingNone. ImportantNone. Nits
Test gaps
EEGLAB parity notes
Note: I was unable to run |
|
🤖 Specification (PR >500 LOC; full per-finding detail in #194, epic #193) Problem. Several core-numeric and parity tests could not fail: assertions were wrapped in Approach. Removed the assertion-swallowing wrappers across Honest xfail. Un-swallowing Tests. |
Remove assertion-swallowing try/except-skipTest wrappers so core clean_rawdata, ICLabel, MNE, ASR and clustering tests assert real behavior instead of skipping on failure; genuine optional-dependency skips stay as explicit skipUnless guards. Also deduplicate create_test_eeg onto the shared fixture, tighten the autocorr cross-check tolerance, add a real unmocked calc_projector test, and replace ASR error-injection log-string tests with degenerate-input checks. One picard random-seed test now xfails honestly, tracked for Phase 2/3.
Fixes #194