Conversation
test/_prepare_outputs.py
Outdated
| import glob | ||
| import os | ||
| import subprocess | ||
| import sys |
There was a problem hiding this comment.
This is not required if you have a venv.
There was a problem hiding this comment.
Does it hurt though? If not, it seems to me better to keep it.
There was a problem hiding this comment.
Yes. It hurts. Please read Why do virtual environments exist? from a long-term core Python developer and head of Python development for VSCode... https://snarky.ca/how-virtual-environments-work
There was a problem hiding this comment.
In the end, whether you type
pythonafter activation or.venv/bin/pythonmakes no difference to Python
Hum I don't know if I'm reading that right, but it seems to me this implies it would not hurt, as it says it makes no difference, no? 🤔
There was a problem hiding this comment.
It says that the goal of using a virtualenv to avoid installing your dependencies into your system Python.
Doing so can cause dependency conflicts that can become unresolvable when multiple projects are installed.
There was a problem hiding this comment.
Yes, I do see the upsides of using a virtualenv, much less troublesome than spawning a docker container. But I thought you were saying “it hurts to use sys.executable instead of "python"”, and – I guess this where I’m missing something – I don’t see how that relates to virtualenv or how it would hurt.
| @@ -1,6 +1,7 @@ | |||
| import glob | |||
There was a problem hiding this comment.
This is not required if you have a venv.
Co-authored-by: Christian Clauss <[email protected]>
sys.executable instead of "python"|
The reason for the shift to |
I couldn't find docs on how to run tests locally, so I had to take a few guesses. I'm suggesting a section at the end of the README.