-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UsageError raised when specifying config override options followed by test path(s) #3103
Comments
GitMate.io thinks the contributor most likely able to help you is @nicoddemus. |
Sounds reasonable, thanks @davehunt! |
Hi @davehunt, @nicoddemus |
@arcoyle thanks, we appreciate! Please go ahead! 😁 If you get stuck, feel free to open a PR anyway so we can help out over the code you managed to do so far. |
@nicoddemus I have opened a PR for this issue, could you please review. One thing I noticed while testing was the use of switch options before the test path stops the exception. Nothing is added to the list of key value pairs after the switch option. |
Hi, I'd love to contribute to pytest. My first contribution is checking if this issue is still relevant 😄. In my machine I can't reproduce this bug. I'm using the last version (3.4.0). |
Sorry @wagnerluis1982 this was already resolved by #3147 |
@wagnerluis1982 thanks for your interest in contributing, we really appreciate it. Triaging issues to see if they are still relevant (like you did now) is something that's also very helpful. 😁 |
Summary
When using
-o
or--override-ini
followed by one or more test paths, the session terminates with "ERROR: -o/--override-ini expects option=value style."pipenv graph
Operating System:
macOS High Sierra 10.13.2
Example:
The relevant code is below. I would suggest that we only raise the exception if the first value does not contain an '=', and stop considering values as overrides as soon as they no longer contain the character.
pytest/_pytest/config.py
Lines 1188 to 1202 in cf9b31b
The text was updated successfully, but these errors were encountered: