Use a match statement to dispatch on gherkin Child fields#822
Open
Pierre-Sassoulas wants to merge 2 commits into
Open
Use a match statement to dispatch on gherkin Child fields#822Pierre-Sassoulas wants to merge 2 commits into
Pierre-Sassoulas wants to merge 2 commits into
Conversation
A gherkin Child has exactly one of background/rule/scenario set; class patterns make that dispatch explicit and replace the truthiness checks with type matching.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## chore/dep-cves-and-py3.15 #822 +/- ##
=============================================================
+ Coverage 96.08% 96.10% +0.02%
=============================================================
Files 55 55
Lines 2398 2412 +14
Branches 136 136
=============================================================
+ Hits 2304 2318 +14
Misses 57 57
Partials 37 37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A Child with none of background/rule/scenario set (a child kind a future gherkin version could introduce) must be skipped by FeatureParser.parse. No real feature file can produce one today, so the test appends a synthetic empty Child to the parsed document.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opinionated change following #821. A gherkin Child has exactly one of background/rule/scenario set; class patterns make that dispatch explicit and replace the truthiness checks with type matching.