Skip to content
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

Duplicated Code Lens with Python extension #243

Closed
kingsimba opened this issue May 8, 2021 · 5 comments
Closed

Duplicated Code Lens with Python extension #243

kingsimba opened this issue May 8, 2021 · 5 comments

Comments

@kingsimba
Copy link

image

Is there any document tells how to fix this?

@jspreddy
Copy link

jspreddy commented May 9, 2021

This needs to be supported by vscode. They seem to be discussing a config option here:
microsoft/vscode-python#10898 (comment)

@kondratyev-nv
Copy link
Owner

@kingsimba @jspreddy Thank you for the issue. Unfortunately, this is because one set of Code Lenses is provided by the Python extension and another one is by Python Test Explorer. If you use only Python Test Explorer to run your tests, you can disable testing functionality by the Python extension with the following settings

{
    "python.testing.unittestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.pytestEnabled": false,
    "pythonTestExplorer.testFramework": "pytest" // (or unittest)
}

Let me know if this helps.

Related to #129.

@kingsimba
Copy link
Author

It helped! Thanks.

@kingsimba @jspreddy Thank you for the issue. Unfortunately, this is because one set of Code Lenses is provided by the Python extension and another one is by Python Test Explorer. If you use only Python Test Explorer to run your tests, you can disable testing functionality by the Python extension with the following settings

{
    "python.testing.unittestEnabled": false,
    "python.testing.nosetestsEnabled": false,
    "python.testing.pytestEnabled": false,
    "pythonTestExplorer.testFramework": "pytest" // (or unittest)
}

Let me know if this helps.

Related to #129.

@dandiep
Copy link

dandiep commented Jun 25, 2021

I would recommend putting this on the main extension page - it took me some digging to find this, and it is very confusing for a newbie (like myself) to have the two Run code lens buttons.

@kondratyev-nv
Copy link
Owner

@dandiep I've added the solution to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants