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

Explicit unicode strings in Python step definition patterns #173

Closed
nopa12 opened this issue Aug 9, 2023 · 2 comments · Fixed by cucumber/language-service#173
Closed
Labels
⚡ enhancement Request for new functionality

Comments

@nopa12
Copy link

nopa12 commented Aug 9, 2023

when i use unicode strings:

@given(u'I fill the settings form with real valid settings')

feature:

     Given I fill the settings form with real valid settings

behave works but cucumber extension doesn't see the u string given and report it as missing.

Undefined step: I fill the settings form with real valid settingsCucumber[cucumber.undefined-step](https://cucumber.io/docs/cucumber/step-definitions/)

when i remove the u it works.
i don't know if it's a bug or on purpose.

@stenaksel
Copy link

"u strings" are no longer needed! Python 3 made them redundant, as the default string type is Unicode.

@jenisys
Copy link

jenisys commented Aug 31, 2023

@nopa12

  • behave currently shows missing steps with u“…“ due to compatibility with Python2.7 (and older Python3) version(s).
  • If you are using Python3, you have no need to use the Unicode-String prefix
  • Unicode-String prefix support will become deprecated in Python 3.12 (I think)

@kieran-ryan kieran-ryan added the ⚡ enhancement Request for new functionality label Dec 30, 2023
@kieran-ryan kieran-ryan changed the title Extension reports missing steps when they are not missing Support u-strings in Python step definition patterns Jan 3, 2024
@kieran-ryan kieran-ryan changed the title Support u-strings in Python step definition patterns Explicit unicode strings in Python step definition patterns Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚡ enhancement Request for new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants