Debian Codegraph @

behave4cmd0/passing_steps.py

raw
1 # -*- coding: utf-8 -*-
2 """
3 Passing steps.
4 Often needed in examples.
5
6 EXAMPLES:
7
8 Given a step passes
9 When another step passes
10 Then a step passes
11
12 Given ...
13 When ...
14 Then it should pass because "the answer is correct".
15 """
16
17 from __future__ import absolute_import
18 from behave import step, then
19
20 # -----------------------------------------------------------------------------
21 # STEPS FOR: passing
22 # -----------------------------------------------------------------------------
23 @step('{word:w} step passes')
24 def step_passes(context, word):
25 """
26 Step that always fails, mostly needed in examples.
27 """
28 pass
29
30 @then('it should pass because "{reason}"')
31 def then_it_should_pass_because(context, reason):
32 """
33 Self documenting step that indicates some reason.
34 """
35 pass
36