-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5de3389
commit d380833
Showing
7 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
meggie/actions/evoked_group_average/tests/test_evoked_group_average.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from PyQt5 import QtCore | ||
|
||
from meggie.utilities.testing import BaseTestAction | ||
from meggie.actions.evoked_group_average import GroupAverage | ||
from meggie.utilities.dialogs.groupSelectionDialogMain import ( | ||
GroupSelectionDialog, | ||
) | ||
|
||
|
||
class TestEvokedGroupAverage(BaseTestAction): | ||
def test_evoked_group_average(self): | ||
|
||
data = {"outputs": {"evoked": ["Evoked"]}} | ||
|
||
self.run_action( | ||
action_name="evoked_group_average", | ||
handler=GroupAverage, | ||
data=data, | ||
patch_paths=["meggie.actions.evoked_group_average"], | ||
) | ||
dialog = self.find_dialog(GroupSelectionDialog) | ||
|
||
dialog.ui.checkBoxGroup_0.setCheckState(QtCore.Qt.Checked) | ||
dialog.ui.spinBoxGroup_0.setValue(1) | ||
dialog.ui.checkBoxGroup_1.setCheckState(QtCore.Qt.Checked) | ||
dialog.ui.spinBoxGroup_1.setValue(2) | ||
|
||
dialog.accept() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from meggie.utilities.testing import BaseTestAction | ||
from meggie.actions.evoked_info import Info | ||
|
||
|
||
class TestEvokedInfo(BaseTestAction): | ||
def test_evoked_info(self): | ||
|
||
data = {"outputs": {"evoked": ["Evoked"]}} | ||
|
||
content = self.run_action( | ||
action_name="evoked_info", | ||
handler=Info, | ||
data=data, | ||
patch_paths=["meggie.actions.evoked_info"], | ||
) | ||
assert content |
19 changes: 19 additions & 0 deletions
19
meggie/actions/evoked_plot/tests/test_evoked_plot_all_channels.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from meggie.utilities.testing import BaseTestAction | ||
from meggie.actions.evoked_plot import PlotEvoked | ||
from meggie.utilities.dialogs.outputOptionsMain import OutputOptions | ||
|
||
|
||
class TestEvokedPlot(BaseTestAction): | ||
def test_evoked_plot_all_channels(self): | ||
|
||
data = {"outputs": {"evoked": ["Evoked"]}} | ||
|
||
self.run_action( | ||
action_name="evoked_plot", | ||
handler=PlotEvoked, | ||
data=data, | ||
patch_paths=["meggie.actions.evoked_plot"], | ||
) | ||
dialog = self.find_dialog(OutputOptions) | ||
dialog.ui.radioButtonChannelAverages.setChecked(False) | ||
dialog.accept() |
19 changes: 19 additions & 0 deletions
19
meggie/actions/evoked_plot/tests/test_evoked_plot_channel_averages.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from meggie.utilities.testing import BaseTestAction | ||
from meggie.actions.evoked_plot import PlotEvoked | ||
from meggie.utilities.dialogs.outputOptionsMain import OutputOptions | ||
|
||
|
||
class TestEvokedPlot(BaseTestAction): | ||
def test_evoked_plot_channel_averages(self): | ||
|
||
data = {"outputs": {"evoked": ["Evoked"]}} | ||
|
||
self.run_action( | ||
action_name="evoked_plot", | ||
handler=PlotEvoked, | ||
data=data, | ||
patch_paths=["meggie.actions.evoked_plot"], | ||
) | ||
dialog = self.find_dialog(OutputOptions) | ||
dialog.ui.radioButtonChannelAverages.setChecked(True) | ||
dialog.accept() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters