Skip to content

Commit

Permalink
Behave title decorator variants (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
kieran-ryan authored May 19, 2024
1 parent f08865c commit a5f5e17
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Fixed
- (Ruby) Support `And` and `But` step definition annotations ([#211](https://github.com/cucumber/language-service/pull/211))
- (Python) Title variants of Behave's decorators (`Step`, `Given`, `When`, `Then`) ([#213](https://github.com/cucumber/language-service/pull/213))

## [1.6.0] - 2024-05-12
### Added
Expand Down
2 changes: 1 addition & 1 deletion src/language/pythonLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const pythonLanguage: Language = {
arguments: (argument_list (string) @expression)
)
)
(#match? @method "(given|when|then|step)")
(#match? @method "(given|when|then|step|Given|When|Then|Step)")
) @root`,
],
snippetParameters: {
Expand Down
4 changes: 2 additions & 2 deletions test/language/testdata/python/StepDefinitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ def step_undef(context, planet):
assert planet


@given("/^a regexp$/")
@Step("/^a regexp$/")
def step_re(context, expression):
"""Test Re."""
assert expression


@given("the bee's knees")
@Given("the bee's knees")
def step_bees(context, expression):
"""Test Re."""
assert expression

0 comments on commit a5f5e17

Please sign in to comment.