Skip to content

Commit

Permalink
handle integers in step_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghesselink committed Oct 15, 2024
1 parent b34f1de commit 0621afa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions features/steps/thens/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 0621afa

Please sign in to comment.