skillfed

pytest-watch

Local continuous test runner with pytest and watchdog.

pytest-watch v4.2.0 946.1K downloads/30d#4,666 on PyPI764
Permissive license MIT Abandoned released

What it is and what it does

pytest-watch is a command-line tool that monitors your project directory and automatically re-runs pytest whenever a file changes. It eliminates the manual cycle of editing code, switching to a terminal, and running tests by hand—instead, tests run continuously in the background and notify you of pass/fail status. The tool is zero-config by default but can be customized via pytest.ini to ignore directories, adjust file extensions, run setup/teardown commands, or trigger external notifications.

The package relies on watchdog for file system monitoring. It offers a range of options including custom test runners, interactive debugger integration, and the ability to run arbitrary shell commands before tests, after tests, or on pass/fail events. However, the project is abandoned—last updated in May 2018 with no recent maintenance—which raises compatibility concerns with modern pytest and Python versions.

Use it for:

  • Test-driven development workflow where you want tests to run automatically as you edit code without manual intervention.
  • Debugging complex test failures by running tests continuously while iterating on fixes, with optional beep or desktop notifications on failure.
  • Pre-commit validation by running a custom command after each test pass to enforce code quality checks or database cleanup.
  • Development in virtual machines or containers where OS-level file events may not work reliably, using the --poll option for polling-based file monitoring.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Runs pytest continuously, re-executing tests whenever project files change, with optional notifications and custom commands on pass or fail.

No. The package is abandoned (last release May 2018, no commits since July 2022) and has high install friction due to source-only distribution and unspecified Python version support. While the core idea is sound, the lack of maintenance means it will likely fail on modern Python versions or with current pytest releases. Consider actively maintained alternatives before installing.

Install

pytest-watch on PyPI

pip

pip install pytest-watch

uv

uv add pytest-watch

poetry

poetry add pytest-watch

Installing pytest-watch

Before you install

High install friction due to source distribution only. Package is abandoned—last release May 2018, no commits since July 2022, and no maintenance activity for many years. Relies on watchdog for file monitoring, which may have unmet system dependencies.

License in practice

MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

$ pip install pytest-watch
$ cd myproject
$ ptw
# Watches for file changes and re-runs pytest automatically

Requires watchdog library and its system dependencies (varies by OS); no explicit Python version constraint specified in package metadata.

Verify before relying

  • Whether watchdog's system-level file monitoring dependencies are documented or automatically resolved on all target platforms.
  • Current compatibility with modern pytest versions and Python 3.x releases, given the package has not been updated since 2018.
  • Whether the beep-on-failure feature and OS-specific notification commands still work on current systems.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 3,008 days since the last release
Last repo commit
First released
Downloads 946,128/month — #4,666 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pytest-watch-4.2.0.tar.gz

Tags

continuous test runnerpytest file watcherauto-rerun tests on changetest-driven development workflowpytest watch modelive test feedbackpytest auto-runner
abandonedfile-watchertest-automation

More Testing packages