diff --git a/features/steps/thens/attributes.py b/features/steps/thens/attributes.py index f113d583..3da93fc2 100644 --- a/features/steps/thens/attributes.py +++ b/features/steps/thens/attributes.py @@ -140,6 +140,8 @@ def step_impl(context, inst, constraint, num): @gherkin_ifc.step('The characters must be within the official encoding character set') def step_impl(context, inst): valid_chars = set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_$") + if not isinstance(inst, str): + return invalid_guid_chars = [char for char in inst if char not in valid_chars] if invalid_guid_chars: yield ValidationOutcome(inst=inst, expected="^[0-9A-Za-z_$]+$", observed=invalid_guid_chars, severity=OutcomeSeverity.ERROR)