Skip to content

Commit a042b48

Browse files
committed
TEST: add test for plotting the configuration
1 parent 92f230c commit a042b48

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

examples/test_sample.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,6 @@
7979

8080
fig.tight_layout()
8181
plt.show()
82+
83+
brain = sc.plot("sample", subjects_dir=subjects_dir)
84+
brain.close()

tests/test_subject.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,20 @@ def test_grow_patch_source():
5858

5959
sc = sim.simulate(sfreq, duration, fwd=fwd, random_state=seed)
6060
sc.to_raw(fwd, info)
61+
62+
63+
@pytest.mark.skipif(running_on_ci(), reason="Skip tests with real data on CI")
64+
def test_sourceconfiguration_plot():
65+
fwd, _, subjects_dir = prepare_real_data()
66+
src = fwd["src"]
67+
68+
sfreq = 250
69+
duration = 60
70+
seed = 123
71+
72+
sim = SourceSimulator(src, snr_mode="local")
73+
sim.add_noise_sources(location=select_random, location_params=dict(n=10))
74+
75+
sc = sim.simulate(sfreq, duration, fwd=fwd, random_state=seed)
76+
brain = sc.plot(subject="sample", subjects_dir=subjects_dir)
77+
brain.close()

0 commit comments

Comments
 (0)