@@ -52,7 +52,7 @@ class spec(nib.TraitedSpec):
5252
5353
5454def test_TraitedSpec_tab_completion ():
55- bet_nd = Node (fsl .BET (), name = 'bet' )
55+ bet_nd = Node (fsl .BET (), name = 'bet' )
5656 bet_interface = fsl .BET ()
5757 bet_inputs = bet_nd .inputs .class_editable_traits ()
5858 bet_outputs = bet_nd .outputs .class_editable_traits ()
@@ -87,28 +87,28 @@ def extract_func(list_out):
8787
8888 # Define interface
8989 func_interface = Function (input_names = ["list_out" ],
90- output_names = ["out_file" ,"another_file" ],
91- function = extract_func )
90+ output_names = ["out_file" , "another_file" ],
91+ function = extract_func )
9292 # Define node
9393 list_extract = Node (Function (
94- input_names = ["list_out" ],output_names = ["out_file" ],
94+ input_names = ["list_out" ], output_names = ["out_file" ],
9595 function = extract_func ), name = "list_extract" )
9696
9797 # Check __all__ for interface inputs
98- expected_input = sorted (list_extract .inputs .editable_traits ())
99- assert (sorted (func_interface .inputs .__all__ ) == expected_input )
98+ expected_input = set (list_extract .inputs .editable_traits ())
99+ assert (set (func_interface .inputs .__all__ ) == expected_input )
100100
101101 # Check __all__ for node inputs
102- assert (sorted (list_extract .inputs .__all__ ) == expected_input )
102+ assert (set (list_extract .inputs .__all__ ) == expected_input )
103103
104104 # Check __all__ for node outputs
105- expected_output = sorted (list_extract .outputs .editable_traits ())
106- assert (sorted (list_extract .outputs .__all__ ) == expected_output )
105+ expected_output = set (list_extract .outputs .editable_traits ())
106+ assert (set (list_extract .outputs .__all__ ) == expected_output )
107107
108108 # Add trait and retest
109109 list_extract ._interface ._output_names .append ('added_out_trait' )
110- expected_output = sorted ([ 'added_out_trait' , * expected_output ] )
111- assert (sorted (list_extract .outputs .__all__ ) == expected_output )
110+ expected_output . add ( 'added_out_trait' )
111+ assert (set (list_extract .outputs .__all__ ) == expected_output )
112112
113113
114114def test_TraitedSpec_logic ():
0 commit comments