My tests rely on ids that are specific to a given environment (e.g. dev, qa, production)
In my tests I use fixtures to make a set of ids available over the session.
@pytest.fixture(scope="session", autouse=True)
def test_entities(request):
test_entities = None
path = os.path.join(base_path, "data/test_entities_dev.json") ...
...
<Get from File>
...
return test_entities
The test entities that I retrieve for a given test will depend on the environment. I would like to specify the file to open when I start my pytest session. e.g. "data/test_entities_qa.json" instead of "data/test_entities_dev.json". How can I do this with pytest?