Skip to content

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

Closed
eleanorjboyd opened this issue Dec 1, 2023 · 5 comments
Closed

Only Run Test Discovery for Specific File On Save #22582

eleanorjboyd opened this issue Dec 1, 2023 · 5 comments
Assignees
Labels
area-testing feature-request Request for new features or functionality

Comments

@eleanorjboyd
Copy link
Member

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 are true and false, with true then every time a file in the editor is saved, test discovery is run and with false 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.

@eleanorjboyd eleanorjboyd added feature-request Request for new features or functionality area-testing needs community feedback Awaiting community feedback labels Dec 1, 2023
@eleanorjboyd eleanorjboyd self-assigned this Dec 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

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.

@eleanorjboyd
Copy link
Member Author

@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

@shanewazabbas
Copy link

Awesome Thanks, @eleanorjboyd. I'll take a look tomorrow, was busy with work all day today, so haven't had time.

@eleanorjboyd
Copy link
Member Author

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

@eleanorjboyd eleanorjboyd closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2023
@github-actions github-actions bot removed the needs community feedback Awaiting community feedback label Dec 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 5, 2024
@eleanorjboyd
Copy link
Member Author

@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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants