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

Integration with pytest-watch #661

Open
brunolnetto opened this issue Oct 1, 2024 · 4 comments
Open

Integration with pytest-watch #661

brunolnetto opened this issue Oct 1, 2024 · 4 comments

Comments

@brunolnetto
Copy link

Summary

I am able to run pytest in watch mode using package pytest-watch. However, when I want to see the code coverage with pytest-cov, I have to run command below. Can you provide a watch mode for pytest-cov as well

coverage run -m pytest
coverage report -m
@nedbat
Copy link
Collaborator

nedbat commented Oct 1, 2024

You might like entr (http://eradman.com/entrproject/) which runs arbitrary commands when files change. Is there a reason this has to be tightly integrated with pytest?

@brunolnetto
Copy link
Author

Well, for the same reason pytest-watch is a great dev tool.

@nedbat
Copy link
Collaborator

nedbat commented Oct 2, 2024

Well, for the same reason pytest-watch is a great dev tool.

Can you explain why? What does it do that works better than entr?

@brunolnetto
Copy link
Author

Sure. The arguments are twofolded:

  1. Usability: instead of memorizing an additional command, entr, having a tag like '--watch' i.e. '-w' would make the experience valuable;
  2. Compliance: complies to pytest-watch interface, which is a familiar tool already.

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

No branches or pull requests

2 participants