-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Extend Config to override ini values programmatically #3311
Copy link
Copy link
Closed
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Metadata
Metadata
Assignees
Labels
topic: configrelated to config handling, argument parsing and config filerelated to config handling, argument parsing and config filetype: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Hello, I'm trying to find a way to override custom ini values defined inside pytest.ini.
My scenario is the following: I have a custom option called
--resource-enablewhich is implemented inside a plugin called "resources.py". If--resource-enableis used, my plugin fetch the configuration from a DB (dicttype) and it has to override the pytest.ini variables defined inside the other plugins which expose the fixtures.The system is needed in order to accomplish a complex automation scenario using Jenkins and some other proprietary tools.
In short:
At the moment, there are no other ways but using
config.addinivalue_line, but most of my ini items have the simplekey=valueform. Aconfig.addinivaluewould be really useful in this case.Thanks,
Andrea