From 49317926835c6548abaa6cd536959c1b7d566f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Cl=C3=A9net?= Date: Thu, 12 Dec 2024 15:23:01 +0100 Subject: [PATCH] Adding tests --- tests/pipelines/test_team_DC61.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/pipelines/test_team_DC61.py b/tests/pipelines/test_team_DC61.py index c481dce9..7f424b28 100644 --- a/tests/pipelines/test_team_DC61.py +++ b/tests/pipelines/test_team_DC61.py @@ -141,6 +141,31 @@ def test_confounds_file(temporary_data_dir): def test_group_level_contrasts(): """ Test the get_group_contrasts method """ + # Wrong parameter + assert PipelineTeamDC61.get_group_level_contrasts('wrong') is None + + # effect_of_gain parameter + assert PipelineTeamDC61.get_group_level_contrasts('effect_of_gain') + + # effect_of_loss parameter + assert PipelineTeamDC61.get_group_level_contrasts('effect_of_loss') + [ + ['gain_param_range', 'T', ['equalIndifference', 'equalRange'], [0, 1]], + ['gain_param_indiff', 'T', ['equalIndifference', 'equalRange'], [1, 0]] + ] + + if subject_level_contrast == 'effect_of_loss': + range_con = ['loss_param_range', 'T', ['equalIndifference', 'equalRange'], [0, 1]] + indiff_con = ['loss_param_indiff', 'T', ['equalIndifference', 'equalRange'], [1, 0]] + return [ + ['loss_param_range_f', 'F', [range_con], [1]], + ['loss_param_indiff_f', 'F', [indiff_con], [1]] + ] + + + + + @staticmethod @mark.unit_test def test_group_covariates(mock_participants_data):