Beispiel #1
0
def before_feature(context: Context, feature: Feature):
    for tag in feature.tags:
        parts = tag.split(".")
        if parts[0] == "uses":
            val = context
            for attr in parts[1:]:
                val = getattr(val, attr, None)
                if val is None:
                    feature.skip(
                        reason="Skipped because tag value was None: {}".format(
                            tag))
Beispiel #2
0
def before_feature(context: Context, feature: Feature):
    reason = _should_skip_tags(context, feature.tags)
    if reason:
        feature.skip(reason=reason)