pytest-bdd
pytest-bdd copied to clipboard
AttributeErrror: '__HookRelay' object has no attribute 'pytest_bdd_before_scenario'
I am getting the error while running the pytest bdd scenario:
request = <FixtureRequest for <Function test_argument_for_given_when_then>> @scenario(featrure_name='sample.feature', scenario_name ' sample', feature_base_dir='usr/local/bin/test', strict_gherkin=False)
def test-arguments_for_given_when_thens():
def _execute_scenario(feature, scenario, request, encoding): """Execute the scenario. :param feature: Feature. :param scenario: Scenario. :param request: request. :param encoding: Encoding. """
request.config.hook.pytest_bdd_before_scenario( request=request, feature=feature, scenario=scenario, ) E AttributeErrror: '__HookRelay' object has no attribute 'pytest_bdd_before_scenario'
Can you please show the full output, including the pytest version/plugins output? Also, please format the output as code block properly.
@The-Compiler Actually, i am working on different machine and i cant copy the output. It is restricted. I can give the version of pytest: platform linux2 -- Python 2.7.3, pytest-4.4.1, pytest_bdd-3.1.0
I was getting the error while running pytest_bdd test. The error is thrown at the below function (def test-arguments_for_given_when_thens():) line.
@scenario((featrure_name='sample.feature', scenario_name ' sample', feature_base_dir='usr/local/bin/test', strict_gherkin=False)) def test-arguments_for_given_when_thens(): pass
Doest it helpful to figure out the issue ?