| 1 |
# -*- coding: utf-8 -*- |
| 2 |
""" |
| 3 |
Step definitions for providing notes/hints. |
| 4 |
The note steps explain what was important in the last few steps of |
| 5 |
this scenario (for a test reader). |
| 6 |
""" |
| 7 |
|
| 8 |
from __future__ import absolute_import |
| 9 |
from behave import step |
| 10 |
|
| 11 |
|
| 12 |
# ----------------------------------------------------------------------------- |
| 13 |
# STEPS FOR: remarks/comments |
| 14 |
# ----------------------------------------------------------------------------- |
| 15 |
@step(u'note that "{remark}"') |
| 16 |
def step_note_that(context, remark): |
| 17 |
""" |
| 18 |
Used as generic step that provides an additional remark/hint |
| 19 |
and enhance the readability/understanding without performing any check. |
| 20 |
|
| 21 |
.. code-block:: gherkin |
| 22 |
|
| 23 |
Given that today is "April 1st" |
| 24 |
But note that "April 1st is Fools day (and beware)" |
| 25 |
""" |
| 26 |
log = getattr(context, "log", None) |
| 27 |
if log: |
| 28 |
log.info(u"NOTE: %s;" % remark) |
| 29 |
|