BDD和萝卜功能

时间:2018-12-11 11:22:54

标签: python bdd

在terrain.py中,我对此进行了设置

@before.each_feature
def init(feature):
    feature.context.delme = "UPANDDOWN"

现在在我的场景步骤中,我想读取此值。我该怎么做。如果我这样做。

@given ('Apple and orange')
def checkapple(step):
    print step.context.delme

它给出错误AttributeError:'Context'对象没有属性'delme'

0 个答案:

没有答案