-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Only Run Test Discovery for Specific File On Save #22582
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
Comments
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. |
@shanewazabbas, here is the code that would be needed to get per file discovery on save. I was writing up how to do it and in doing so realized it was more complicated and did some of it myself to test the feasibility. Put this PR together as an example. It definitely needs some refinement to handle other edge cases. Here is the PR if you want to review and ill speak with my team on what a timeline for this could look like. Thanks https://github.com/eleanorjboyd/vscode-python/pull/23/files |
Awesome Thanks, @eleanorjboyd. I'll take a look tomorrow, was busy with work all day today, so haven't had time. |
realized we already have a long-running issue for this in our backlog. Closing this issue in favor of #4586. Move to the new thread for further discussion. Thanks |
@shanewazabbas, I wanted to check in here, did you want to work on this (im forgetting if we discussed this earlier)? I could guide you a bit as I do not have the bandwidth right now to prioritize this issue to do myself. Otherwise I can come back to it in a few months. Thanks! |
Currently there is a setting which allows a user to select either run test discovery on save or not:
"python.testing.autoTestDiscoverOnSaveEnabled": true
. The two values aretrue
andfalse
, withtrue
then every time a file in the editor is saved, test discovery is run and withfalse
it is never run on save.For large repos, these two options offer limited selection in terms of functionality. Instead we should offer that test discovery only be performed on the specific file that save was executed on. Therefore we will not re-run discovery on the whole repo as often, which can be a time-intensive especially for large repos.
This feature would add a setting, or modify the existing setting to add another option, to allow to user to specify that they only want discovery to be performed on the specific file on save.
The text was updated successfully, but these errors were encountered: