Replies: 2 comments 2 replies
-
I rolled back VS Code to
and the Python extension to v2023.8.0 and all is good. Running again
the issue occurs with Python extensions newer than v2023.8.0. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hi @FRidh, apologies for the delay I will review this and get back to you, sorry! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We're having a monorepo with several packages and are using pytest as test runner. The dependencies are provided by a Nix environment. To have all the Python-parts in VS Code pick everything I tried several things in the past, eventually landing with a setup that was functioning for everyone. Suddenly the "testing" part wasn't able to find the packages in the repo, at least for some, while using pytest directly in the terminal discovers everything fine.
Even on different machines with the exact repo (and thus Nix environment), VS Code build, and plugin versions it sometimes works, sometimes not.
The
.vscode/settings.json
is a symlink to a file in the repo containingIn the terminal, users run
nix develop
which ensures the symbolic link is created, and the Nix environment is availableAs you can see, we export here
PYTHONPATH
which supposedly should be picked up by other tools.There is also a
.env
file that hasIn
pytest.ini
we configure that we needimportlib
import mode.So, now I am wondering. How does the testing part exactly find tests? Which environment variables or configuration does it consider?
Note executing from the terminal
functions fine! Which makes me wonder, is whatever call that invokes this overwriting
PYTHONPATH
instead of prefixing it?Beta Was this translation helpful? Give feedback.
All reactions