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
I have recently moved to a new computer with Windows 11, and I am not able to discover tests on any repositories anymore (note that I'm not 100% sure that they never worked when I first moved to this computer, just very high possibility). I've configured the most basic way of discovering tests with pytest, and I get these logs whenever I try to discover the tests (that do exist in project\tests):
2025-07-28 13:57:07.260 [debug] Testing: Manually triggered test refresh
2025-07-28 13:57:07.260 [debug] Testing: Clearing all discovered tests
2025-07-28 13:57:07.260 [debug] Testing: Forcing test data refresh
2025-07-28 13:57:07.260 [debug] Testing: Refreshing all test data
2025-07-28 13:57:07.261 [info] Discover tests for workspace name: <cwd> - uri: c:\Users\<me>\path\to\cwd
2025-07-28 13:57:07.262 [debug] Starting Test Discovery named pipe
2025-07-28 13:57:07.262 [debug] Test Discovery named pipe \\.\pipe\python-test-discovery-43dcd6a1a12d6b549427 connected
2025-07-28 13:57:07.263 [info] arg: --rootdir already exists in args, not adding.
2025-07-28 13:57:07.263 [info] Environment variables set for pytest discovery: PYTHONPATH=c:\Users\<me>\.vscode\extensions\ms-python.python-2025.10.1-win32-x64\python_files, TEST_RUN_PIPE=\\.\pipe\python-test-discovery-43dcd6a1a12d6b549427
2025-07-28 13:57:07.263 [debug] Running pytest discovery with command: -m pytest -p vscode_pytest --collect-only --rootdir=C:\Users\<me>\path\to\cwd\project for workspace c:\Users\<me>\path\to\cwd.
2025-07-28 13:57:07.665 [error] usage: conda-script.py [-h] [-V] command ...
conda-script.py: error: unrecognized arguments: --live-stream
2025-07-28 13:57:07.677 [error] Subprocess exited unsuccessfully with exit code 2 and signal null on workspace c:\Users\<me>\path\to\cwd
2025-07-28 13:57:07.677 [error] pytest test discovery error for workspace: c:\Users\<me>\path\to\cwd
The python test process was terminated before it could exit on its own, the process errored with: Code: 2, Signal: null for workspace C:\Users\<me>\path\to\cwd\project
Note that I tried to run the command that is mentioned that apparently fails, but it succeeds with the expected output (and similarly, I'm able to run the tests manually with the pytest command):
> set PYTHONPATH=c:\Users\<me>\.vscode\extensions\ms-python.python-2025.10.1-win32-x64\python_files
> set TEST_RUN_PIPE=\\.\pipe\python-test-discovery-43dcd6a1a12d6b549427
> python -m pytest -p vscode_pytest --collect-only --rootdir=C:\Users\<me>\path\to\cwd\project
My guess is that the Testing module tries to initiate conda one way or another, and this is failing, but I have no idea where to check anymore, especially since the --live-stream argument has been removed since conda 4.4 (if I remember correctly).
I have the following installations (I hope I didn't forget to specify something):
MS VS Code: 1.102.2
Anaconda 2019: 4.7.12 (Note that I am unable to update conda to a more recent version at the moment due to company policy, but we should update soon, hopefully the issue will disappear)
Python version in selected environment: 3.10.18 (It seems to be correctly used, but if I select another environment without pytest installed, I get the same error anyway)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have recently moved to a new computer with Windows 11, and I am not able to discover tests on any repositories anymore (note that I'm not 100% sure that they never worked when I first moved to this computer, just very high possibility). I've configured the most basic way of discovering tests with pytest, and I get these logs whenever I try to discover the tests (that do exist in project\tests):
Note that I tried to run the command that is mentioned that apparently fails, but it succeeds with the expected output (and similarly, I'm able to run the tests manually with the pytest command):
My guess is that the Testing module tries to initiate conda one way or another, and this is failing, but I have no idea where to check anymore, especially since the --live-stream argument has been removed since conda 4.4 (if I remember correctly).
I have the following installations (I hope I didn't forget to specify something):
Content of my settings.json:
Beta Was this translation helpful? Give feedback.
All reactions