From d7522fc76d4d079f128dfede98e632cfaac2275f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:22:32 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/pytest_bdd/scenario.py | 6 ++++-- tests/steps/test_given.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pytest_bdd/scenario.py b/src/pytest_bdd/scenario.py index 864346ce..1941b9cd 100644 --- a/src/pytest_bdd/scenario.py +++ b/src/pytest_bdd/scenario.py @@ -162,9 +162,11 @@ def _execute_step_function( raise if context.target_fixture is not None: - target_fixture_tokens = [token for token in context.target_fixture.split(',') if token] + target_fixture_tokens = [token for token in context.target_fixture.split(",") if token] return_values = (return_value,) if not isinstance(return_value, tuple) else return_value - assert len(target_fixture_tokens) == len(return_values), f"Return value count: {len(return_values)} are not matching target_fixture count: {len(target_fixture_tokens)}" + assert len(target_fixture_tokens) == len( + return_values + ), f"Return value count: {len(return_values)} are not matching target_fixture count: {len(target_fixture_tokens)}" for token, value in zip(target_fixture_tokens, return_values): inject_fixture(request, token, value) diff --git a/tests/steps/test_given.py b/tests/steps/test_given.py index caa890b9..ee78a222 100644 --- a/tests/steps/test_given.py +++ b/tests/steps/test_given.py @@ -76,4 +76,4 @@ def _(foo, bar): ) ) result = pytester.runpytest() - result.assert_outcomes(passed=1) \ No newline at end of file + result.assert_outcomes(passed=1)