pytest-watch is a zero-config command-line interface (CLI) tool that continuously runs `pytest` and automatically re-executes tests when relevant files in your project change. It enhances the testing workflow by providing features such as audible beeps on test failures and the ability to run custom commands before or after test executions. Although it reached version 4.2.0, the project is considered unmaintained, with its official GitHub repository and PyPI page providing the primary documentation.
pip install pytest-watchNo compatibility data collected yet for this library.
Navigate to your project directory and run 'ptw' (or 'pytest-watch') to start watching for file changes and re-running tests.
Consider migrating to `pytest-watcher` (pip install pytest-watcher) for an actively maintained alternative.
Ensure critical configurations are in `pytest.ini` or consider using `pytest-watcher` which addresses this.
Run `ptw --wait` to ensure tests finish before interruption.
Explicitly specify directories to watch using `ptw <dir1> <dir2>...` or consider alternative solutions if issues persist. Check `pytest-watch`'s `--ignore` option, which also affects watching.