fix steps timings
This commit is contained in:
parent
002c517093
commit
9ef2a94d30
|
@ -5,7 +5,7 @@ Unreleased
|
|||
----------
|
||||
|
||||
- Fix unicode regex argumented steps issue (bubenkoff, aohontsev)
|
||||
|
||||
- Fix steps timings in the json reporting (bubenkoff)
|
||||
|
||||
2.4.2
|
||||
-----
|
||||
|
|
|
@ -31,7 +31,7 @@ def pytest_bdd_step_error(request, feature, scenario, step, step_func, step_func
|
|||
"""
|
||||
step.failed = True
|
||||
scenario.failed = True
|
||||
if step.start:
|
||||
if step.start and not step.stop:
|
||||
step.stop = time.time()
|
||||
for step in scenario.steps[scenario.steps.index(step):]:
|
||||
step.failed = True
|
||||
|
@ -40,7 +40,8 @@ def pytest_bdd_step_error(request, feature, scenario, step, step_func, step_func
|
|||
@pytest.mark.tryfirst
|
||||
def pytest_bdd_before_step(request, feature, scenario, step, step_func):
|
||||
"""Store step start time."""
|
||||
step.start = time.time()
|
||||
if not step.start:
|
||||
step.start = time.time()
|
||||
|
||||
|
||||
@pytest.mark.tryfirst
|
||||
|
|
Loading…
Reference in New Issue