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

per file discovery on save #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

eleanorjboyd
Copy link
Owner

No description provided.

if (fileUri !== undefined) {
// filter out arg "." if it exits
const filteredPytestArgs = pytestArgs.filter((arg) => arg !== '.');
filteredPytestArgs.push(fileUri.fsPath);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting it together. I believe you also need to push "-k" at the beginning unless I misunderstood how this part works. But I think this only affects running tests, i.e. after collecting, so it probably doesn't affect performance.
I have also seen that there are other options:

  --ignore=path         ignore path during collection (multi-allowed).
  --ignore-glob=path 
  --override-ini python_files (args):  glob-style file patterns for Python test module discovery

Maybe python_files is the one to use, but I also dont know if it will work since it may not support full file paths. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants