def scenarios(*feature_paths, **kwargs):
    """Parse features from the paths and put all found scenarios in the caller module.

    :param *feature_paths: feature file paths to use for scenarios
    """
    frame = inspect.stack()[1]
    module = inspect.getmodule(frame[0])
    base_path = get_fixture(module, "pytestbdd_feature_base_dir")
    strict_gherkin = get_fixture(module, "pytestbdd_strict_gherkin")
    abs_feature_paths = []
    for path in feature_paths:
        if not os.path.isabs(path):
            path = os.path.abspath(os.path.join(base_path, path))
        abs_feature_paths.append(path)
    found = False

    module_scenarios = frozenset(
        (attr.__scenario__.feature.filename, attr.__scenario__.name)
        for name, attr in module.__dict__.items() if hasattr(attr, '__scenario__'))

    index = 10
    for feature in get_features(abs_feature_paths, strict_gherkin=strict_gherkin):
        for scenario_name, scenario_object in feature.scenarios.items():
            # skip already bound scenarios
            if (scenario_object.feature.filename, scenario_name) not in module_scenarios:
                @scenario(feature.filename, scenario_name, **kwargs)
                def _scenario():
                    pass  # pragma: no cover
                for test_name in get_python_name_generator(scenario_name):
                    if test_name not in module.__dict__:
                        # found an unique test name
                        # recreate function to set line number
                        _scenario = recreate_function(_scenario, module=module, firstlineno=index * 4)
                        index += 1
                        module.__dict__[test_name] = _scenario
                        break
            found = True
    if not found:
        raise exceptions.NoScenariosFound(abs_feature_paths)
dataset/ETHPy150Open pytest-dev/pytest-bdd/pytest_bdd/scenario.py/scenarios/original