Skip to content

Commit

Permalink
[TEST] tests updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Oct 26, 2023
1 parent c575158 commit f6844a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions narps_open/pipelines/team_08MQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def get_preprocessing(self):
), name = 'remove_func_4')

preprocessing = Workflow(base_dir = self.directories.working_dir, name = 'preprocessing')
preprocessing.config['execution']['stop_on_first_crash'] = 'true'
preprocessing.connect([
# Inputs
(info_source, select_files, [('subject_id', 'subject_id'), ('run_id', 'run_id')]),
Expand Down
18 changes: 9 additions & 9 deletions tests/pipelines/test_team_08MQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_create():

# 2 - check workflows
assert isinstance(pipeline.get_preprocessing(), Workflow)
assert pipeline.get_run_level_analysis() is None
assert isinstance(pipeline.get_run_level_analysis(), Workflow)
assert isinstance(pipeline.get_subject_level_analysis(), Workflow)

group_level = pipeline.get_group_level_analysis()
Expand All @@ -47,19 +47,19 @@ def test_outputs():
pipeline = PipelineTeam08MQ()
# 1 - 1 subject outputs
pipeline.subject_list = ['001']
assert len(pipeline.get_preprocessing_outputs()) == 0
assert len(pipeline.get_run_level_outputs()) == 0
assert len(pipeline.get_subject_level_outputs()) == 0
assert len(pipeline.get_preprocessing_outputs()) == 3*4
assert len(pipeline.get_run_level_outputs()) == 8+4*3*4
assert len(pipeline.get_subject_level_outputs()) == 4*3
assert len(pipeline.get_group_level_outputs()) == 0
assert len(pipeline.get_hypotheses_outputs()) == 0
assert len(pipeline.get_hypotheses_outputs()) == 18

# 2 - 4 subjects outputs
pipeline.subject_list = ['001', '002', '003', '004']
assert len(pipeline.get_preprocessing_outputs()) == 0
assert len(pipeline.get_run_level_outputs()) == 0
assert len(pipeline.get_subject_level_outputs()) == 0
assert len(pipeline.get_preprocessing_outputs()) == 3*4*4
assert len(pipeline.get_run_level_outputs()) == (8+4*3*4)*4
assert len(pipeline.get_subject_level_outputs()) == 4*3*4
assert len(pipeline.get_group_level_outputs()) == 0
assert len(pipeline.get_hypotheses_outputs()) == 0
assert len(pipeline.get_hypotheses_outputs()) == 18

@staticmethod
@mark.pipeline_test
Expand Down

0 comments on commit f6844a5

Please sign in to comment.