Skip to content

Commit 51696f1

Browse files
committed
test(dss): cover non-2D guard in compute_evoked_covariance
Exercise the dimensionality check so the added Evoked covariance code is fully covered by the patch.
1 parent 5dac871 commit 51696f1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎tests/utils/test_covariance.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,13 @@ def test_compute_evoked_covariance_raises_on_too_few_samples():
262262

263263
with pytest.raises(ValueError, match="at least 2 time samples"):
264264
compute_evoked_covariance(evoked)
265+
266+
267+
def test_compute_evoked_covariance_rejects_non_2d_data():
268+
"""Non-2D evoked data is rejected before reaching MNE."""
269+
270+
class _FakeEvoked:
271+
data = np.zeros((2, 3, 4))
272+
273+
with pytest.raises(ValueError, match="2D"):
274+
compute_evoked_covariance(_FakeEvoked())

0 commit comments

Comments
 (0)