def declare_scenario(): if multiple: scenarios(feature) else: @scenario(feature, scenario_name) def test_scenario(): pass
def test_multiple_features_single_file(): """Test validation error when multiple requirements are placed in a single file.""" with pytest.raises(exceptions.FeatureError) as excinfo: scenarios('wrong_multiple_features.feature') assert excinfo.value.args[0] == 'Multiple requirements are not allowed in a single feature file'