()
| 922 | |
| 923 | |
| 924 | def test_linear_fusion_two_branches(): |
| 925 | tasks = [ |
| 926 | left_one := DataNode("left_one", "a"), |
| 927 | left_two := Task("left_two", func, left_one.ref()), |
| 928 | right_one := DataNode("right_one", "a"), |
| 929 | right_two := Task("right_two", func, right_one.ref()), |
| 930 | middle := Task("middle", func, right_two.ref(), left_two.ref()), |
| 931 | third := Task("third", func, middle.ref()), |
| 932 | Task("fourth", func, third.ref()), |
| 933 | ] |
| 934 | dsk = {t.key: t for t in tasks} |
| 935 | result = fuse_linear_task_spec(dsk, {"fourth"}) |
| 936 | assert "left_one-left_two" in result |
| 937 | assert "right_one-right_two" in result |
| 938 | assert isinstance(result["right_two"], Alias) |
| 939 | assert isinstance(result["left_two"], Alias) |
| 940 | assert isinstance(result["fourth"], Alias) |
| 941 | assert isinstance(result["third-fourth"], Task) |
| 942 | |
| 943 | |
| 944 | def test_linear_fusion_multiple_outputs(): |
nothing calls this directly
no test coverage detected