From 273a8d7c3a24ac67831de6d7fc42f228c9b6bf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Cl=C3=A9net?= <117362283+bclenet@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:20:02 +0100 Subject: [PATCH] Correcting issue with wrong test parametrization (#184) --- tests/pipelines/test_team_98BT.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/pipelines/test_team_98BT.py b/tests/pipelines/test_team_98BT.py index 6e2a0afb..ad09d2bf 100644 --- a/tests/pipelines/test_team_98BT.py +++ b/tests/pipelines/test_team_98BT.py @@ -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.""" @@ -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 : @@ -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