Skip to content

Commit

Permalink
Correcting issue with wrong test parametrization
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Mar 13, 2024
1 parent 7209739 commit 8c07549
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/pipelines/test_team_98BT.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
from narps_open.utils.configuration import Configuration
from narps_open.pipelines.team_98BT import PipelineTeam98BT

TEMPORARY_DIR = join(Configuration()['directories']['test_runs'], 'test_98BT')

class TestPipelinesTeam98BT:
""" A class that contains all the unit tests for the PipelineTeam98BT class."""

Expand Down Expand Up @@ -84,8 +82,7 @@ def test_fieldmap_info():

@staticmethod
@mark.unit_test
@mark.parametrize('remove_test_dir', TEMPORARY_DIR)
def test_parameters_files(remove_test_dir):
def test_parameters_files(temporary_data_dir):
""" Test the get_parameters_files method
For this test, we created the two following files by downsampling output files
from the preprocessing pipeline :
Expand All @@ -105,11 +102,11 @@ def test_parameters_files(remove_test_dir):

# Get new parameters file
PipelineTeam98BT.get_parameters_file(
parameters_file, wc2_file, func_file, 'sid', 'rid', TEMPORARY_DIR)
parameters_file, wc2_file, func_file, 'sid', 'rid', temporary_data_dir)

# Check parameters file was created
created_parameters_file = join(
TEMPORARY_DIR, 'parameters_files', 'parameters_file_sub-sid_run-rid.tsv')
temporary_data_dir, 'parameters_files', 'parameters_file_sub-sid_run-rid.tsv')
assert exists(created_parameters_file)

# Check contents
Expand Down

0 comments on commit 8c07549

Please sign in to comment.