File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2222#
2323"""Test parser."""
2424from packaging .version import Version
25+ from pkg_resources import resource_filename as pkgrf
2526import pytest
26- from ..parser import _build_parser
27+ from ..parser import _build_parser , parse_args
2728from .. import version as _version
2829from ... import config
30+ from ...tests .test_config import _reset_config
2931
3032MIN_ARGS = ["data/" , "out/" , "participant" ]
3133
@@ -136,3 +138,13 @@ def _mock_is_bl(*args, **kwargs):
136138 assert ("FLAGGED" in captured ) is flagged [0 ]
137139 if flagged [0 ]:
138140 assert (flagged [1 ] or "reason: unknown" ) in captured
141+
142+
143+ def test_parse_args (tmp_path ):
144+ """Basic smoke test showing that our parse_args() function
145+ implements the BIDS App protocol"""
146+ bids_dir = pkgrf ('fmriprep' , 'data/tests/ds000005' )
147+
148+ parse_args (args = [bids_dir , str (tmp_path ), "participant" ])
149+ assert config .execution .layout .root == bids_dir
150+ _reset_config ()
You can’t perform that action at this time.
0 commit comments