cucumber / language-service

Cucumber Language Service
MIT License
12 stars 21 forks source link

Python u-string patterns #173

Closed kieran-ryan closed 4 months ago

kieran-ryan commented 4 months ago

🤔 What's changed?

Introduced support for u-strings (explicit unicode strings e.g. u"") for Python step definitions.

⚡️ What's your motivation?

Resolves cucumber/vscode#173, allowing step definition patterns written with Python u-strings.

@given(u"I have 58 cukes in my belly")
def step_impl(context):
    ...

Although not required in Python 3, they are usable and are suggested in missing step definitions for Behave due to Python 2 compatibility.

Developer experience has been improved for Python unit tests by changing asserts to assert.strictEqual, which shows exact match failures in strings - so that they can be fixed - compared to simply stating condition was not True.

🏷️ What kind of change is this?

📋 Checklist: