def check(expected_dot_path, pipeline_path, detail_level, show_input_ports=False, show_output_ports=False): actual_dot = convert_to_dot(pipeline_path, detail_level, show_input_ports, show_output_ports) actual = SimplifiedDotGraph.from_dot(actual_dot) expected_dot = read_as_string(__name__, expected_dot_path) expected = SimplifiedDotGraph.from_dot(expected_dot) assert expected == actual, '{} != {}'.format(expected, actual)
def __check(expected_dot_path, oozie_xml_path, detail_level, show_input_ports=False, show_output_ports=False): actual_oozie_xml = read_as_string(__name__, oozie_xml_path) actual_dot = convert_oozie_to_dot(actual_oozie_xml, detail_level, show_input_ports, show_output_ports, True) actual = SimplifiedDotGraph.from_dot(actual_dot) expected_dot = read_as_string(__name__, expected_dot_path) expected = SimplifiedDotGraph.from_dot(expected_dot) assert expected == actual, 'Problem when analyzing file "{}", '\ 'namely: {} != {}'.format(expected_dot_path, expected, actual)
def check(relative_input_path, expected_graph): input_dot = read_as_string(__name__, relative_input_path) actual_graph = SimplifiedDotGraph.from_dot(input_dot) assert expected_graph == actual_graph, \ '{} != {}'.format(expected_graph, actual_graph)