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

Fix step function resolution logic #544

Merged
merged 21 commits into from
Jul 27, 2022
Merged

Fix step function resolution logic #544

merged 21 commits into from
Jul 27, 2022

Conversation

youtux
Copy link
Contributor

@youtux youtux commented Jul 23, 2022

The step function resolution logic has long been broken. The refactor in #534 made this bug more visible, since it treats all step definitions with and without parsers as the same (previously, definitions without parsers had higher priority).

Also, we now require pytest>=6.2 (I needed to use some newer pytest APIs).

Fixes #542.

elchupanebrej pushed a commit to elchupanebrej/pytest-bdd-ng that referenced this pull request Jul 24, 2022
elchupanebrej added a commit to elchupanebrej/pytest-bdd-ng that referenced this pull request Jul 24, 2022
* Add the possibility to register imported steps
* Add test step definition hierarchy overlapping from pytest-dev#544
@codecov
Copy link

codecov bot commented Jul 25, 2022

Codecov Report

Merging #544 (a6de47a) into master (96cb467) will increase coverage by 2.71%.
The diff coverage is 98.05%.

@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
+ Coverage   92.46%   95.17%   +2.71%     
==========================================
  Files          49       48       -1     
  Lines        1685     1680       -5     
  Branches      208      206       -2     
==========================================
+ Hits         1558     1599      +41     
+ Misses         90       51      -39     
+ Partials       37       30       -7     
Impacted Files Coverage Δ
tests/args/test_common.py 100.00% <ø> (ø)
pytest_bdd/steps.py 95.71% <92.00%> (-0.65%) ⬇️
pytest_bdd/generation.py 89.58% <100.00%> (+6.09%) ⬆️
pytest_bdd/scenario.py 92.73% <100.00%> (+3.92%) ⬆️
tests/conftest.py 100.00% <100.00%> (ø)
tests/feature/test_outline.py 100.00% <100.00%> (ø)
tests/feature/test_scenario.py 100.00% <100.00%> (ø)
tests/feature/test_scenarios.py 100.00% <100.00%> (ø)
tests/feature/test_wrong.py 100.00% <100.00%> (ø)
tests/generation/test_generate_missing.py 100.00% <100.00%> (ø)
... and 13 more

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 96cb467...a6de47a. Read the comment docs.

@youtux youtux marked this pull request as ready for review July 27, 2022 15:05
@youtux youtux requested a review from The-Compiler July 27, 2022 18:31
@youtux
Copy link
Contributor Author

youtux commented Jul 27, 2022

@The-Compiler would you feel like reviewing the part that uses pytest's internals?

@youtux youtux merged commit 15e6e69 into master Jul 27, 2022
@youtux youtux deleted the fix-542 branch July 27, 2022 19:30
pbarnajc pushed a commit to pbarnajc/pytest-bdd that referenced this pull request Jan 31, 2023
pbarnajc pushed a commit to pbarnajc/pytest-bdd that referenced this pull request Feb 1, 2023
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.

Reusable step functions regression: Specific step doesn't override generic one anymore
1 participant