trace keyword implemented

This commit is contained in:
Anatoly Bubenkov 2014-07-30 08:55:27 +00:00
parent d89294b93a
commit 0be8236a05
3 changed files with 28 additions and 5 deletions

View File

@ -5,12 +5,8 @@ Changelog
-----
- Implemented cucumber tags support (bubenkoff)
2.2.0
-----
- Implemented cucumber json formatter (bubenkoff, albertjan)
- Added 'trace' keyword (bubenkoff)
2.1.2

View File

@ -580,6 +580,19 @@ There are no definitions of the steps in the test file. They were
collected from the parent conftests.
Default steps
-------------
Here is the list of steps that are implemented inside of the pytest-bdd:
given
* trace - enters the `pdb` debugger via `pytest.set_trace()`
when
* trace - enters the `pdb` debugger via `pytest.set_trace()`
then
* trace - enters the `pdb` debugger via `pytest.set_trace()`
Feature file paths
------------------

View File

@ -4,6 +4,12 @@ import os.path # pragma: no cover
import pytest # pragma: no cover
from pytest_bdd import (
given,
when,
then,
)
@pytest.fixture # pragma: no cover
def pytestbdd_feature_base_dir(request):
@ -56,3 +62,11 @@ def pytest_runtest_makereport(item, call, __multicall__):
}
return rep
@given('trace')
@when('trace')
@then('trace')
def trace():
"""Enter pytest's pdb trace."""
pytest.set_trace()