Skip to content

Commit 235b26e

Browse files
committed
Update test_drop_all_epochs to match ignore default
1 parent 8d4bf3f commit 235b26e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mne/tests/test_epochs.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5282,17 +5282,20 @@ def test_drop_all_epochs():
52825282
info = create_info(["ch1"], 1000.0, "eeg")
52835283
epochs = EpochsArray(data, info)
52845284

5285-
# 1. Test 'warn' (default)
5285+
# 1. Test 'ignore' (default)
5286+
epochs.copy().drop([0])
5287+
5288+
# 2. Test 'warn' explicitly
52865289
# We expect a warning when dropping all epochs
52875290
with pytest.warns(RuntimeWarning, match="All epochs dropped"):
5288-
epochs.copy().drop([0])
5291+
epochs.copy().drop([0], on_drop_all="warn")
52895292

5290-
# 2. Test 'raise'
5293+
# 3. Test 'raise'
52915294
# We expect a ValueError when dropping all epochs
52925295
with pytest.raises(ValueError, match="All epochs dropped"):
52935296
epochs.copy().drop([0], on_drop_all="raise")
52945297

5295-
# 3. Test 'ignore'
5298+
# 4. Test 'ignore' explicitly
52965299
# Should run silently (no warning, no error)
52975300
epochs.copy().drop([0], on_drop_all="ignore")
52985301

0 commit comments

Comments
 (0)