pytest - use funcargs inside setup_module
I include at conftetst.py my own command line options def pytest_addoption(parser): parser.addoption("--backend" , default="test_backend", help="run testx for the given backend, default: test_backend") and def pytest_generate_tests(metafunc): if 'backend' in metafunc.funcargnames: if metafunc.config.option.backend: backend = metafunc.config.option.backend backend = backend.split(',') backend = map(lambda x: string.lower(x), backend) metafunc.parametrize("backend", backend) If I use this command line option inside a normal function inside a module: module: test_this.py; def test_me(backend):