My VSCode is able to find all my tests and lets my run them from the explorer, but upon running them it is calling the wrong path. I'm using a Poetry virtual environment which is in a different path than the tests.
From the Python Test Adapter Log:
INFO pytest at 'myproject': Running pytest with arguments: --rootdir=/Users/me/Desktop/myproject , Users/me/Desktop/project/tests/db/queries/my_test.py::test_fn
INFO pytest at 'myproject': Running /Users/me/Library/Caches/pypoetry/virtualenvs/myproject-api-NEejG4ix-py3.9/bin/pytest as an executable
CRIT pytest at 'myproject': Execution of the test Users/me/Desktop/project/tests/db/queries/my_test.py::test_fn" failed: Error: Process exited with code 4: ERROR: file or directory not found:
VSCode Settings:
"python.testing.pytestPath": "/Users/me/Library/Caches/pypoetry/virtualenvs/myproject-api-NEejG4ix-py3.9/bin/pytest",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["api/tests"],
Using this VSCode extension ID: littlefoxteam.vscode-python-test-adapter
Is there another setting for setting the path when running from the test explorer extension?