<s> """<STR_LIT>""" <EOL> import os . path <EOL> import re <EOL> import mock <EOL> import pytest <EOL> from pytest_bdd import scenario , scenarios , given , when , then <EOL> from pytest_bdd . feature import features <EOL> from pytest_bdd import exceptions <EOL> @ given ( '<STR_LIT>' ) <EOL> def given_something ( ) : <EOL> pass <EOL> @ when ( '<STR_LIT>' ) <EOL> def when_something_else ( ) : <EOL> pass <EOL> @ then ( '<STR_LIT>' ) <EOL> def then_nevermind ( ) : <EOL> pass <EOL> @ pytest . mark . parametrize ( <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] <EOL> ) <EOL> @ pytest . mark . parametrize ( '<STR_LIT>' , [ True , False ] ) <EOL> @ pytest . mark . parametrize ( '<STR_LIT>' , [ True , False ] ) <EOL> @ mock . patch ( '<STR_LIT>' , autospec = True ) <EOL> def test_wrong ( mocked_strict_gherkin , request , feature , scenario_name , strict_gherkin , multiple ) : <EOL> """<STR_LIT>""" <EOL> mocked_strict_gherkin . return_value = strict_gherkin <EOL> def declare_scenario ( ) : <EOL> if multiple : <EOL> scenarios ( feature ) <EOL> else : <EOL> @ scenario ( feature , scenario_name ) <EOL> def test_scenario ( ) : <EOL> pass <EOL> if strict_gherkin : <EOL> with pytest . raises ( exceptions . FeatureError ) : <EOL> declare_scenario ( ) <EOL> else : <EOL> declare_scenario ( ) <EOL> def clean_cache ( ) : <EOL> features . clear ( ) <EOL> request . addfinalizer ( clean_cache ) <EOL> @ pytest . mark . parametrize ( <EOL> '<STR_LIT>' , <EOL> [ <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ] <EOL> ) <EOL> def test_wrong_type_order ( request , scenario_name ) : <EOL> """<STR_LIT>""" <EOL> @ scenario ( '<STR_LIT>' , scenario_name ) <EOL> def test_wrong_type_order ( request ) : <EOL> pass <EOL> with pytest . raises ( exceptions . StepDefinitionNotFoundError ) as excinfo : <EOL> test_wrong_type_order ( request ) <EOL> assert re . match ( r'<STR_LIT>' , excinfo . value . args [ <NUM_LIT:0> ] ) <EOL> def test_verbose_output ( ) : <EOL> """<STR_LIT>""" <EOL> with pytest . raises ( exceptions . FeatureError ) as excinfo : <EOL> scenario ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> msg , line_number , line , file = excinfo . value . args <EOL> assert line_number == <NUM_LIT:5> <EOL> assert line == '<STR_LIT>' <EOL> assert file == os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> assert line in str ( excinfo . value ) <EOL> def test_multiple_features_single_file ( ) : <EOL> """<STR_LIT>""" <EOL> with pytest . raises ( exceptions . FeatureError ) as excinfo : <EOL> scenarios ( '<STR_LIT>' ) <EOL> assert excinfo . value . args [ <NUM_LIT:0> ] == '<STR_LIT>' </s>
