question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`-p` does not pick up value if there is no space

See original GitHub issue

pytest 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:closed
  • Created 5 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
caramelomartinscommented, Aug 26, 2018

@nicoddemus I understood your point now. I agree.

0reactions
RonnyPfannschmidtcommented, Dec 21, 2018

fixed by #4522

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found