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

Update dependency pytest_bdd to v8 #4094

Closed
wants to merge 1 commit into from
Closed

Conversation

bcgov-wps
Copy link
Collaborator

@bcgov-wps bcgov-wps commented Nov 16, 2024

This PR contains the following updates:

Package Type Update Change
pytest_bdd (source) dev major ^5 -> ^8.0.0

Release Notes

pytest-dev/pytest-bdd (pytest_bdd)

v8.0.0

Compare Source

Added
+++++

  • Gherkin keyword aliases can now be used and correctly reported in json and terminal output (see Keywords <https://cucumber.io/docs/gherkin/reference/#keywords>_ for permitted list).
  • Added localization support. The language of the feature file can be specified using the # language: <language> directive at the beginning of the file.
  • Rule keyword can be used in feature files (see Rule <https://cucumber.io/docs/gherkin/reference/#rule>_)
  • Added support for multiple example tables
  • Added filtering by tags against example tables
  • Since the 7.x series:
    • Tags can now be on multiple lines (stacked)
    • Continuation of steps using asterisks (*) instead of And/But supported.
    • Added datatable argument for steps that contain a datatable (see Data Tables <https://cucumber.io/docs/gherkin/reference/#data-tables>_).
    • Added docstring argument for steps that contain a docstring (see Doc Strings <https://cucumber.io/docs/gherkin/reference/#doc-strings>_).

Changed
+++++++

  • Changelog format updated to follow Keep a Changelog <https://keepachangelog.com/en/1.1.0/>_.

  • Text after the # character is no longer stripped from the Scenario and Feature name.

  • Since the 7.x series:

    • Use the gherkin-official <https://pypi.org/project/gherkin-official/>_ parser, replacing the custom parsing logic. This will make pytest-bdd more compatible with the Gherkin specification.
    • Multiline steps must now always use triple-quotes for the additional lines.
    • All feature files must now use the keyword Feature: to be considered valid.
    • Tags can no longer have spaces (e.g. @tag one and @tag two are no longer valid).
    • Text after the # character is no longer stripped from the Step name.
    • Multiline strings no longer match name based on multiple lines - only on the actual step text on the step line.

Removed
+++++++

  • Dropped support for python 3.8. Supported python versions: 3.9, 3.10, 3.11, 3.12, 3.13.

  • Since the 7.x series:

    • Drop compatibility with pytest < 7.0.0.

Fixed
+++++

  • Since the 7.x series:

    • Updated documentation to clarify that --gherkin-terminal-reporter needs to be used with -v or -vv.

v7.3.0

Compare Source

  • Fix an issue when only the first Step would inject a fixture, while later steps would not be able to.
  • Test against the latest versions of pytest (8.2, 8.3).

v7.2.0

Compare Source

  • Fix compatibility issue with Python 3.13.
  • Declare compatibility with Python 3.13.

v7.1.2

Compare Source

  • Address another compatibility issue with pytest 8.1 (fixture registration). #&#8203;680 <https://github.com/pytest-dev/pytest-bdd/pull/680>_

v7.1.1

  • Address a bug introduced in pytest-bdd 7.1 caused by incorrect pytest version check.

v7.1

  • Address another compatibility issue with pytest 8.1 (fixture registration). #&#8203;680 <https://github.com/pytest-dev/pytest-bdd/pull/680>_

v7.0.1

Compare Source

  • Fix errors occurring if pytest_unconfigure is called before pytest_configure. #&#8203;362 <https://github.com/pytest-dev/pytest-bdd/issues/362>_ #&#8203;641 <https://github.com/pytest-dev/pytest-bdd/pull/641>_

v7.0.0

Compare Source

  • ⚠️ Backwards incompatible: - parsers.re now does a fullmatch <https://docs.python.org/3/library/re.html#re.fullmatch>_ instead of a partial match. This is to make it work just like the other parsers, since they don't ignore non-matching characters at the end of the string. #&#8203;539 <https://github.com/pytest-dev/pytest-bdd/pull/539>_
  • Drop python 3.7 compatibility, as it's no longer supported. #&#8203;627 <https://github.com/pytest-dev/pytest-bdd/pull/627>_
  • Declare official support for python 3.12 #&#8203;628 <https://github.com/pytest-dev/pytest-bdd/pull/628>_
  • Improve parser performance by 15% #&#8203;623 <https://github.com/pytest-dev/pytest-bdd/pull/623>_ by @dcendents <https://github.com/dcendents>_
  • Add support for Scenarios and Scenario Outlines to have descriptions. #&#8203;600 <https://github.com/pytest-dev/pytest-bdd/pull/600>_

v6.1.1

Compare Source

  • Fix regression introduced in version 6.1.0 where the pytest_bdd_after_scenario hook would be called after every step instead of after the scenario. #&#8203;577 <https://github.com/pytest-dev/pytest-bdd/pull/577>_

v6.1.0

Compare Source

  • Fix bug where steps without parsers would take precedence over steps with parsers. #&#8203;534 <https://github.com/pytest-dev/pytest-bdd/pull/534>_
  • Step functions can now be decorated multiple times with @​given, @​when, @​then. Previously every decorator would override converters and target_fixture every at every application. #&#8203;534 <https://github.com/pytest-dev/pytest-bdd/pull/534>_ #&#8203;544 <https://github.com/pytest-dev/pytest-bdd/pull/544>_ #&#8203;525 <https://github.com/pytest-dev/pytest-bdd/issues/525>_
  • Require pytest>=6.2 #&#8203;534 <https://github.com/pytest-dev/pytest-bdd/pull/534>_
  • Using modern way to specify hook options to avoid deprecation warnings with pytest >=7.2.
  • Add generic step decorator that will be used for all kind of steps #&#8203;548 <https://github.com/pytest-dev/pytest-bdd/pull/548>_
  • Add stacklevel param to given, when, then, step decorators. This allows for programmatic step generation #&#8203;548 <https://github.com/pytest-dev/pytest-bdd/pull/548>_
  • Hide pytest-bdd internal method in user tracebacks #&#8203;557 <https://github.com/pytest-dev/pytest-bdd/pull/557>_.
  • Make the package PEP 561-compatible #&#8203;559 <https://github.com/pytest-dev/pytest-bdd/issues/559>_ #&#8203;563 <https://github.com/pytest-dev/pytest-bdd/pull/563>_.
  • Configuration option bdd_features_base_dir is interpreted as relative to the pytest root directory <https://docs.pytest.org/en/latest/reference/customize.html#rootdir>_ (previously it was relative to the current working directory). #&#8203;573 <https://github.com/pytest-dev/pytest-bdd/pull/573>_

v6.0.1

Compare Source

  • Fix regression introduced in 6.0.0 where a step function decorated multiple using a parsers times would not be executed correctly. #&#8203;530 <https://github.com/pytest-dev/pytest-bdd/pull/530>_ #&#8203;528 <https://github.com/pytest-dev/pytest-bdd/issues/528>_

v6.0.0

Compare Source

This release introduces breaking changes in order to be more in line with the official gherkin specification.

  • Cleanup of the documentation and tests related to parametrization (elchupanebrej) #&#8203;469 <https://github.com/pytest-dev/pytest-bdd/pull/469>_
  • Removed feature level examples for the gherkin compatibility (olegpidsadnyi) #&#8203;490 <https://github.com/pytest-dev/pytest-bdd/pull/490>_
  • Removed vertical examples for the gherkin compatibility (olegpidsadnyi) #&#8203;492 <https://github.com/pytest-dev/pytest-bdd/pull/492>_
  • Step arguments are no longer fixtures (olegpidsadnyi) #&#8203;493 <https://github.com/pytest-dev/pytest-bdd/pull/493>_
  • Drop support of python 3.6, pytest 4 (elchupanebrej) #&#8203;495 <https://github.com/pytest-dev/pytest-bdd/pull/495>_ #&#8203;504 <https://github.com/pytest-dev/pytest-bdd/issues/504>_
  • Step definitions can have "yield" statements again (4.0 release broke it). They will be executed as normal fixtures: code after the yield is executed during teardown of the test. (youtux) #&#8203;503 <https://github.com/pytest-dev/pytest-bdd/issues/503>_
  • Scenario outlines unused example parameter validation is removed (olegpidsadnyi) #&#8203;499 <https://github.com/pytest-dev/pytest-bdd/pull/499>_
  • Add type annotations (youtux) #&#8203;505 <https://github.com/pytest-dev/pytest-bdd/pull/505>_
  • pytest_bdd.parsers.StepParser now is an Abstract Base Class. Subclasses must make sure to implement the abstract methods. (youtux) #&#8203;505 <https://github.com/pytest-dev/pytest-bdd/pull/505>_
  • Angular brackets in step definitions are only parsed in "Scenario Outline" (previously they were parsed also in normal "Scenario"s) (youtux) #&#8203;524 <https://github.com/pytest-dev/pytest-bdd/pull/524>_.

Configuration

📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

Copy link

codecov bot commented Nov 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.37%. Comparing base (30efad7) to head (7182299).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4094      +/-   ##
==========================================
- Coverage   80.89%   80.37%   -0.52%     
==========================================
  Files         309      309              
  Lines       11845    11845              
  Branches      537      537              
==========================================
- Hits         9582     9521      -61     
+ Misses       2145     2138       -7     
- Partials      118      186      +68     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dgboss dgboss closed this Nov 17, 2024
@bcgov-wps
Copy link
Collaborator Author

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 8.x releases. But if you manually upgrade to 8.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@bcgov-wps bcgov-wps deleted the renovate/pytest_bdd-8.x branch November 17, 2024 02: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.

3 participants