예제 #1
0
def test_output():
    out_meta = get_all_components()["create_dict"].metadata.output
    assert out_meta[0].name == "trevisani"
    assert out_meta[0].type_hint is Any
    assert out_meta[1].name == "test"
    assert out_meta[1].type_hint is Any
    assert out_meta[2].name == "num"
    assert out_meta[2].type_hint is int
예제 #2
0
def test_input_list():
    all_input = get_all_components()["sum_num"].metadata.input_list
    assert all_input[0].name == "Input Number 1"
    assert all_input[0].var_name == "num_1"
    assert all_input[0].type_hint is int
    assert all_input[0].description == "First Number"
    assert all_input[1].name == "Input 2"
    assert all_input[1].var_name == "num_2"
    assert all_input[1].type_hint is int
    assert all_input[1].description == "Second Number"
예제 #3
0
def test_description():
    assert "Sum two numbers." in get_all_components()["sum_num"].description
예제 #4
0
def test_get_all_components():
    assert "sum_num" in get_all_components().keys()
예제 #5
0
def test_name():
    assert get_all_components()["sum_num"].func_name == "sum_num"
예제 #6
0
from arca.internals.component_internals import (ComponentMetadata,
                                                get_all_components)

mark_component = ComponentMetadata
all_components = get_all_components()