Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
def create_simple_graph():
    return SimplifiedDotGraph({'node1', 'node2', 'node3'}, {
        Connection('node1', 'p1', 'node2', 'p21'),
        Connection('node3', 'p3', 'node2', 'p23'),
        Connection('node2', None, 'node3', None),
        Connection('node2', 'p2', 'node1', None)
    })
Esempio n. 6
0
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)
Esempio n. 7
0
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)
Esempio n. 8
0
def test_html_node():
    check(
        'data/html_node.dot',
        SimplifiedDotGraph({'node1', 'node2'},
                           {Connection('node1', None, 'node2', None)}))