how to share a variable across modules for all tests in py.test
Update: pytest-namespace hook is deprecated/removed. Do not use. See #3735 for details. You mention the obvious and least magical option: using a fixture. You can apply it to entire modules using pytestmark = pytest.mark.usefixtures(‘big_dict’) in your module, but then it won’t be in your namespace so explicitly requesting it might be best. Alternatively you can … Read more