forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Type: Bug
Behaviour
Pytesting through UI doesn't work with WSL extension. An error occures when processing data sent from WSL to VScode :
Steps to reproduce:
- Create environnement with hatch (
hatch env run -e dev test) - Select interpreter in VSCode to point on the venv dir ( hatc
h env find dev) - Go to testing in VSCode, and play the test.
- Test pass without error, but the data is not sent back
Output for Python in the Output panel
Running pytest with args: ['-p', 'vscode_pytest', '--rootdir=/home/user/git/', '/home/user/git/app/tests/test_main.py::test_load_config', '/home/user/git/app/tests/test_main.py::test_get_db_connection_postgresql', '/home/user/git/app/tests/test_main.py::test_get_db_connection_mysql', '/home/user/git/app/tests/test_main.py::test_is_database_empty_postgresql', '/home/user/git/app/tests/test_main.py::test_is_database_empty_mysql', '/home/user/git/app/tests/test_main.py::test_execute_sql_file', '/home/user/git/app/tests/test_main.py::test_process_database_when_empty', '/home/user/git/app/tests/test_main.py::test_process_database_exception', '/home/user/git/app/tests/test_main.py::test_main_process_multiple_databases']
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-7.4.3, pluggy-1.5.0
rootdir: /home/user/git/
plugins: mock-3.14.0
collected 9 items
app/tests/test_main.py Plugin error, exception thrown while attempting to send data[vscode-pytest]: unsupported operand type(s) for +=: 'int' and 'NoneType'
[vscode-pytest] data:
{"jsonrpc": "2.0", "params": {"cwd": "/home/user/git/", "status": "success", "result": {"/home/user/git/app/tests/test_main.py::test_load_config": {"test": "/home/user/git/app/tests/test_main.py::test_load_config", "outcome": "success", "message": null, "traceback": null, "subtest": null}}, "not_found": null, "error": null}}
(X9)
. [100%]
============================== 9 passed in 0.05s ===============================
Finished running tests!
Extension version: 2025.0.0
VS Code version: Code 1.97.0 (33fc5a94a3f99ebe7087e8fe79fbe1d37a251016, 2025-02-04T22:41:26.688Z)
OS version: Windows_NT x64 10.0.26100
Modes:
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2
- Python version (& distribution if applicable, e.g. Anaconda): 3.11.2
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| debugpy | ms- | 2025.0.0 |
| gitlens | eam | 16.3.0 |
| js-debug | ms- | 1.97.0 |
| python | ms- | 2025.0.0 |
| vscode-js-profile-table | ms- | 1.0.10 |
| vscode-pylance | ms- | 2025.2.1 |
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) Ultra 9 185H (22 x 3072) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.46GB (12.42GB free) |
| Process Argv | --crash-reporter-id bb4a69d2-a4d3-44a5-b62b-19c8f9b82470 |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Debian |
| OS | Linux x64 5.15.167.4-microsoft-standard-WSL2 |
| CPUs | Intel(R) Core(TM) Ultra 9 185H (22 x 0) |
| Memory (System) | 15.35GB (13.51GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Debian |
| OS | Linux x64 5.15.167.4-microsoft-standard-WSL2 |
| CPUs | Intel(R) Core(TM) Ultra 9 185H (22 x 0) |
| Memory (System) | 15.35GB (13.51GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | WSL: Debian |
| OS | Linux x64 5.15.167.4-microsoft-standard-WSL2 |
| CPUs | Intel(R) Core(TM) Ultra 9 185H (22 x 0) |
| Memory (System) | 15.35GB (13.51GB free) |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
9064b325:31222308
copilot_t_ci:31222730
jda6j935:31233686
Metadata
Metadata
Assignees
Labels
area-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug