You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use scenario outlines when I want to test my scenario with different values
I cannot mix both conditions together.
e.g.:
Scenario Outline: mix case
Given the emails <emails>
...
Examples:
| emails |
| someone@somewhere.com |
| someone@somewhere.com, someone.else@somewhere.com |
Scenario: other scenario
Given the emails email1@server.net, email2@server.net
...
It would be very useful if I could then have the following step
@given(parsers.cfparse("Given the emails {emails:str+}". extra_types=dict(str=str)), target_fixture="emails")defemails(emails)
returnemails
Ok I could split the list myself, but it's ugly
@given("Given the emails <emails>")@given(parsers.cfparse("Given the emails {emails:str+}". extra_types=dict(str=str)), target_fixture="emails")defemails(emails)
returnemailsifisinstance(emails, list) elseemails.split(",")
The same kind of support has been asked a few times in #293 but since it has nothing to do with the original problem I fear it has been lost through all the discussions.
Thanks
The text was updated successfully, but these errors were encountered:
We've had to use exactly this workaround of the double-@given, once with <> examples and once with parsers.parse, so implementing this would be great.
I recently worked in Godog (the official Cucumber implementation for Go) and it works this way; the steps never see the <example> placeholder, they parse the resulting interpolated statement like if it was written literally, and for pytest-bdd that would let us apply all the various benefits of parsers.X (built-in or custom) as desired.
I haven't checked #433 to see if that's how it worked, but it was reverted in #440 so I guess that's academic.
Hi,
I cannot mix both conditions together.
e.g.:
It would be very useful if I could then have the following step
Ok I could split the list myself, but it's ugly
The same kind of support has been asked a few times in #293 but since it has nothing to do with the original problem I fear it has been lost through all the discussions.
Thanks
The text was updated successfully, but these errors were encountered: