@@ -43,7 +43,7 @@ def _list_outputs(self):
43
43
44
44
45
45
def test_init ():
46
- with pytest .raises (Exception ): pe .Workflow ()
46
+ with pytest .raises (TypeError ): pe .Workflow ()
47
47
pipe = pe .Workflow (name = 'pipe' )
48
48
assert type (pipe ._graph ) == nx .DiGraph
49
49
@@ -326,11 +326,16 @@ def test_doubleconnect():
326
326
flow1 = pe .Workflow (name = 'test' )
327
327
flow1 .connect (a , 'a' , b , 'a' )
328
328
x = lambda : flow1 .connect (a , 'b' , b , 'a' )
329
- with pytest .raises (Exception ): x ()
329
+ with pytest .raises (Exception ) as excinfo :
330
+ x ()
331
+ assert "Trying to connect" in str (excinfo .value )
332
+
330
333
c = pe .Node (IdentityInterface (fields = ['a' , 'b' ]), name = 'c' )
331
334
flow1 = pe .Workflow (name = 'test2' )
332
335
x = lambda : flow1 .connect ([(a , c , [('b' , 'b' )]), (b , c , [('a' , 'b' )])])
333
- with pytest .raises (Exception ): x ()
336
+ with pytest .raises (Exception ) as excinfo :
337
+ x ()
338
+ assert "Trying to connect" in str (excinfo .value )
334
339
335
340
336
341
'''
@@ -476,8 +481,9 @@ def func1(in1):
476
481
name = 'n1' )
477
482
n2 .inputs .in1 = [[1 , [2 ]], 3 , [4 , 5 ]]
478
483
479
- with pytest .raises (Exception ): n2 .run ()
480
-
484
+ with pytest .raises (Exception ) as excinfo :
485
+ n2 .run ()
486
+ assert "can only concatenate list" in str (excinfo .value )
481
487
482
488
483
489
def test_node_hash (tmpdir ):
0 commit comments