Skip to content

Commit b908b84

Browse files
committed
fix: tests allows older networkx version and removes cli.help doctest
1 parent 65f25bc commit b908b84

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

nipype/interfaces/base.py

-14
Original file line numberDiff line numberDiff line change
@@ -1005,20 +1005,6 @@ class must be instantiated with a command argument
10051005
>>> cli.inputs.trait_get() #doctest: +SKIP
10061006
{'ignore_exception': False, 'args': '-al', 'environ': {'DISPLAY': ':1'}}
10071007
1008-
>>> cli.help()
1009-
Inputs
1010-
------
1011-
<BLANKLINE>
1012-
Optional:
1013-
args: Additional parameters to the command
1014-
environ: Environment variables (default={})
1015-
ignore_exception: Print an error message instead of throwing an exception in case the interface fails to run (default=False)
1016-
<BLANKLINE>
1017-
Outputs
1018-
-------
1019-
None
1020-
1021-
10221008
>>> cli.inputs.get_hashval()
10231009
({'ignore_exception': False, 'args': '-al', 'environ': {'DISPLAY': ':1'}}, 'b1faf85652295456a906f053d48daef6')
10241010

nipype/pipeline/plugins/base.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,10 @@ def _generate_dependency_list(self, graph):
319319
""" Generates a dependency list for a list of graphs.
320320
"""
321321
self.procs = graph.nodes()
322-
self.depidx = nx.to_scipy_sparse_matrix(graph, format='lil')
322+
try:
323+
self.depidx = nx.to_scipy_sparse_matrix(graph, format='lil')
324+
except:
325+
self.depidx = nx.to_scipy_sparse_matrix(graph)
323326
self.refidx = deepcopy(self.depidx)
324327
self.refidx.astype = np.int
325328
self.proc_done = np.zeros(len(self.procs), dtype=bool)

0 commit comments

Comments
 (0)