Esempio n. 1
0
def test_transformer_implicit_output(tree):
    """
    Ensures Transformer.implicit_output adds an output tree when needed
    """
    tree.service_fragment.output = None
    tree.service_fragment.children = []
    Transformer.implicit_output(tree)
    expected = Tree('output', [tree.service_fragment.command.child()])
    assert tree.service_fragment.children[-1] == expected
Esempio n. 2
0
def test_transformer_implicit_output_none(tree):
    assert Transformer.implicit_output(tree) is None