# Path: pytest_bdd/parser.py
# def get_tags(line: str | None) -> set[str]:
#     """Get tags out of the given line.
# 
#     :param str line: Feature file text line.
# 
#     :return: List of tags.
#     """
#     if not line or not line.strip().startswith("@"):
#         return set()
#     return {tag.lstrip("@") for tag in line.strip().split(" @") if len(tag) > 1}


import textwrap
import pkg_resources
import pytest
from pytest_bdd.parser import get_tags
            return 'baz'

        scenarios('test.feature')
    """
    )

    # Deprecate --strict after pytest 6.1
    # https://docs.pytest.org/en/stable/deprecations.html#the-strict-command-line-option
    pytest_version = pkg_resources.get_distribution("pytest").parsed_version
    if pytest_version >= pkg_resources.parse_version("6.2"):
        strict_option = "--strict-markers"
    else:
        strict_option = "--strict"
    result = testdir.runpytest_subprocess(strict_option)
    result.stdout.fnmatch_lines(["*= 2 passed * =*"])


@pytest.mark.parametrize(
    "line, expected",
    [
        ("@foo @bar", {"foo", "bar"}),
        ("@with spaces @bar", {"with spaces", "bar"}),
        ("@double @double", {"double"}),
        ("    @indented", {"indented"}),
        (None, set()),
        ("foobar", set()),
        ("", set()),
    ],
)
def test_get_tags(line, expected):

# Path: pytest_bdd/parser.py
# def get_tags(line: str | None) -> set[str]:
#     """Get tags out of the given line.
# 
#     :param str line: Feature file text line.
# 
#     :return: List of tags.
#     """
#     if not line or not line.strip().startswith("@"):
#         return set()
#     return {tag.lstrip("@") for tag in line.strip().split(" @") if len(tag) > 1}


# Path: tests/feature/test_tags.py
import textwrap
import pkg_resources
import pytest
from pytest_bdd.parser import get_tags

            return 'baz'

        scenarios('test.feature')
    """
    )

    # Deprecate --strict after pytest 6.1
    # https://docs.pytest.org/en/stable/deprecations.html#the-strict-command-line-option
    pytest_version = pkg_resources.get_distribution("pytest").parsed_version
    if pytest_version >= pkg_resources.parse_version("6.2"):
        strict_option = "--strict-markers"
    else:
        strict_option = "--strict"
    result = testdir.runpytest_subprocess(strict_option)
    result.stdout.fnmatch_lines(["*= 2 passed * =*"])


@pytest.mark.parametrize(
    "line, expected",
    [
        ("@foo @bar", {"foo", "bar"}),
        ("@with spaces @bar", {"with spaces", "bar"}),
        ("@double @double", {"double"}),
        ("    @indented", {"indented"}),
        (None, set()),
        ("foobar", set()),
        ("", set()),
    ],
)
def test_get_tags(line, expected):

    assert get_tags(line) == expected