# Path: pytest_bdd/utils.py
# def collect_dumped_objects(result: RunResult) -> list:
#     """Parse all the objects dumped with `dump_object` from the result.
# 
#     Note: You must run the result with output to stdout enabled.
#     For example, using ``testdir.runpytest("-s")``.
#     """
#     stdout = result.stdout.str()  # pytest < 6.2, otherwise we could just do str(result.stdout)
#     payloads = re.findall(rf"{_DUMP_START}(.*?){_DUMP_END}", stdout)
#     return [pickle.loads(base64.b64decode(payload)) for payload in payloads]
# 
# Path: tests/utils.py
# def assert_outcomes(
#     result: RunResult,
#     passed: int = 0,
#     skipped: int = 0,
#     failed: int = 0,
#     errors: int = 0,
#     xpassed: int = 0,
#     xfailed: int = 0,
# ) -> None:
#     """Compatibility function for result.assert_outcomes"""
#     result.assert_outcomes(
#         errors=errors, passed=passed, skipped=skipped, failed=failed, xpassed=xpassed, xfailed=xfailed
#     )


import textwrap
from pytest_bdd.utils import collect_dumped_objects
from tests.utils import assert_outcomes
                    When I eat <eat> cucumbers
                    Then I should have <left> cucumbers

                    Examples:
                    | start | eat | left |
                    |  12   |  5  |  7   | # a comment
                    |  5    |  4  |  1   |

            """
        ),
    )

    testdir.makeconftest(textwrap.dedent(STEPS))

    testdir.makepyfile(
        textwrap.dedent(
            """\
        from pytest_bdd import scenario

        @scenario(
            "outline.feature",
            "Outlined given, when, thens",
        )
        def test_outline(request):
            pass

        """
        )
    )
    result = testdir.runpytest("-s")

# Path: pytest_bdd/utils.py
# def collect_dumped_objects(result: RunResult) -> list:
#     """Parse all the objects dumped with `dump_object` from the result.
# 
#     Note: You must run the result with output to stdout enabled.
#     For example, using ``testdir.runpytest("-s")``.
#     """
#     stdout = result.stdout.str()  # pytest < 6.2, otherwise we could just do str(result.stdout)
#     payloads = re.findall(rf"{_DUMP_START}(.*?){_DUMP_END}", stdout)
#     return [pickle.loads(base64.b64decode(payload)) for payload in payloads]
# 
# Path: tests/utils.py
# def assert_outcomes(
#     result: RunResult,
#     passed: int = 0,
#     skipped: int = 0,
#     failed: int = 0,
#     errors: int = 0,
#     xpassed: int = 0,
#     xfailed: int = 0,
# ) -> None:
#     """Compatibility function for result.assert_outcomes"""
#     result.assert_outcomes(
#         errors=errors, passed=passed, skipped=skipped, failed=failed, xpassed=xpassed, xfailed=xfailed
#     )


# Path: tests/feature/test_outline.py
import textwrap
from pytest_bdd.utils import collect_dumped_objects
from tests.utils import assert_outcomes

                    When I eat <eat> cucumbers
                    Then I should have <left> cucumbers

                    Examples:
                    | start | eat | left |
                    |  12   |  5  |  7   | # a comment
                    |  5    |  4  |  1   |

            """
        ),
    )

    testdir.makeconftest(textwrap.dedent(STEPS))

    testdir.makepyfile(
        textwrap.dedent(
            """\
        from pytest_bdd import scenario

        @scenario(
            "outline.feature",
            "Outlined given, when, thens",
        )
        def test_outline(request):
            pass

        """
        )
    )
    result = testdir.runpytest("-s")

    result.assert_outcomes(passed=2)