Open harmin-parra opened 10 months ago
A more clear message can help understand the user which plugins are incompatible, so the user can install them in separate python virtual environments.
This seems like a pain, is there no way the plugin could be included in the cmd argument? So pytest <plugin> [command]
rather than pytest <command>
? That would add some form of name spacing and prevent the issue.
What's the problem this feature will solve?
When 2 plugins add/register the command-line option, the error displayed by pytest is not clear enough. It would be nice if pytest could display the list of plugins adding the same option.
Describe the solution you'd like
The actual error is:
It would be nice to add or replace the last line with a list of plugins adding the same option.
argparse.ArgumentError: argument --browser: conflicting option string: --browser added by plugins: ['plugin1', 'plugin2']
or at least, a more clear, generic message like:
argparse.ArgumentError: argument --browser: conflicting option string: --browser added by two or more plugins.
As time passes by, the number of third-party plugins is going to grow and the risk of command-line option collisions will become inevitable, making the co-existence of some plugins impossible.
A more clear message can help understand the user which plugins are incompatible, so the user can install them in separate python virtual environments.
Alternative Solutions
No workaround.
Additional context