From 5a65c7f1dab9c7261dce8645f4c7f420b2905a8e Mon Sep 17 00:00:00 2001 From: mathiasg Date: Thu, 23 Jan 2020 10:06:57 -0500 Subject: [PATCH] fix: tests --- smriprep/cli/run.py | 1 + smriprep/cli/tests/test_utils.py | 9 ++++----- smriprep/workflows/base.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/smriprep/cli/run.py b/smriprep/cli/run.py index 55b6a480e1..b59a80e874 100644 --- a/smriprep/cli/run.py +++ b/smriprep/cli/run.py @@ -284,6 +284,7 @@ def build_workflow(opts, retval): spaces = Spaces(output=opts.output_spaces) target_spaces = spaces.unique() if not target_spaces: + # no output spaces have been set - should this blow up? # Set the default template to 'MNI152NLin2009c' spaces.add_space('MNI152NLin2009cAsym', output=False) diff --git a/smriprep/cli/tests/test_utils.py b/smriprep/cli/tests/test_utils.py index 52b49b803d..44330f1043 100644 --- a/smriprep/cli/tests/test_utils.py +++ b/smriprep/cli/tests/test_utils.py @@ -1,5 +1,4 @@ """Test the output-spaces parser.""" -from collections import OrderedDict import pytest from .. import utils as u @@ -20,9 +19,9 @@ def test_output_spaces(monkeypatch): [('MNI152NLin2009cAsym', {'native': True})] assert u.output_space('MNI152NLin2009cAsym:res-2') == \ [('MNI152NLin2009cAsym', {'res': '2'})] - assert u.output_space('MNI152:res-1:res-2') == \ - [('MNI152', {'res': '1'}), ('MNI152', {'res': '2'})] - assert u.output_space('MNIInfant:res-2:cohort-1') == \ + assert u.output_space('MNI152NLin6Asym:res-1:res-2') == \ + [('MNI152NLin6Asym', {'res': '1'}), ('MNI152NLin6Asym', {'res': '2'})] + assert u.output_space('MNIInfant:res-2,cohort-1') == \ [('MNIInfant', {'res': '2', 'cohort': '1'})] with pytest.raises(ValueError): @@ -52,7 +51,7 @@ def test_template_parser(monkeypatch): u.ParseTemplates.set_nonstandard_spaces('func') assert u._template(['MNI152NLin2009cAsym:res-2', 'func']) == \ - [('MNI152NLin2009cAsym', {'res': '2'}), ('func', {})] + [('MNI152NLin2009cAsym', {'res': '2'}), ('func', {})] u.ParseTemplates.set_nonstandard_spaces(['func', 'fsnative']) assert u._template(['MNI152NLin2009cAsym:res-2', 'func', 'fsnative']) == \ diff --git a/smriprep/workflows/base.py b/smriprep/workflows/base.py index 7376bce154..879d3270df 100644 --- a/smriprep/workflows/base.py +++ b/smriprep/workflows/base.py @@ -311,7 +311,7 @@ def init_single_subject_wf( bids_info = pe.Node(BIDSInfo(bids_dir=layout.root), name='bids_info', run_without_submitting=True) - summary = pe.Node(SubjectSummary(output_spaces=list(spaces.unique('output'))), + summary = pe.Node(SubjectSummary(output_spaces=list(spaces.unique())), name='summary', run_without_submitting=True) about = pe.Node(AboutSummary(version=__version__,