-
Notifications
You must be signed in to change notification settings - Fork 28
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
TestCase not show in Python Test Explorer and CodeLens adornments If one of pytest testcases got error during testcase discorver process #179
Comments
@SilenceHe Thank you for the issue. It looks like you're using Test Explorer from the Python Extension and not the Python Test Explorer. In case you're using Python extension to discover and run your tests, please, report the error to them - https://github.com/Microsoft/vscode-python. However, if you have Python Test Explorer installed it should show any tests with errors to you. It looks like this If Python Test Explorer does not show any tests, please, look at messages at Python Test Adapter Log in the Output section. It would be of help if you show the errors from that log and your settings (like python.pythonPath). |
Filed another bug for your advice here: microsoft/vscode-python#14116 |
@SilenceHe Thank you for clarification. Can you please take a look at messages at |
Thanks Nikolay Kondratyev, Python Test Adapter Log complains about 'pytest not installed', It works well after I set python.pythonPath to Python venv path, because pytest was installed in venv. |
@SilenceHe Glad you've resolved it! Just to be sure, does test discovery works for you even when you have tests with errors now? |
Yes, It works, even some cases got errors. |
For Example, I have 1000 pytest testcases in my project, but only one of them got error (like code defect, or logic issues, and so on...) cause testcase discorvery failed, For now, looks all testcases will not shown in Python Test Explorer List, and CodeLens adornments also not appeared within my testcase code, So It's hard for me to run or debug a normal (not the error testcase), I have to use other debuger tools like ipdb to debug my code. In this case, can we show the normal testcase and just exclude the error(s) in Python Test Explorer List? It's really hard for me if one case failures cause all testcases collect failed.
screenshots:
![Snipaste_2020-08-23_12-07-01](https://user-images.githubusercontent.com/4414171/90970595-a0afe500-e539-11ea-97f1-5ac739975eb2.png)
The text was updated successfully, but these errors were encountered: