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

VSCode test discovery hangs forever loading (downgraded to previous version 2024.22.0 and now working as expected) #24684

Closed
ginesr opened this issue Jan 5, 2025 · 6 comments
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@ginesr
Copy link

ginesr commented Jan 5, 2025

Environment data

  • Pylance version: 2024.22.1
  • OS and version: MacOS Sequoia 15.2 (24C101)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.21

Code Snippet

No code this is broken in vscode

Repro Steps

  1. Click on the tests icon, discover tests loads forever
  2. Click on reload tests nothing happen

It started with version 2024.22.1

Expected behavior

Show a list of tests to run

Actual behavior

Loading forever, never ends, no errors, nothing in logs

Logs

Nothing in logs
@Declow
Copy link

Declow commented Jan 6, 2025

I'm experiencing the same issue with version 2024.22.1
When trying to force a new refresh of the discovery I get the following error.
2025-01-06 10:15:18.714 [info] Running discovery for pytest using the new test adapter.
2025-01-06 10:15:18.714 [error] Test discovery already in progress, not starting a new one.

  • OS and version: MacOS Sequoia 15.1
  • Python version: 3.10.13

@bschnurr bschnurr transferred this issue from microsoft/pylance-release Jan 6, 2025
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 6, 2025
@bschnurr
Copy link
Member

bschnurr commented Jan 6, 2025

I believe test discovery belongs to vscode-python

@spokeydokeys
Copy link

We are seeing this same behavior in my team on MacOS with VSCode (which we updated today as part of our exploration of the error). We tried downgrading pylance but it didn't help. We are running Python 3.11.

Running pytest --collect-only in a terminal outputs the correct list. In the testing extension, if we "refresh" the test list, we see a list of collected tests in the python > output window, but it never finishes and doesn't populate the extension window. If we run "refresh" again, we get the same errors @Declow cited above.

@robws
Copy link

robws commented Jan 6, 2025

Same exact thing Mac, Python 11, pyenv

@babbtx
Copy link

babbtx commented Jan 6, 2025

Same here. Python 3.11.9 with pyenv virtualenv, unittest (not pytest). Downgraded and it works again. python -m unittest discover runs tests just fine.

@eleanorjboyd
Copy link
Member

duplicate of #24656, sorry for the problem and we are working on a fix! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

7 participants