Skip to content

Commit c2c8643

Browse files
committed
extend fit_fooof_3d test
1 parent cf721a2 commit c2c8643

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fooof/tests/objs/test_utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,17 @@ def test_combine_errors(tfm, tfg):
120120

121121
def test_fit_fooof_3d(tfg):
122122

123-
n_spectra = 2
123+
n_groups = 2
124+
n_spectra = 3
124125
xs, ys = gen_group_power_spectra(n_spectra, *default_group_params())
125-
ys = np.stack([ys, ys], axis=0)
126+
ys = np.stack([ys] * n_groups, axis=0)
127+
spectra_shape = np.shape(ys)
126128

127129
tfg = FOOOFGroup()
128130
fgs = fit_fooof_3d(tfg, xs, ys)
129131

130-
assert len(fgs) == 2
132+
assert len(fgs) == n_groups == spectra_shape[0]
131133
for fg in fgs:
132134
assert fg
135+
assert len(fg) == n_spectra
136+
assert fg.power_spectra.shape == spectra_shape[1:]

0 commit comments

Comments
 (0)