-
Notifications
You must be signed in to change notification settings - Fork 234
Closed
Description
Hi,
- I use cfparse when I want to parse a list.
- 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")
def emails(emails)
return emailsOk 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")
def emails(emails)
return emails if isinstance(emails, list) else emails.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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels