`-p` does not pick up value if there is no space
See original GitHub issuepytest 3.6.0 on CPython 3.6.5, OSX 10.11.6
Observed: For most options, the space between the short option name and its value is optional, but -p
behaves stangely: -pfoo
does not pick up the plugin, but it doesn’t print any warning or error either, while -p foo
works properly. -pno:foo
seems to behave the same way (no warning or error but doesn’t do anything either).
Expected: -pfoo
should either lead to foo being properly loaded, or it should raise some sort of error.
Example:
$ echo 'def pytest_addoption(parser): print("loaded")' > plugin.py
$ python -mpytest -s -p plugin -k xyz
loaded
=========================== test session starts ============================
platform darwin -- Python 3.6.5, pytest-3.6.0, py-1.5.3, pluggy-0.6.0
sensitiveurl: .*
Using --random-order-bucket=module
Using --random-order-seed=857883
rootdir: [snip], inifile:
plugins: variables-1.7.1, selenium-1.12.0, random-order-0.7.0, metadata-1.7.0, html-1.18.0, cov-2.5.1, base-url-1.4.1
[snip…]
$ python -mpytest -s -pplugin -k xyz
=========================== test session starts ============================
platform darwin -- Python 3.6.5, pytest-3.6.0, py-1.5.3, pluggy-0.6.0
sensitiveurl: .*
Using --random-order-bucket=module
Using --random-order-seed=465375
rootdir: [snip], inifile:
plugins: variables-1.7.1, selenium-1.12.0, random-order-0.7.0, metadata-1.7.0, html-1.18.0, cov-2.5.1, base-url-1.4.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Excel VLOOKUP not working - fixing #N/A and #VALUE errors
If extra spaces occur in the lookup column, there is no easy way to avoid #N/A errors in VLOOKUP. Instead, you can use...
Read more >How to correct a #NUM! error - Microsoft Support
A formula uses a function that iterates, such as IRR or RATE, and it can't find a result. To fix this, change the...
Read more >How to write Excel IF Function Statements
In this tutorial we're going to explain how to use the Excel IF function (also known as IF Statement), and look at a...
Read more >The IF Function In Power Query - Excelguru
Notice that there are no parenthesis or commas in the Power Query version, ... look up a corresponding value in a list, avoiding...
Read more >Running a t-test in Excel
Note: the Analysis TookPak is no longer included in Excel for the Mac. ... If you do not see the “Data Analysis” option,...
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
@nicoddemus I understood your point now. I agree.
fixed by #4522