# conftest.py import my_test def pytest_configure(config): my_test.my_global_variable = config.getoption("--parameter")