Skip to content

Commit

Permalink
[1KB2] Correction test: add of fake path to FSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
elodiegermani1 committed Jul 21, 2023
1 parent 004859c commit f554a18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
14 changes: 2 additions & 12 deletions narps_open/pipelines/team_1KB2.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
#!/usr/bin/python
# coding: utf-8

"""
This template can be use to reproduce a pipeline using FSL as main software.
- Replace all occurences of 48CD by the actual id of the team.
- All lines beging [INFO], are meant to help you during the reproduction, these can be removed
eventually.
- Also remove lines beging with [TODO], once you did what they suggested.
"""

# [TODO] Only import modules you use further in te code, remove others from the import section

from os.path import join

# [INFO] The import of base objects from Nipype, to create Workflows
Expand Down Expand Up @@ -191,7 +180,8 @@ def get_preprocessing_outputs(self):
templates += [join(
self.directories.output_dir,
'l1_analysis', f'run_id_{run_id}'+'_subject_id_{subject_id}',
'sub-{subject_id}_'+f'T1w_fieldwarp.nii.gz')]
'sub-{subject_id}_'+f'T1w_fieldwarp.nii.gz')\
for run_id in self.run_list]

templates += [join(
self.directories.output_dir,
Expand Down
7 changes: 5 additions & 2 deletions tests/pipelines/test_team_1KB2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@
"""

from statistics import mean
from os import environ

from pytest import raises, helpers, mark
from nipype import Workflow

from narps_open.pipelines.team_1KB2 import PipelineTeam1KB2

class TestPipelinesTeam1KB2:
""" A class that contains all the unit tests for the PipelineTeam2T6S class."""
""" A class that contains all the unit tests for the PipelineTeam1KB2 class."""

@staticmethod
@mark.unit_test
def test_create():
""" Test the creation of a PipelineTeam1KB2 object """
# Defines fake environment variable
patch.dict(environ, {'FSLDIR': '/fake/path/to/fsl'})

pipeline = PipelineTeam1KB2()

Expand All @@ -45,7 +48,7 @@ def test_create():
@staticmethod
@mark.unit_test
def test_outputs():
""" Test the expected outputs of a PipelineTeam2T6S object """
""" Test the expected outputs of a PipelineTeam1KB2 object """
pipeline = PipelineTeam1KB2()
# 1 - 1 suject outputs, 1 run
pipeline.subject_list = ['001']
Expand Down

0 comments on commit f554a18

Please sign in to comment.