Exemplo n.º 1
0
def _build_target_dom_to_doc_dom(unit_node, source_dom, target_dom):
    source_dom_to_doc_dom = _map_source_dom_to_doc_dom(unit_node, source_dom)
    target_dom_to_source_dom = _map_target_dom_to_source_dom(source_dom, target_dom)
    return misc.compose_mappings(target_dom_to_source_dom, source_dom_to_doc_dom)
Exemplo n.º 2
0
def _build_target_dom_to_doc_dom(unit_node, source_dom, target_dom):
    source_dom_to_doc_dom = _map_source_dom_to_doc_dom(unit_node, source_dom)
    target_dom_to_source_dom = _map_target_dom_to_source_dom(
        source_dom, target_dom)
    return misc.compose_mappings(target_dom_to_source_dom,
                                 source_dom_to_doc_dom)
Exemplo n.º 3
0
def test_compose_mappings():
    assert composed_mapping == misc.compose_mappings(left_mapping, right_mapping)