-
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
Cannot discover with pytest in 2020-01 #9450
Comments
I've installed the 2020.1 on another pc (also windows 10 with the same python configuration) and I have the same problem. |
I've got a similar problem with windows 10 and pytest! In my case it cannot find the package for which the tests are, The same package configuration worked without any problems with extension version 2019.11.50794. I think it has to do with the environment from which the python command that runs the discovery script is invoked, but this is only a guess. Maybe i find time to dig deeper in the source code to see what changed between this and the prior release with regard to test discovery. Worth to mention that this needs to be a windows specific problem because i tried it in WSL and there it works, tests are being discovered as expected. When reverting the extension to the prior version 2019.11.50794 it works again in windows 10. |
@phloose Your issue might be different from this. @CaselIT Unfortunately, I am not able to reproduce this issue with the steps you mentioned. I was using The first issue you face is an upstream conda issue conda/conda#9571. For some reason it didn't happen in my machine. Regarding
If conda run is the problem, this issue should be fixed with #9490. Thanks for providing such detailed issue btw. |
Thanks for the feedback. I'll try to check your suggestions.
This gives me the error conda list
I'll try updating conda and checking the path |
I've tried updating conda to version 3.8.1 and checking for not existing paths in the path. I had a couple. I have the same error if the base env does not have pytest installed, but after installing I can corretly dicover the tests, ie I no longer get the error I've tried in another project and it seems that that the discovery run on the base env (it fails to impor some other package), so the current error probably happens because of the conda bug you linked to conda/conda#9571 I guess that the pr #9490 will fix this issue. Is the plan to release a fix to the 2020.1 or will it be in to 2020.2? (Just to know if I have to hold off updating until then) Regarding the path, it's strange that it gives error, every other application I use, including the previous version of the extension, was working correctly. I think this can be closed (now or when #9490 is merged) Thanks for the help |
We plan to release it on Monday. The version would start with 2020.1 |
When i use @CaselIT example repo and try to discover tests i get the following error:
@karrtikr i think my error, despite a different message |
@phloose this problems seems to be that conda is using the base env, instead of the one you specify. |
Yes, you're right. The error you face is related to the same conda issue. But @CaselIT also faced another error related to invalid paths, which you did not face. |
Do you this that the invalid path error is conda's fault, or something in the extension? I think is should be fixed, since it may happen that some folder that no longer exists are left in the path. I can open an issue in the conda repo if the fault lies in conda |
What're the paths that you removed? Why were they non existent? I believe it's not related to conda or the extension, but just a PEBCAK/ user error. |
They were normal folders that no longer exist. I don't know why they where left there and honestly it is not important. They should not cause problems regardless of their presence |
So they're not related to the extension or conda. It was just a bad setup on your system.
But it just did :) |
so the problem is with conda or the extension... |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version #3977): Language ServerExpected behaviour
The test are discovered
Actual behaviour
Since updating to the version 2020.1 I have the following two problems when discovering the tests with pytest:
Steps to reproduce:
The text was updated successfully, but these errors were encountered: