Пример #1
0
def step_impl(context: Context, root_label: RootLabel, type_label: str):
    role_labels = [parse_label(s) for s in parse_list(context.table)]
    actuals = [
        t.get_label() for t in context.get_thing_type(
            root_label, type_label).as_remote(context.tx()).get_plays()
    ]
    for role_label in role_labels:
        assert_that(role_label, not_(is_in(actuals)))
Пример #2
0
def step_impl(context: Context, root_label: RootLabel, type_label: str):
    attribute_labels = [parse_label(s) for s in parse_list(context.table)]
    actuals = [
        t.get_label() for t in context.get_thing_type(
            root_label, type_label).as_remote(context.tx()).get_owns()
    ]
    for attribute_label in attribute_labels:
        assert_that(actuals, not_(has_item(attribute_label)))
Пример #3
0
def step_impl(context: Context, root_label: RootLabel, type_label: str):
    sub_labels = [parse_label(s) for s in parse_list(context.table)]
    actuals = [
        t.get_label() for t in context.get_thing_type(
            root_label, type_label).as_remote(context.tx()).get_subtypes()
    ]
    for sub_label in sub_labels:
        assert_that(actuals, has_item(sub_label))
Пример #4
0
def step_impl(context: Context):
    sub_labels = [parse_label(s) for s in parse_list(context.table)]
    actuals = [
        t.get_label()
        for t in context.tx().concepts().get_root_thing_type().as_remote(
            context.tx()).get_subtypes()
    ]
    for sub_label in sub_labels:
        assert_that(sub_label, not_(is_in(actuals)))
def step_impl(context: Context, relation_label: str, role_label: str):
    sub_labels = [parse_label(s) for s in parse_list(context.table)]
    actuals = get_actual_related_role_subtypes_scoped_labels(
        context, relation_label, role_label)
    for sub_label in sub_labels:
        assert_that(actuals, not_(has_item(sub_label)))
def step_impl(context: Context, relation_label: str, role_label: str):
    player_labels = [parse_label(s) for s in parse_list(context.table)]
    actuals = get_actual_related_role_players_scoped_labels(
        context, relation_label, role_label)
    for player_label in player_labels:
        assert_that(actuals, has_item(player_label))
Пример #7
0
 def __init__(self, label: str):
     self.label = parse_label(label)
Пример #8
0
def step_impl(context: Context, type_label: str, value_type: str):
    sub_labels = [parse_label(s) for s in parse_list(context.table)]
    attribute_type = attribute_type_as_value_type(context, type_label, parse_value_type(value_type))
    actuals = list(map(lambda tt: tt.get_label(), attribute_type.as_remote(context.tx()).get_subtypes()))
    for sub_label in sub_labels:
        assert_that(sub_label, not_(is_in(actuals)))
Пример #9
0
def step_impl(context: Context, type_label: str):
    owner_labels = [parse_label(s) for s in parse_list(context.table)]
    attribute_type = context.tx().concepts().get_attribute_type(type_label)
    actuals = list(map(lambda tt: tt.get_label(), attribute_type.as_remote(context.tx()).get_owners(only_key=False)))
    for owner_label in owner_labels:
        assert_that(actuals, not_(has_item(owner_label)))