@@ -757,11 +757,81 @@ def test_wf_ndst_6(plugin):
757
757
assert wf .output_dir .exists ()
758
758
759
759
760
+ @pytest .mark .parametrize ("plugin" , Plugins )
761
+ def test_wf_ndst_7 (plugin ):
762
+ """ workflow with two tasks, outer splitter and (full) combiner for first node only"""
763
+ wf = Workflow (name = "wf_ndst_6" , input_spec = ["x" , "y" ])
764
+ wf .add (multiply (name = "mult" , x = wf .lzin .x , y = wf .lzin .y ).split ("x" ).combine ("x" ))
765
+ wf .add (identity (name = "iden" , x = wf .mult .lzout .out ))
766
+ wf .inputs .x = [1 , 2 , 3 ]
767
+ wf .inputs .y = 11
768
+ wf .set_output ([("out" , wf .iden .lzout .out )])
769
+ wf .plugin = plugin
770
+
771
+ with Submitter (plugin = plugin ) as sub :
772
+ sub (wf )
773
+
774
+ results = wf .result ()
775
+ assert results .output .out [0 ] == [11 , 22 , 33 ]
776
+
777
+ # checking the output directory
778
+ assert wf .output_dir .exists ()
779
+
780
+
781
+ @pytest .mark .parametrize ("plugin" , Plugins )
782
+ def test_wf_ndst_8 (plugin ):
783
+ """ workflow with two tasks, outer splitter and (partial) combiner for first task only"""
784
+ wf = Workflow (name = "wf_ndst_6" , input_spec = ["x" , "y" ])
785
+ wf .add (
786
+ multiply (name = "mult" , x = wf .lzin .x , y = wf .lzin .y ).split (["x" , "y" ]).combine ("x" )
787
+ )
788
+ wf .add (identity (name = "iden" , x = wf .mult .lzout .out ))
789
+ wf .inputs .x = [1 , 2 , 3 ]
790
+ wf .inputs .y = [11 , 12 ]
791
+ wf .set_output ([("out" , wf .iden .lzout .out )])
792
+ wf .plugin = plugin
793
+
794
+ with Submitter (plugin = plugin ) as sub :
795
+ sub (wf )
796
+
797
+ results = wf .result ()
798
+ assert results .output .out [0 ] == [11 , 22 , 33 ]
799
+ assert results .output .out [1 ] == [12 , 24 , 36 ]
800
+
801
+ # checking the output directory
802
+ assert wf .output_dir .exists ()
803
+
804
+
805
+ @pytest .mark .parametrize ("plugin" , Plugins )
806
+ def test_wf_ndst_9 (plugin ):
807
+ """ workflow with two tasks, outer splitter and (full) combiner for first task only"""
808
+ wf = Workflow (name = "wf_ndst_6" , input_spec = ["x" , "y" ])
809
+ wf .add (
810
+ multiply (name = "mult" , x = wf .lzin .x , y = wf .lzin .y )
811
+ .split (["x" , "y" ])
812
+ .combine (["x" , "y" ])
813
+ )
814
+ wf .add (identity (name = "iden" , x = wf .mult .lzout .out ))
815
+ wf .inputs .x = [1 , 2 , 3 ]
816
+ wf .inputs .y = [11 , 12 ]
817
+ wf .set_output ([("out" , wf .iden .lzout .out )])
818
+ wf .plugin = plugin
819
+
820
+ with Submitter (plugin = plugin ) as sub :
821
+ sub (wf )
822
+
823
+ results = wf .result ()
824
+ assert results .output .out [0 ] == [11 , 12 , 22 , 24 , 33 , 36 ]
825
+
826
+ # checking the output directory
827
+ assert wf .output_dir .exists ()
828
+
829
+
760
830
# workflows with structures A -> C, B -> C
761
831
762
832
763
833
@pytest .mark .parametrize ("plugin" , Plugins )
764
- def test_wf_st_7 (plugin ):
834
+ def test_wf_3nd_st_1 (plugin ):
765
835
""" workflow with three tasks, third one connected to two previous tasks,
766
836
splitter on the workflow level
767
837
"""
@@ -789,7 +859,7 @@ def test_wf_st_7(plugin):
789
859
790
860
791
861
@pytest .mark .parametrize ("plugin" , Plugins )
792
- def test_wf_ndst_7 (plugin ):
862
+ def test_wf_3nd_ndst_1 (plugin ):
793
863
""" workflow with three tasks, third one connected to two previous tasks,
794
864
splitter on the tasks levels
795
865
"""
@@ -813,7 +883,7 @@ def test_wf_ndst_7(plugin):
813
883
814
884
815
885
@pytest .mark .parametrize ("plugin" , Plugins )
816
- def test_wf_st_8 (plugin ):
886
+ def test_wf_3nd_st_2 (plugin ):
817
887
""" workflow with three tasks, third one connected to two previous tasks,
818
888
splitter and partial combiner on the workflow level
819
889
"""
@@ -844,7 +914,7 @@ def test_wf_st_8(plugin):
844
914
845
915
846
916
@pytest .mark .parametrize ("plugin" , Plugins )
847
- def test_wf_ndst_8 (plugin ):
917
+ def test_wf_3nd_ndst_2 (plugin ):
848
918
""" workflow with three tasks, third one connected to two previous tasks,
849
919
splitter and partial combiner on the tasks levels
850
920
"""
@@ -873,7 +943,7 @@ def test_wf_ndst_8(plugin):
873
943
874
944
875
945
@pytest .mark .parametrize ("plugin" , Plugins )
876
- def test_wf_st_9 (plugin ):
946
+ def test_wf_3nd_st_3 (plugin ):
877
947
""" workflow with three tasks, third one connected to two previous tasks,
878
948
splitter and partial combiner (from the second task) on the workflow level
879
949
"""
@@ -904,7 +974,7 @@ def test_wf_st_9(plugin):
904
974
905
975
906
976
@pytest .mark .parametrize ("plugin" , Plugins )
907
- def test_wf_ndst_9 (plugin ):
977
+ def test_wf_3nd_ndst_3 (plugin ):
908
978
""" workflow with three tasks, third one connected to two previous tasks,
909
979
splitter and partial combiner (from the second task) on the tasks levels
910
980
"""
@@ -934,7 +1004,7 @@ def test_wf_ndst_9(plugin):
934
1004
935
1005
936
1006
@pytest .mark .parametrize ("plugin" , Plugins )
937
- def test_wf_st_10 (plugin ):
1007
+ def test_wf_3nd_st_4 (plugin ):
938
1008
""" workflow with three tasks, third one connected to two previous tasks,
939
1009
splitter and full combiner on the workflow level
940
1010
"""
@@ -964,7 +1034,7 @@ def test_wf_st_10(plugin):
964
1034
965
1035
966
1036
@pytest .mark .parametrize ("plugin" , Plugins )
967
- def test_wf_ndst_10 (plugin ):
1037
+ def test_wf_3nd_ndst_4 (plugin ):
968
1038
""" workflow with three tasks, third one connected to two previous tasks,
969
1039
splitter and full combiner on the tasks levels
970
1040
"""
0 commit comments