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

IMPLEMENT #1164: Support And-Step as initial Scenario step if Background Steps exist #1097

Merged
merged 2 commits into from
May 26, 2024

Conversation

aneeshdurg
Copy link
Contributor

Some gherkin tests in the wild have no prior step to an And, but do have a Background (for example, openCypher's tck Match5.feature). This change gives behave the ability to correctly parse such files.

@aneeshdurg
Copy link
Contributor Author

@jenisys is there something I can do to help get this merged?

@aneeshdurg aneeshdurg changed the title Support 'And' step with no prior step if there's a 'Background' FIX #1164: Support 'And' step with no prior step if there's a 'Background' Mar 12, 2024
@jenisys jenisys force-pushed the main branch 2 times, most recently from 0a4d73b to 2c11d2e Compare May 14, 2024 22:39
@jenisys jenisys force-pushed the main branch 2 times, most recently from 3e51dda to c6ab01c Compare May 26, 2024 15:00
@jenisys jenisys changed the title FIX #1164: Support 'And' step with no prior step if there's a 'Background' IMPLEMENT #1164: Support And-Step as initial Scenario step if Background Steps exist May 26, 2024
@jenisys jenisys merged commit 96c22d9 into behave:main May 26, 2024
jenisys added a commit that referenced this pull request May 26, 2024
Usable if any background step with Given/When/Then step_type exists.

parser:

* Extract-method "_select_last_background_step_type()" for core functionality.
* Extend functionality to cover all cases with/without bachground steps

tests/unit/test_parser.py:

* Extend tests and move them into "TestParser4AndButSteps" class
* CLEANUP: "test_parser.py" -- Simplify imports
jenisys added a commit that referenced this pull request May 26, 2024
@jenisys
Copy link
Member

jenisys commented May 26, 2024

INTEGRATED INTO: behave v1.2.7.dev6

@aneeshdurg aneeshdurg deleted the support_and_after_background branch May 26, 2024 19:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants