-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
No code lenses shown for pytest #6303
Comments
I can verify. |
CodeLenses are not showing for me with 2019.7.21668-dev. Works fine with 2019.5.18875 VS Code 1.35.1 |
I see pytest code lenses on 2019.7.21619-dev, so must have been a very recent breakage. |
It works for me too (always). |
Same issue here (no codelens visible). How can I help to investigate it? Additionally I have setup.py: [aliases]
test = pytest
[tool:pytest]
addopts =
--cov=./tests
--cov-report=xml
--cov-report=html:coverage and next option ignored now (but worked some days ago) and debug doesn't work (due to coverage enabled), deleting setup.py allowing to debug but it's not a solution: {
"python.testing.pytestArgs": [
"--no-cov"
]
} I've switched to Nose and codelens appeared. Codelens disappeared when I switched back to PyTest. |
I've resolved this issue (codelens is visible now) by renaming first letter of the first dir in the workspace path to lowercase. It was sole uppercase letter in the path. But it was uppercase all its lifetime and I had no problems with codelens and debug. Don't forget to remove cache folders ( Is it relevant to microsoft/vscode#12448? |
@korn-1c-ru thanks for the diagnosis! |
FWIW, the adapter effectively [1] returns whatever pytest gives it. We have no guarantees about casing or even that the returned root and test source will be in the workspace. So we should always match carefully, as much as possible. What pytest provides will almost always be okay, but the mitigation is worth doing anyway (not big nor complicated). [1] Currently we normcase but the situation remains either way. |
CTI said they ran into this again. |
Well I'm unable to reproduce this. Maybe they have some extension like liveshare installed, which is known to cause problems with codelenses. |
Visual Studio Code - Insiders: 1.36.0-insider
python-insider: 2019.6.21464-rc
Repro steps:
Actual Result:
No code lenses shown after run all tests
Expect Result:
It should display code lenses
The text was updated successfully, but these errors were encountered: