181 """Internal decorator used for defining clauses of different types."""
183 def func_wrapper(func):
184 @functools.wraps(func)
185 def wrapper(self, *args, **kwargs):
186 func(self, *args, **kwargs)
189 setattr(_BDDContext, clauseType +
"_" + func.__name__, wrapper)
Context of a BDD test case.
When(self)
Conjunction for marking the start of the When part.
With(self)
Conjunction for joining two clauses of the same type.
__getattr__(self, name)
Returns Given/When/Then method corresponding to name.
And(self)
Conjunction for joining two clauses of the same type.
Then(self)
Conjunction for marking the start of the Then part.