You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test runner appears to not respect the selected interpreter setting #7215
Extension version: 2019.9.34474
VS Code version: Code 1.38.0 (3db7e09, 2019-09-03T21:47:00.464Z)
OS version: Darwin x64 18.6.0
In settings.json I selected an interpreter (that has some additional dependencies for pytest installed) via "python.pythonPath". When I run pytest tests from the terminal (with the appropriate interpreter activated) my tests run fine, while the test runner complains
"Test discovery error, please check the configuration settings for the tests."
due to some pytest argument error (presumably caused by not finding the proper dependencies)
@SaschaSchlemmer, sorry for the delay. The "Python test log" output panel should have included more information than that, such as error output from pytest or the test adapter script we use. Please include that output.
Also, what command do you see run for test discovery in the "Python" output panel? It should reflect your "python.pythonPath" setting.
I may have some additional info. I have Python 3.8 installed, but my Python 3.7 folder/exe is my default (interpretter is selected as Python 3.7.4 64-bit, that is the version in my venv, PY_PYTHON 3.7 and only my python37/Scripts folder on the PATH), yet I keep getting complaints that the extension cannot find pytest, even though it is installed via Python 3.7.
If I click the "pytest is not installed" pop-up "yes" to install pytest, the command is installing pytest using Python 3.8 (and the --user tag).
I cannot figure out why the Python extension is assuming I want it to use Python 3.8 and it's system and/or user directories as the location for pytest.
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.
Activity
stereobutter commentedon Sep 5, 2019
The issue occurs with a local repo cloned from https://github.com/dry-python/returns where
poetryis used to manage dependencies.ericsnowcurrently commentedon Sep 6, 2019
Hi @SaschaSchlemmer. Thanks for letting us know about this. I have some questions:
stereobutter commentedon Sep 7, 2019
"/Users/sascha/Library/Caches/pypoetry/virtualenvs/returns-py3.6/bin/python"ericsnowcurrently commentedon Oct 7, 2019
@SaschaSchlemmer, sorry for the delay. The "Python test log" output panel should have included more information than that, such as error output from pytest or the test adapter script we use. Please include that output.
Also, what command do you see run for test discovery in the "Python" output panel? It should reflect your
"python.pythonPath"setting.LightCC commentedon Nov 8, 2019
I may have some additional info. I have Python 3.8 installed, but my Python 3.7 folder/exe is my default (interpretter is selected as Python 3.7.4 64-bit, that is the version in my venv,
PY_PYTHON 3.7and only mypython37/Scriptsfolder on the PATH), yet I keep getting complaints that the extension cannot find pytest, even though it is installed via Python 3.7.If I click the "pytest is not installed" pop-up "yes" to install pytest, the command is installing pytest using Python 3.8 (and the
--usertag).I cannot figure out why the Python extension is assuming I want it to use Python 3.8 and it's system and/or user directories as the location for pytest.
ericsnowcurrently commentedon Nov 11, 2019
Thanks for the update. Please answer the following:
Thanks!
brettcannon commentedon Jan 8, 2020
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on then we will be happy to re-open this issue to pick up where we left off.