Skip to content
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

weird behavior of "Debug Test" using pytest #21833

Closed
ladyrick opened this issue Aug 17, 2023 · 6 comments
Closed

weird behavior of "Debug Test" using pytest #21833

ladyrick opened this issue Aug 17, 2023 · 6 comments
Assignees
Labels
area-testing info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@ladyrick
Copy link

Type: Bug

When I right click the pytest mark and select "Debug Test", the behavior is wierd.
iShot_2023-08-17_21 21 23

The first time I do this, the DEBUG CONSOLE panel is opened like this. This is the expected behavior.
iShot_2023-08-17_21 21 05

But the second time I do this, the TEST RESULTS (instead of DEBUG CONSOLE) panel is opened like this. This is not the expected behavior. This is just like the behavior of "Run Test" (instead of "Debug Test").
iShot_2023-08-17_21 20 22

Usually I want to see the output of the print in the test function. So I like to use "Debug Test". This bug really bothers me.

By the way, why there is a large blank area in the middle of TEST RESULTS panel? I think this is also a bug. This "thing" shows when I kill the TEST RESULTS panel and use "Run Test" again.

Extension version: 2023.14.0
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:40:25.698Z)
OS version: Darwin arm64 22.5.0
Modes:
Remote OS version: Linux x64 5.4.119-19-0009.11

System Info
Item Value
CPUs Apple M1 Pro (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 1, 2, 2
Memory (System) 32.00GB (3.44GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote SSH: devbox
OS Linux x64 5.4.119-19-0009.11
CPUs AMD EPYC 7K83 64-Core Processor (32 x 2545)
Memory (System) 61.57GB (57.42GB free)
VM 0%
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Aug 17, 2023
@eleanorjboyd
Copy link
Member

Hi! Thank you for the bug report- I will investigate

@eleanorjboyd
Copy link
Member

Are you on the new testing rewrite? You can check for it by looking at Experiment 'pythonTestAdapter' is active in your python logs. If not can you please turn it on and let me know if the behavior changes? You can do so adding this setting to your users settings.json "python.experiments.optInto": ["pythonTestAdapter"]. If you are unable to see the log for the experiment chance your log level to info or trace and it should show up. Thanks!

@eleanorjboyd eleanorjboyd added the info-needed Issue requires more information from poster label Aug 21, 2023
@ladyrick
Copy link
Author

Are you on the new testing rewrite? You can check for it by looking at Experiment 'pythonTestAdapter' is active in your python logs. If not can you please turn it on and let me know if the behavior changes? You can do so adding this setting to your users settings.json "python.experiments.optInto": ["pythonTestAdapter"]. If you are unable to see the log for the experiment chance your log level to info or trace and it should show up. Thanks!

Hello. Thank you for your reply.
I tried to add the experiments setting and now there is a "Experiment 'pythonTestAdapter' is active" in the python OUTPUT.

I reproduced the bug. The only thing changed is the output on TEST RESULTS. Now it only print a "Finished running tests!". Debug Test still cannot auto open the DEBUG CONSOLE, and the wierd blank area is still there.
image

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Aug 22, 2023
@eleanorjboyd
Copy link
Member

thank you for much for the information. I will work on this!

@eleanorjboyd
Copy link
Member

Hello! I have done a lot of improvements to the output in the test result panel with the experiment turned on. Could you see if it looks any better now? (currently the changes are only out on insiders). Additonally do you have any value for this settings "testing.openTesting": "",? Wondering if that is causing the weird behavior with the test panel popping up.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 16, 2023
@brettcannon brettcannon changed the title wierd behavior of "Debug Test" using pytest weird behavior of "Debug Test" using pytest Nov 30, 2023
@brettcannon
Copy link
Member

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants