Skip to content

Commit

Permalink
Fixup import
Browse files Browse the repository at this point in the history
  • Loading branch information
elchupanebrej committed Oct 5, 2024
1 parent 2128bae commit 7c0d0e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Features/Steps to step definition bounding.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Feature: Gherkin steps bounding to steps definitions
And File "conftest.py" with content:
"""python
from pytest_bdd import given, when, then, step
from cucumber_messages import DataTable
from pytest import fixture
# pytest fixtures could be used from step definitions, so some
Expand Down Expand Up @@ -54,7 +53,7 @@ Feature: Gherkin steps bounding to steps definitions
@then('there are passed steps by kind:')
def check_step_counter(step, step_counter):
# Step datatables data could be accessed in the next manner
step_data_table: DataTable = step.data_table
step_data_table = step.data_table
oracle_results_header = [cell.value for cell in step_data_table.rows[0].cells]
oracle_results_values = [int(cell.value) for cell in step_data_table.rows[1].cells]
oracle_result = dict(zip(oracle_results_header, oracle_results_values))
Expand Down
9 changes: 5 additions & 4 deletions src/pytest_bdd/testing_utils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from functools import partial
from itertools import islice
from operator import attrgetter
from typing import Optional

from cucumber_messages import DataTable
from typing import TYPE_CHECKING, Optional

from pytest_bdd.utils import compose

if TYPE_CHECKING: # pragma: no cover
from cucumber_messages import DataTable


def data_table_to_dicts(data_table: Optional[DataTable]):
def data_table_to_dicts(data_table: Optional["DataTable"]):
if data_table is None:
return {}

Expand Down

0 comments on commit 7c0d0e9

Please sign in to comment.