Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Make `step` parse some wildcard character equivalent to `"(.*)"` #322

Open
hangtwenty opened this Issue Feb 2, 2013 · 1 comment

Comments

Projects
None yet
2 participants

Maybe just for step there can be a wildcard character * (or maybe a different token, like __), that the step function will simply replace with "(.*)" for all intents and purposes. I think this could make it a little less intimidating to get started with your first unguided test suites. A step like

@step(u'Given there is no user whose "(.*)" is "(.*)"')

is a bit burdensome to type manually; wouldn't you rather do:

@step(u'Given there is no user whose * is *')

or

@step(u'Given there is no user whose __ is __')

?

Just makes sense to me seeing as part of our goal is fluent test writing, more or less. So maybe a tiny improvement in that direction.

Great tool, thanks for writing and maintaining it.

Collaborator

danni commented Feb 12, 2014

I've actually wondered about something more REST-looking like int:id returns str:value and then having the parameters exposed as kwargs with the correct types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment