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

Setting a default parser #467

Open
theObserver1 opened this issue Dec 18, 2021 · 3 comments
Open

Setting a default parser #467

theObserver1 opened this issue Dec 18, 2021 · 3 comments
Labels

Comments

@theObserver1
Copy link

Is it currently possible to set a default parser?
ie
Instead of writing:
@given(parsers.parse("the animal is {name}")

I want to configure parser.parse as the default (perhaps in pytest.ini) so i can then write:
@given("the animal is {name}")

Reason: Clearer decorators

@elchupanebrej
Copy link

Already discussed in #425

@elchupanebrej
Copy link

#472 address this

@youtux
Copy link
Contributor

youtux commented Feb 24, 2022

Hi, currently it's not possible.
We could have a config option that defines the default parser in case a bare string is passed to @given(...).
Feel free to contribute!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants