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

Python test runner is extremely slow #20669

Closed
JP01 opened this issue Feb 8, 2023 · 6 comments
Closed

Python test runner is extremely slow #20669

JP01 opened this issue Feb 8, 2023 · 6 comments
Assignees
Labels
area-testing triage-needed Needs assignment to the proper sub-team

Comments

@JP01
Copy link

JP01 commented Feb 8, 2023

Describe the feature you are requesting
Python tests (at least unittest) are slow using the Test runner. This appears to be because it runs each test individually. If I run them from command line it takes about 3 seconds to run 900 tests. Running from vscode instead takes about 3 minutes.

Reasons for requesting this feature
Tests are orders of magnitude slower to execute from vscode vs commandline.

Describe alternatives you've considered
Running tests in the command line is fine I guess, but it would be nice to have the integrated test runner work better.

@bschnurr
Copy link
Member

bschnurr commented Feb 8, 2023

do you have a code repo or sample project you can share?

@StellaHuang95 StellaHuang95 transferred this issue from microsoft/PTVS Feb 8, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 8, 2023
@rchiodo
Copy link

rchiodo commented Feb 8, 2023

This functionality is actually part of the python extension, and not pylance. Transferring.

@rchiodo rchiodo transferred this issue from microsoft/pylance-release Feb 8, 2023
@parched
Copy link

parched commented Feb 13, 2023

I see the same behaviour in our project with pytest too.

@eleanorjboyd
Copy link
Member

Hello! Sorry for the delayed response. These issues are both likely related to our current testing infrastructure set up. We are doing a rewrite which should help with performance right now and you can follow along with major updates here: #17242. Thanks!

@JP01
Copy link
Author

JP01 commented Feb 14, 2023

Thanks so much Eleanor!
Hopefully this can be looked at soon :)

Is this something that is accepting open contribution or is it something being worked on internally?

@JP01 JP01 closed this as completed Feb 14, 2023
@JP01 JP01 reopened this Feb 14, 2023
@JP01 JP01 closed this as completed Feb 14, 2023
@eleanorjboyd
Copy link
Member

Hi @JP01 sorry for the delay. I am currently working on it myself as my core python responsibility. You are welcome to follow along since all the PRs and issues I create relating to this work are public. The iteration plan, a pinned issue in the python repo, will have the current tasks I am hoping to get done that month.

What will be extremely helpful is once this rewrite is released into insiders we will need to test it and determine any bugs. I will post on #17242 when it is ready for testing and so subscribe to that thread and I can notify you then!

Thank you for your offer to help and your participation in open source!v

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

No branches or pull requests

5 participants