Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alternate step parsers (re in particular) #57

Open
gabeseltzer opened this issue Dec 3, 2024 · 0 comments
Open

Support alternate step parsers (re in particular) #57

gabeseltzer opened this issue Dec 3, 2024 · 0 comments

Comments

@gabeseltzer
Copy link

In short, the Two-way step navigation doesn't work with the re step parameter parser.

My team tried out the re step parser (see Behave Docs). I'm able to run my tests as expected, but if I look at the .feature file, the steps that make use of the re parser are shown in red and can't be matched to their step definitions (ie, pressing F12 doesn't take me to the definitions).

# myfeature.feature
Feature: my feature
    Scenario: check the camera
         Given the camera is enabled
         Then the camera is enabled
# steps.py
use_step_matcher("re")
@given("the camera is (?P<status>enabled|disabled)")
def given_camera_status(context: Context, status: str) -> None:
    # Do some stuff

@then("the camera is (?P<status>enabled|disabled|disconnected)")
def then_camera_status(context: Context, status: str) -> None:
    # Do some stuff

Describe the solution you'd like
I'd love to be able to use Two-way step navigation with my regex parameter steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant