File: passing_steps.py

package info (click to toggle)
behave 1.2.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,160 kB
  • sloc: python: 19,857; makefile: 137; sh: 18
file content (36 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
"""
Passing steps.
Often needed in examples.

EXAMPLES:

    Given a step passes
    When  another step passes
    Then  a step passes

    Given ...
    When  ...
    Then  it should pass because "the answer is correct".
"""

from __future__ import absolute_import
from behave import step, then

# -----------------------------------------------------------------------------
# STEPS FOR: passing
# -----------------------------------------------------------------------------
@step('{word:w} step passes')
def step_passes(context, word):
    """
    Step that always fails, mostly needed in examples.
    """
    pass

@then('it should pass because "{reason}"')
def then_it_should_pass_because(context, reason):
    """
    Self documenting step that indicates some reason.
    """
    pass