Exemplo n.º 1
0
def test_compiler_function_output(patch, compiler, tree):
    patch.object(JSONCompiler, 'output')
    patch.object(Objects, 'types')
    result = compiler.function_output(tree)
    Objects.types.assert_called_with(tree.function_output.types)
    assert result == [Objects.types()['types']]
Exemplo n.º 2
0
def test_compiler_function_output(patch, compiler, tree):
    patch.object(JSONCompiler, "output")
    patch.object(Objects, "types")
    result = compiler.function_output(tree)
    Objects.types.assert_called_with(tree.function_output.types)
    assert result == [Objects.types()["types"]]