-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
pytest --version might better avoid loading config #3692
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
Comments
Which, you can also disable with the configuration: [pytest]
addopts = -p no:cov And that suppresses those plugins:
Not saying it shouldn't act as you're describing, but I suspect there's current information that is produced in the |
Why was this closed? The issue is still present in pytest 5.4.1. |
pytest needs to parse the configuration in order to derive some information that may (or may not) be displayed in |
I see. How do I fix or work around the error the OP described: |
I suspect you're missing a plugin which implements that argument -- or you can remove the configuration, or you can ignore the configuration with something like |
Thanks! I solved the specific pandas error given in the OP by navigating to the inifile given in the error message and removing the line that contains |
Hmmm that got me an idea... perhaps we should have this instead:
And:
This seems more in line with how other tools implement |
or we could do like cpython: $ python3 --version
Python 3.6.9
$ python3 --version --version
Python 3.6.9 (default, Nov 7 2019, 10:44:02)
[GCC 8.3.0] |
Ahh right, good idea. 👍 But do we want:
Or:
? I slight prefer the former, if it doesn't make much difference. (the |
either seems fine to me, I have no preference between the two alternatives |
I think it's a good idea to include the tool name, Could be useful in case you've aliased it. |
Oh if more tools include the name, I agree we should go with the flow. I will open an issue. |
#7128 👍 |
not sure if easily doable but ideally the
--version
shouldn't depend on parsing config etc, and just spit out a version of pytest since it might be the one to decide either config needs to be patched etc. ATM for me that fails:The text was updated successfully, but these errors were encountered: