pytest-param-scope provides a param_scope marker to pass setup and teardown functions to a parametrized function. There's also a param_scope fixture to allow the return value of the setup function to ...