Skip to content

Commit be587bb

Browse files
authored
Merge pull request #302 from poldracklab/oesteban-patch-1
[TST] Add test on BIDSInfo interface
2 parents e89ebb1 + 06bbcb7 commit be587bb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

niworkflows/interfaces/bids.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,23 @@ class BIDSInfo(SimpleInterface):
103103
task = covertverbgeneration
104104
<BLANKLINE>
105105
106+
>>> from bids import BIDSLayout
107+
>>> bids_info = BIDSInfo()
108+
>>> bids_info.layout = BIDSLayout(str(datadir / 'ds114'), validate=False)
109+
>>> bids_info.inputs.in_file = '''\
110+
sub-01/func/ses-retest/sub-01_ses-retest_task-covertverbgeneration_bold.nii.gz'''
111+
>>> res = bids_info.run()
112+
>>> res.outputs
113+
<BLANKLINE>
114+
acq = <undefined>
115+
rec = <undefined>
116+
run = <undefined>
117+
session = retest
118+
subject = 01
119+
suffix = bold
120+
task = covertverbgeneration
121+
<BLANKLINE>
122+
106123
"""
107124
input_spec = BIDSInfoInputSpec
108125
output_spec = BIDSInfoOutputSpec

0 commit comments

Comments
 (0)