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

Test discovery command does not call the python interpreter #22612

Closed
remko-bw opened this issue Dec 8, 2023 · 2 comments
Closed

Test discovery command does not call the python interpreter #22612

remko-bw opened this issue Dec 8, 2023 · 2 comments
Assignees
Labels
area-testing info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team

Comments

@remko-bw
Copy link

remko-bw commented Dec 8, 2023

Type: Bug

Behaviour

Expected vs. Actual

Expected: When I open the Test Explorer and trigger test discovery, it should discover tests.
Actual: No tests are discovered.

When I look in the Python output, I can see that the command to invoke pytest is not correct.

This is what I see:

> ./.venv -m pytest -p vscode_pytest --collect-only

This is what I expect to see:

> ./.venv/bin/python -m pytest -p vscode_pytest --collect-only

Steps to reproduce:

Open test explorer, and click the 'Reload' button.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.10
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

2023-12-08 10:05:21.377 [info] > . ./.venv/bin/activate && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python ~/.vscode/extensions/ms-python.python-2023.22.0/pythonFiles/printEnvVariables.py
2023-12-08 10:05:21.377 [info] shell: bash
2023-12-08 10:05:21.441 [info] > ./.venv -m pytest -p vscode_pytest --collect-only
2023-12-08 10:05:21.441 [info] cwd: .

User Settings


languageServer: "Pylance"

testing
• pytestEnabled: true

Extension version: 2023.22.0
VS Code version: Code 1.85.0 (af28b32d7e553898b2a91af498b1fb666fdebe0c, 2023-12-06T18:18:04.614Z)
OS version: Darwin x64 23.1.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 1, 1, 1
Memory (System) 16.00GB (0.42GB free)
Process Argv --crash-reporter-id a33ad7d1-2684-468f-97f9-926051e802ed
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30899288
vsclangdc:30486549
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyone:30548225
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
0bi6i642:30917235
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialogc:30910334
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Dec 8, 2023
@remko-bw remko-bw changed the title Discovery does not call the python interpreter Test discovery command does not call the python interpreter Dec 8, 2023
@macieyng
Copy link

macieyng commented Dec 8, 2023

Can you share your settings.json and launch.json?

I alo have a problem with tests discovery.
Output from console

2023-12-08 13:34:35.240 [info] Running discovery for pytest using the new test adapter.
2023-12-08 13:34:35.571 [info] Discover tests for workspace name: azure_functions - uri: /Users/***/repos/***/azure_functions
2023-12-08 13:34:35.571 [info] Running discovery for pytest using the new test adapter.
2023-12-08 13:34:41.982 [info] Discover tests for workspace name: azure_functions - uri: /Users/***/repos/***/azure_functions
2023-12-08 13:34:41.982 [info] Running discovery for pytest using the new test adapter.
2023-12-08 13:34:52.287 [info] Discover tests for workspace name: azure_functions - uri: /Users/***/repos/***/azure_functions
2023-12-08 13:34:52.287 [info] Running discovery for pytest using the new test adapter.
2023-12-08 13:43:22.394 [info] Discover tests for workspace name: azure_functions - uri: /Users/***/repos/***/azure_functions
2023-12-08 13:43:22.395 [info] Running discovery for pytest using the new test adapter.
2023-12-08 13:43:37.003 [info] Discover tests for workspace name: azure_functions - uri: /Users/***/repos/***/azure_functions
2023-12-08 13:43:37.003 [info] Running discovery for pytest using the new test adapter.

Nothing really happens, when I open testing side panel. Only those logs.

Might be related to #22504

@eleanorjboyd eleanorjboyd self-assigned this Dec 11, 2023
@eleanorjboyd
Copy link
Member

Hi! This is this issue #22618. Working on a fix now but please follow this thread for updates.

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Dec 12, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2024
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