@@ -1009,7 +1009,6 @@ def test_var_spool_cwl_checker3() -> None:
1009
1009
def test_print_dot () -> None :
1010
1010
# print Workflow
1011
1011
cwl_path = get_data ("tests/wf/revsort.cwl" )
1012
- cwl_posix_path = Path (cwl_path ).as_posix ()
1013
1012
expected_dot = pydot .graph_from_dot_data (
1014
1013
"""
1015
1014
digraph {{
@@ -1023,10 +1022,10 @@ def test_print_dot() -> None:
1023
1022
rank=same,
1024
1023
style=dashed
1025
1024
];
1026
- "file://{cwl_posix_path}# workflow_input" [fillcolor="#94DDF4",
1025
+ "workflow_input" [fillcolor="#94DDF4",
1027
1026
label=workflow_input,
1028
1027
style=filled];
1029
- "file://{cwl_posix_path}# reverse_sort" [fillcolor="#94DDF4",
1028
+ "reverse_sort" [fillcolor="#94DDF4",
1030
1029
label=reverse_sort,
1031
1030
style=filled];
1032
1031
}}
@@ -1036,35 +1035,31 @@ def test_print_dot() -> None:
1036
1035
rank=same,
1037
1036
style=dashed
1038
1037
];
1039
- "file://{cwl_posix_path}# sorted_output" [fillcolor="#94DDF4",
1038
+ "sorted_output" [fillcolor="#94DDF4",
1040
1039
label=sorted_output,
1041
1040
style=filled];
1042
1041
}}
1043
- "file://{cwl_posix_path}# rev" [fillcolor=lightgoldenrodyellow,
1042
+ "rev" [fillcolor=lightgoldenrodyellow,
1044
1043
label=rev,
1045
1044
style=filled];
1046
- "file://{cwl_posix_path}# sorted" [fillcolor=lightgoldenrodyellow,
1045
+ "sorted" [fillcolor=lightgoldenrodyellow,
1047
1046
label=sorted,
1048
1047
style=filled];
1049
- "file://{cwl_posix_path}# rev" -> "file://{cwl_posix_path}# sorted";
1050
- "file://{cwl_posix_path}# sorted" -> "file://{cwl_posix_path}# sorted_output";
1051
- "file://{cwl_posix_path}# workflow_input" -> "file://{cwl_posix_path}# rev";
1052
- "file://{cwl_posix_path}# reverse_sort" -> "file://{cwl_posix_path}# sorted";
1048
+ "rev" -> "sorted";
1049
+ "sorted" -> "sorted_output";
1050
+ "workflow_input" -> "rev";
1051
+ "reverse_sort" -> "sorted";
1053
1052
}}
1054
- """ .format (
1055
- cwl_posix_path = cwl_posix_path
1056
- )
1053
+ """ .format ()
1057
1054
)[0 ]
1058
1055
stdout = StringIO ()
1059
1056
assert main (["--debug" , "--print-dot" , cwl_path ], stdout = stdout ) == 0
1060
1057
computed_dot = pydot .graph_from_dot_data (stdout .getvalue ())[0 ]
1061
1058
computed_edges = sorted (
1062
- (urlparse (source ).fragment , urlparse (target ).fragment )
1063
- for source , target in computed_dot .obj_dict ["edges" ]
1059
+ (source , target ) for source , target in computed_dot .obj_dict ["edges" ]
1064
1060
)
1065
1061
expected_edges = sorted (
1066
- (urlparse (source ).fragment , urlparse (target ).fragment )
1067
- for source , target in expected_dot .obj_dict ["edges" ]
1062
+ (source , target ) for source , target in expected_dot .obj_dict ["edges" ]
1068
1063
)
1069
1064
assert computed_edges == expected_edges
1070
1065
0 commit comments