Skip to content

Commit

Permalink
Make clearer what the test is asserting
Browse files Browse the repository at this point in the history
  • Loading branch information
jsa34 authored Dec 1, 2024
1 parent 6c4391a commit c7189fd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/feature/test_outline.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,10 @@ def _(site):


def test_variable_reuse(pytester):
"""Test example parameter reuse."""
"""
Test same example parameter name used for step args between calls
doesn't redefine example arg value.
"""

pytester.makefile(
".feature",
Expand Down Expand Up @@ -358,18 +361,22 @@ def test_variable_reuse(pytester):
def some_key_exists(key):
print(f"some {key} exists")
@when(parsers.parse('I print {css_id}'))
def css_id(css_id):
assert css_id in ('bar', 'bar2')
@when(parsers.parse('I echo {css_id}'))
def echo_val(css_id):
assert css_id in ('bar', 'bar2')
@when(parsers.re('I output "(?P<css_id>.+)"'))
def i_output(css_id):
assert css_id == 'some value'
@then('finish testing')
def i_output():
print("finished")
Expand Down

0 comments on commit c7189fd

Please sign in to comment.