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

Add autoTestDiscoverOnSavePattern setting to filter when discovery is run #24817

Closed
karthiknadig opened this issue Feb 14, 2025 · 3 comments · Fixed by #24728
Closed

Add autoTestDiscoverOnSavePattern setting to filter when discovery is run #24817

karthiknadig opened this issue Feb 14, 2025 · 3 comments · Fixed by #24728
Assignees
Labels
area-testing feature-request Request for new features or functionality needs PR Ready to be worked on verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@karthiknadig
Copy link
Member

No description provided.

@karthiknadig
Copy link
Member Author

Verification steps:

  1. Open a python project with tests written using pytest
  2. Ensure tests are discovered. Making changes to any python file should trigger discovery.
  3. Add python.testing.autoTestDiscoverOnSavePattern and use glob pattern to filter out some files.
  4. Only editing those files should trigger discovery.

@roblourens roblourens added the verified Verification succeeded label Feb 26, 2025
@roblourens
Copy link
Member

You might look at our files.exclude / search.exclude settings for a different structure. It's an object with glob keys which lets you layer the setting, turning off or on individual patterns at different settings scopes. Like I might want to set some glob for autoTestDiscoverOnSavePattern in my user settings, and another one in my workspace settings, and have both applied?

@karthiknadig
Copy link
Member Author

That is a great suggestion, created #24848 to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-testing feature-request Request for new features or functionality needs PR Ready to be worked on verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants