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
{{ message }}
Repository navigation
weird behavior of "Debug Test" using pytest #21833
When I right click the pytest mark and select "Debug Test", the behavior is wierd.
The first time I do this, the DEBUG CONSOLE panel is opened like this. This is the expected behavior.
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").
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
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!
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.
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.
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.
Activity
eleanorjboyd commentedon Aug 17, 2023
Hi! Thank you for the bug report- I will investigate
eleanorjboyd commentedon Aug 21, 2023
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 userssettings.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!ladyrick commentedon Aug 22, 2023
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.

eleanorjboyd commentedon Aug 29, 2023
thank you for much for the information. I will work on this!
eleanorjboyd commentedon Oct 16, 2023
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.[-]wierd behavior of "Debug Test" using pytest[/-][+]weird behavior of "Debug Test" using pytest[/+]brettcannon commentedon Nov 30, 2023
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.