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

Allow unicode type in given step names in Py 2 #308

Merged
merged 2 commits into from
Jul 7, 2019
Merged

Allow unicode type in given step names in Py 2 #308

merged 2 commits into from
Jul 7, 2019

Conversation

blaise-io
Copy link
Contributor

This is useful when migrating from Py 2 to Py 3 when using from __future__ import unicode_literals in your step definition files because all given steps can remain untouched.

To pytest_bdd it does not matter whether the step name is a str or unicode in Py 2, as long as the name does not contain non-ascii characters. (because it is used to set the function __name__ which only allows ascii in Py 2)

Py 3 is not affected by these changes.

Allows the given step name to be unicode in Py2. 

Py 3 is not affected. It still does not allow non-ascii characters as they're not allowed in Py 2 `__name__`s.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 93.545% when pulling 77f2430 on blaise-io:patch-1 into 2a10da1 on pytest-dev:master.

@youtux youtux merged commit d8ebeee into pytest-dev:master Jul 7, 2019
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.

None yet

3 participants