Exemplo n.º 1
0
def test_all_diagram_items_have_a_model_element_mapping(item_class):
    if item_class in (Box, Line, Ellipse, CommentLineItem):
        assert not get_model_element(item_class)
    else:
        assert get_model_element(item_class)
Exemplo n.º 2
0
def all_presented_elements(module):
    return (get_model_element(getattr(module, name)) for name in dir(module)
            if not name.startswith("_") and get_model_element(
                getattr(module, name) not in (None, UML.Comment)))
Exemplo n.º 3
0
def all_items_and_elements():
    return [[cls, get_model_element(cls)]
            for cls in diagramitems.__dict__.values()
            if _issubclass(cls, Presentation) and get_model_element(cls)]
Exemplo n.º 4
0
def test_all_diagram_items_have_a_model_element_mapping(item_class):
    if item_class is CommentLineItem:
        assert not get_model_element(item_class)
    else:
        assert get_model_element(item_class)