Home-made fixture - conftest



examples/fixture_inject_conftest/test_app.py
def test_some_data(config):
    assert True
    print(config)

examples/fixture_inject_conftest/conftest.py
import pytest

@pytest.fixture()
def config():
    return {
       'name'  : 'Foo Bar',
       'email' : 'foo@bar.com',
    }