microsoft / vscode-python

Python extension for Visual Studio Code
https://aka.ms/pvsc-marketplace
MIT License
4.27k stars 1.16k forks source link

Test Results Output show only fixtures in test tree #23578

Open a-kachurin-trassir opened 1 month ago

a-kachurin-trassir commented 1 month ago

Type: Bug

Behaviour

In Test Result Output, when viewing the test results in the right-hand panel, only the names of the test fixtures are displayed instead of the full test descriptions, if test parametrized. Additionally, the tests are sorted alphabetically rather than by their location in the file, which can disrupt the context and flow of test reviews.

Steps to reproduce:

  1. Write tests with parametrizred fixtures
  2. Run the tests using the built-in test runner in VSCode.
  3. Observe the test output in the right-hand 'Test Results' panel.

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

``` XXX ```

Extension version: 2024.8.0 VS Code version: Code 1.90.0 (89de5a8d4d6205e5b11647eb6a74844ca23d2573, 2024-06-04T19:33:54.889Z) OS version: Windows_NT x64 10.0.22631 Modes:

User Settings

``` languageServer: "Pylance" testing • pytestArgs: "" • pytestEnabled: true experiments • optInto: ["All"] ```

Installed Extensions |Extension Name|Extension Id|Version| |---|---|---| |Code Spell Checker|streetsidesoftware.code-spell-checker|3.0.1| |Flake8|ms-python.flake8|2023.10.0| |Git Graph|mhutchie.git-graph|1.30.0| |GitHub Copilot|GitHub.copilot|1.200.0| |GitHub Copilot Chat|GitHub.copilot-chat|0.16.0| |GitLens — Git supercharged|eamodio.gitlens|15.0.4| |IntelliCode|VisualStudioExptTeam.vscodeintellicode|1.3.1| |IntelliCode API Usage Examples|VisualStudioExptTeam.intellicode-api-usage-examples|0.2.8| |isort|ms-python.isort|2023.10.1| |JavaScript Debugger|ms-vscode.js-debug|1.90.0| |JavaScript Debugger Companion Extension|ms-vscode.js-debug-companion|1.1.2| |Project Manager|alefragnani.project-manager|12.8.0| |Pylance|ms-python.vscode-pylance|2024.6.1| |Python|ms-python.python|2024.8.0| |Python Debugger|ms-python.debugpy|2024.6.0| |Python Indent|KevinRose.vsc-python-indent|1.18.0| |Python Type Hint|njqdev.vscode-python-typehint|1.5.1| |Russian - Code Spell Checker|streetsidesoftware.code-spell-checker-russian|2.2.2| |Sourcery|sourcery.sourcery|1.19.0| |Table Visualizer for JavaScript Profiles|ms-vscode.vscode-js-profile-table|1.0.9|
System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i7-13700K (24 x 3418)| |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| |Load (avg)|undefined| |Memory (System)|63.83GB (44.61GB free)| |Process Argv|--crash-reporter-id fdf547ee-bc14-456a-891b-f439b9300fd0| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupytercf:31046870 26j00206:31048877 ```
a-kachurin commented 1 month ago

image

eleanorjboyd commented 1 month ago

Hi! Can you send an example of the actual and expected you are seeing? Just so I understand what you think the name should be verse what you are seeing- thanks!

a-kachurin commented 1 month ago

I would like to see the name of the test function + parametrization in the results, as shown here in the test tree: image Right now, I'm unable to understand the results when a function has parametrization, as the test name is missing: image

eleanorjboyd commented 1 month ago

marking this as a feature request since this was intentional to not make the name too long- based on votes we can determine which people prefer. Thanks!

github-actions[bot] commented 1 month ago

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.