Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为 python 使用生菜 BDD 框架。在示例中,所有场景都使用仅来自一个 *.py 文件的方法 - steps.py 如何设置 *.feature 与其 *.py 文件之间的关系?
我需要这些功能文件:
auth.feature pay.feature
和这些 py 文件
auth.py pay.py
我需要这个:场景中的auth.feature仅引用方法,而支付功能中auth.py 的场景仅引用中的方法pay.py
auth.feature
auth.py
pay.py
把它放在你的步骤文件的顶部:
from lettuce import * from lettuce import steps
然后对于每一步,写下:
@step('I make it go') def i_make_it_go(step):