コード例 #1
0
ファイル: test_engine.py プロジェクト: imalone/nipype
def test_workflow_add():
    from nipype.interfaces.utility import IdentityInterface as ii
    n1 = pe.Node(ii(fields=['a', 'b']), name='n1')
    n2 = pe.Node(ii(fields=['c', 'd']), name='n2')
    n3 = pe.Node(ii(fields=['c', 'd']), name='n1')
    w1 = pe.Workflow(name='test')
    w1.connect(n1, 'a', n2, 'c')
    for node in [n1, n2, n3]:
        with pytest.raises(IOError): w1.add_nodes([node])
    with pytest.raises(IOError): w1.connect([(w1, n2, [('n1.a', 'd')])])
コード例 #2
0
ファイル: test_engine.py プロジェクト: jvarada/nipype
def test_workflow_add():
    from nipype.interfaces.utility import IdentityInterface as ii
    n1 = pe.Node(ii(fields=['a', 'b']), name='n1')
    n2 = pe.Node(ii(fields=['c', 'd']), name='n2')
    n3 = pe.Node(ii(fields=['c', 'd']), name='n1')
    w1 = pe.Workflow(name='test')
    w1.connect(n1, 'a', n2, 'c')
    yield assert_raises, IOError, w1.add_nodes, [n1]
    yield assert_raises, IOError, w1.add_nodes, [n2]
    yield assert_raises, IOError, w1.add_nodes, [n3]
    yield assert_raises, IOError, w1.connect, [(w1, n2, [('n1.a', 'd')])]
コード例 #3
0
def test_workflow_add():
    from nipype.interfaces.utility import IdentityInterface as ii
    n1 = pe.Node(ii(fields=['a', 'b']), name='n1')
    n2 = pe.Node(ii(fields=['c', 'd']), name='n2')
    n3 = pe.Node(ii(fields=['c', 'd']), name='n1')
    w1 = pe.Workflow(name='test')
    w1.connect(n1, 'a', n2, 'c')
    yield assert_raises, IOError, w1.add_nodes, [n1]
    yield assert_raises, IOError, w1.add_nodes, [n2]
    yield assert_raises, IOError, w1.add_nodes, [n3]
    yield assert_raises, IOError, w1.connect, [(w1, n2, [('n1.a', 'd')])]