-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while collecting test results (Socket communication) #24724
Comments
Hi! Can you send a minimal repro? It seems like something that is being collected in your tests is not able to be parsed |
Unfortunately, I’m unable to provide a minimal reproducible example from my project, nor was I successful in setting up other examples to reproduce the issue. However, I observed that disabling pytest-xdist resolved the problem. Also, using Could it be that parallel execution with multiple workers is interfering with how pytest communicates with the VS Code extension, leading to data corruption? |
very interesting- @karthiknadig any ideas here? |
We can try replicating this with |
Type: Bug
Behaviour
When running tests using the Python extension, the test count displayed (passed/total) shows numbers lower than the actual results, as if the execution results of some tests are lost between the test run and communication with the extension. Specifically, the number of executed tests appears lower, sometimes significantly so (e.g., 151/179, but the total tests run were 1524).
This issue does not occur with version 2024.20.0. The behavior is random and unpredictable. I am unable to reproduce it outside the project I am currently working on.
I am using pytest, but the tests are contained in methods of classes inheriting from django.test.TestCase (which has never been an issue before).
Steps to reproduce:
I am unable to reproduce it outside the project I am currently working on.
Pytest plugins used: cov-6.0.0, env-1.1.5, django-4.9.0, xdist-3.6.1
Diagnostic data
Python
in theOutput
panelExtension version: 2024.22.2
VS Code version: Code 1.96.2 (Universal) (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Darwin arm64 24.2.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
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
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: