Skip to content

Commit a5f5e17

Browse files
authored
Behave title decorator variants (#213)
1 parent f08865c commit a5f5e17

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
## [Unreleased]
99
### Fixed
1010
- (Ruby) Support `And` and `But` step definition annotations ([#211](https://github.com/cucumber/language-service/pull/211))
11+
- (Python) Title variants of Behave's decorators (`Step`, `Given`, `When`, `Then`) ([#213](https://github.com/cucumber/language-service/pull/213))
1112

1213
## [1.6.0] - 2024-05-12
1314
### Added

src/language/pythonLanguage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export const pythonLanguage: Language = {
9898
arguments: (argument_list (string) @expression)
9999
)
100100
)
101-
(#match? @method "(given|when|then|step)")
101+
(#match? @method "(given|when|then|step|Given|When|Then|Step)")
102102
) @root`,
103103
],
104104
snippetParameters: {

test/language/testdata/python/StepDefinitions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ def step_undef(context, planet):
2323
assert planet
2424

2525

26-
@given("/^a regexp$/")
26+
@Step("/^a regexp$/")
2727
def step_re(context, expression):
2828
"""Test Re."""
2929
assert expression
3030

3131

32-
@given("the bee's knees")
32+
@Given("the bee's knees")
3333
def step_bees(context, expression):
3434
"""Test Re."""
3535
assert expression

0 commit comments

Comments
 (0)