diff --git a/mne/io/eeglab/tests/test_eeglab.py b/mne/io/eeglab/tests/test_eeglab.py index 43e523de997..84c9be5e0be 100644 --- a/mne/io/eeglab/tests/test_eeglab.py +++ b/mne/io/eeglab/tests/test_eeglab.py @@ -747,5 +747,5 @@ def test_eeglab_drop_nan_annotations(tmp_path): ch_types=np.repeat("EEG", len(ch_names)), ) - with pytest.raises(RuntimeWarning, match="1 .* have an onset that is NaN.*"): + with pytest.warns(RuntimeWarning, match="1 .* have an onset that is NaN.*"): raw = read_raw_eeglab(file_path, preload=True)