how to override multiple arguments with same key with -o/--override-ini?
See original GitHub issuethis is my pytest.ini
[pytest]
python_files = test_*
python_classes = Test*
python_functions = test_*
addopts = --tc-file=configurations/utenze/andrea-integration.ini --tc-file=configurations/puntamenti/integration.ini
there are two --tc-fle parameters used by https://pypi.org/project/pytest-testconfig/
i would like o overwrite theme using -o
i tried
pytest -o --tc-file=configurations/utenze/andrea-integration.ini --tc-file=configurations/puntamenti/legaltest.ini
i obtain
pytest: error: argument -o/--override-ini: expected one argument
i tried
pytest -o --tc-file=configurations/utenze/andrea-integration.ini -o --tc-file=configurations/puntamenti/legaltest.ini
i obtain the same result.
i can fix the issue creating different .ini file and use -c to load the configuration, but how i can overwrite parameters with same key?
thanks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Overriding a method with more parameters in java?
Currently, my solution is using optional parameters : class B extends A { public execute(int a, Object.
Read more >Override parameters on stack instances - AWS CloudFormation
You can override template parameter values when you first create the stack instances, and you can override parameter values for existing stack instances....
Read more >6.2 Creating Classes - Racket Documentation
Unused (by-name) arguments are to be propagated to the superclass, as described in Creating Objects. Multiple initialization arguments can use the same name...
Read more >Scala | Field Overriding - GeeksforGeeks
In order to execute a Field Overriding, we need to override variables that are declared utilizing only the val keyword in both super...
Read more >Overriding and Hiding Methods (The Java™ Tutorials ...
The overriding method has the same name, number and type of parameters, and return type as the method that it overrides. An overriding...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
in order to understand what is going on, in my conftest.py i put this
my pytest.ini file contains
addopts = --tc-file=configurations/utenze/andrea-integration.ini --tc-file=configurations/puntamenti/integration.ini
my cli command ispytest --tc-file=configurations/utenze/giordano-integration.ini --tc-file=configurations/puntamenti/integration.ini
running i obtainso i understand there are 4 parameters loading : 2 in pytest.ini e 2 in the command line.
my use case is to keep a pytest.ini for running with pycharm and override configuration for continous integration running, selecting the configuration of several environment and users running tests.
so my use case can be solved in a different way , i only need o understand well how to use these parameters.
append cli parameters cannot be overridden by the “ini override”
you need to add a own cli parameter which resets the list