Closed andrewstevens-infineon closed 1 month ago
Hi I think this is a duplicate of https://github.com/microsoft/vscode-python/issues/23408, please let me know if not and I can reopen- thanks!
It doesn't seem to cover the aspect that inconsistent launch environments between Run test and Debug test (definately not right). I'll add a comment in #23408.
Type: Bug
Behaviour
When a pytest test is launched using the "Run Test" Button/Command the environment of the selected virtualenv appears not to be set. This contrasts with the behaviour when "Debug Test" Button/Command is used where the Venv environment is used. This will (for example) break test suites relying on finding executables installed in the virtualenv bin directory on PATH.
Steps to reproduce:
def test_environ(): print("PATH", os.environ["PATH"])
N/A
languageServer: "Pylance"
testing • pytestEnabled: true
vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelt:31048053 dsvsc021:30996838 jg8ic977:31013176 pythoncenvptcf:31049071 a69g1124:31046351 pythonprt:31056678 dwnewjupytercf:31046870 26j00206:31048877