Skip to content

Integration with pytest-watch #661

Open

Description

@brunolnetto

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

Activity

  1. nedbat commented on Oct 1, 2024

    @nedbat
    Collaborator

    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?

  2. brunolnetto commented on Oct 1, 2024

    @brunolnetto
    Author

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

  3. nedbat commented on Oct 2, 2024

    @nedbat
    Collaborator

    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?

  4. brunolnetto commented on Oct 2, 2024

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions