julianomontini
julianomontini

Reputation: 335

Python Behave hooks not being called

I'm trying to use some of the hooks provided in behave API ( https://behave.readthedocs.io/en/stable/api.html?highlight=after_all#environment-file-functions ), but the function defined inside the environment.py file are never called. I've tried to move the file to several different folders ( features, steps ... ) but none of them seems to work. Where is the project structure: Project Structure

Upvotes: 1

Views: 790

Answers (1)

automationleg
automationleg

Reputation: 323

All look good, just change ctx to context in your hook. It should look like in documentation: before_step(context, step). Keep the context.

Upvotes: 0

Related Questions