pytest-bdd icon indicating copy to clipboard operation
pytest-bdd copied to clipboard

Allow Examples table to include values not used in steps

Open hicksjduk opened this issue 5 years ago • 8 comments
trafficstars

See https://github.com/pytest-dev/pytest-bdd/issues/390 for a description of the error to which this is a fix.

hicksjduk avatar Sep 19 '20 10:09 hicksjduk

Codecov Report

Merging #391 (422dae6) into master (583910d) will increase coverage by 0.44%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #391      +/-   ##
==========================================
+ Coverage   95.51%   95.95%   +0.44%     
==========================================
  Files          50       50              
  Lines        1649     1656       +7     
  Branches      149      149              
==========================================
+ Hits         1575     1589      +14     
+ Misses         45       41       -4     
+ Partials       29       26       -3     
Impacted Files Coverage Δ
pytest_bdd/parser.py 99.54% <100.00%> (ø)
tests/feature/test_outline.py 100.00% <100.00%> (ø)
tests/feature/test_tags.py 100.00% <0.00%> (+3.84%) :arrow_up:
tests/conftest.py 100.00% <0.00%> (+22.22%) :arrow_up:
tests/utils.py 100.00% <0.00%> (+33.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 583910d...422dae6. Read the comment docs.

codecov[bot] avatar Sep 19 '20 10:09 codecov[bot]

@youtux, it seems that you were the last person to touch this code. Would you be able to review this PR, or else how do I request a review given that I don't have write access to the repo?

hicksjduk avatar Sep 21 '20 08:09 hicksjduk

@hicksjduk Could you please rename the pull request to something like "Allow store values in Examples not used in steps" to show the real value of this feature

@youtux Please review

elchupanebrej avatar Feb 10 '21 10:02 elchupanebrej

Done.

hicksjduk avatar Feb 10 '21 10:02 hicksjduk

Cucumber (gherkin lint) uses no-unused-variables rule to optionally raise on this. @youtux Do you think we need to make it an option?

Isn't this a rule in the linter that checks the implementation code? Not in the functionality that implements the gherkin bindings. I can't find any reference in the cucumber documentation to this rule.

hicksjduk avatar Aug 10 '21 08:08 hicksjduk

@hicksjduk Oleg means https://www.npmjs.com/package/gherkin-lint @olegpidsadnyi @hicksjduk please check #439 . User could explicitly decide to use this feature using new parameters in "scenario" and "scenarios". It also supersede this PR

elchupanebrej avatar Aug 10 '21 17:08 elchupanebrej

I think we should just allow examples to include values that are not used. I wouldn't make it an option, I find it unnecessary complication.

youtux avatar Oct 01 '21 17:10 youtux

@olegpidsadnyi please review

youtux avatar Oct 01 '21 18:10 youtux