Skip to content

Commit 3029bd6

Browse files
authored
Merge pull request #3224 from effigies/doctest/optional_pybids
DOC: Skip BIDSDataGrabber doctest if pybids is missing
2 parents 742e739 + dc230ef commit 3029bd6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

nipype/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
def add_np(doctest_namespace):
1818
doctest_namespace["np"] = numpy
1919
doctest_namespace["os"] = os
20+
doctest_namespace["pytest"] = pytest
2021
doctest_namespace["datadir"] = data_dir
2122

2223

nipype/interfaces/io.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2895,6 +2895,14 @@ class BIDSDataGrabber(LibraryBaseInterface, IOBase):
28952895
28962896
Examples
28972897
--------
2898+
2899+
.. setup::
2900+
2901+
>>> try:
2902+
... import bids
2903+
... except ImportError:
2904+
... pytest.skip()
2905+
28982906
By default, the BIDSDataGrabber fetches anatomical and functional images
28992907
from a project, and makes BIDS entities (e.g. subject) available for
29002908
filtering outputs.

0 commit comments

Comments
 (0)