File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -253,18 +253,11 @@ class BIDSDataGrabber(SimpleInterface):
253253 >>> bids_src.inputs.subject_data = bids_collect_data(
254254 ... str(datadir / 'ds114'), '01', bids_validate=False)[0]
255255 >>> bids_src.inputs.subject_id = '01'
256- >>> bids_src._require_t1w
257- True
258- >>> bids_src._require_funcs
259- True
260256 >>> res = bids_src.run()
261257 >>> res.outputs.t1w # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
262258 ['.../ds114/sub-01/ses-retest/anat/sub-01_ses-retest_T1w.nii.gz',
263259 '.../ds114/sub-01/ses-test/anat/sub-01_ses-test_T1w.nii.gz']
264260
265- >>> bids_src = BIDSDataGrabber(require_t1w=False)
266- >>> bids_src._require_t1w
267- False
268261 """
269262
270263 input_spec = _BIDSDataGrabberInputSpec
Original file line number Diff line number Diff line change @@ -793,3 +793,16 @@ def test_fsdir_min_version(tmp_path, min_version):
793793 assert not patched_subject_dir .exists ()
794794 else :
795795 assert patched_subject_dir .exists ()
796+
797+
798+ def test_BIDSDataGrabber ():
799+ x = bintfs .BIDSDataGrabber (anat_only = True )
800+ assert x ._require_t1w is True
801+ assert x ._require_funcs is False
802+
803+ x = bintfs .BIDSDataGrabber (anat_only = False , require_t1w = False )
804+ assert x ._require_t1w is False
805+ assert x ._require_funcs is True
806+
807+ x = bintfs .BIDSDataGrabber (anat_derivatives = 'derivatives' )
808+ assert x ._require_t1w is False
You can’t perform that action at this time.
0 commit comments