pytest-bdd
pytest-bdd copied to clipboard
Setting a default parser
trafficstars
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
Already discussed in #425
#472 address this
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!