是否可以在 pytest-bdd 中使用 *args 之类的步骤参数?
例如我的场景:
Scenario: Data Creation
Given login with USER1 and role ADMIN
Then set expert portal mode
Then fill section Name with Alexa
Then fill section Phonenumbers with 490000000,490000001
Then fill section Kontakt with admin@yahoo.com,AdminName,490000002
步骤实施:
@then(parsers.parse("fill section {section_name} with {fill_data}"))
def fill_section(app, section_name, fill_data):
app.siptrunk.fill_section(section_name, fill_data)
和实施:
def fill_section(self, section, *args):
...some code...
如何在“步骤实现”中处理 *args 以正确将参数传递给函数?