-
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
Unwanted debug output when running unittests. #24743
Comments
Hi thanks for the bug- yes this is not ideal. I will get rid of |
On further look I actually cant find |
@eleanorjboyd Thanks for the review!
Exactly / agreed. Just curious, is the
Just installed the pre-release, 2024.23.2025012801 . This does fix the output, and this string no longer appears!
I am hardly the expert on VS Code to maybe even weigh-in on this decision. There are several Python-related pages under "Output", including "Python", "Python Test Log", and even "Pylint". Everything under "Python" already appears to be properly log-formatted (date and severity details included per-line), so maybe such needed debugging details could go there, as needed? As proper log statements, at a debug level that can even be hidden from there, by default, as appropriate? Thanks! |
Hi, I also experienced this issue.
I support this. The current output is unexpected and, in my case, led to confusion about the origin of the message. |
Type: Bug
Behavior
Apparent verbose / debug output is being included into the "Test Results" output when running Python tests using unittest (the "Standard Python test framework").
Specifically, "
writing more bytes!
" seems to be written at least once per test that generates output - and multiple times for longer outputs. I can't find this string anywhere on a search of this repository or other web searching.The beginning "
Received test ids from temp file.
" fortunately only happens once at the beginning of each test run. I did find this atvscode-python/python_files/unittestadapter/execution.py
Line 298 in 4322684
These outputs are not generated by or expected from a usual test run from outside of the VS Code interface, as seen here - even with verbose output enabled:
(The ending "
Finished running tests!
" seems appropriate, and this is seen at the end of running with either unittest or pytest.)First observed this on my primary development workstation, then reproduced on a clean install of VS Code and Python on a Windows VM - which is where the artifacts in this report were generated from.
Steps to reproduce:
Test Results
output.Note that running even the same unittest unit tests using pytest does not result in the same outputs. Though pytest then also does not include the outputs from my own
print
statements as unittest is.Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Also, from the
Python Test Log
Output
panel:Extension version: 2024.22.2
VS Code version: Code 1.96.4 (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.26100
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software
webnn: unavailable_software
A/B Experiments
The text was updated successfully, but these errors were encountered: