1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
.TH PYTEST\-WATCHER 1 "June 2025" "pytest-watcher 0.4.3" "User Commands"
.nh
.SH NAME
.PP
pytest-watcher - Automatically rerun Python tests on code changes
.SH DESCRIPTION
\fBpytest-watcher\fR is a tool to automatically rerun tests (using \fBpytest\fR by default) whenever your code changes.
It is designed to be simple, effective, and compatible with most Python projects out of the box.
The watcher listens for file creation, deletion, modification, and move events. Upon detecting changes, it re-runs your
tests with the most recent code state.
Unlike tools that rely on polling, \fBpytest-watcher\fR uses the native system file monitoring API (where supported)
to efficiently detect file system events. For a list of supported platforms and caveats, see the watchdog documentation in the \fBLINKS\fR section.
\fBpytest-watcher\fR offers an interactive mode with handy keyboard shortcuts.
.SH USAGE
Specify the path that you want to watch:
.IP
.EX
ptw .
.EE
or
.IP
.EX
ptw /home/repos/project
.EE
\fBpytest-watcher\fR passes all arguments following \fI<path>\fR to the test runner (defaulting to \fBpytest\fR), except for its own reserved options (see \fBOPTIONS\fR).
For example:
.IP
.EX
ptw . -x --lf --nf
.EE
This will invoke the test runner as:
.IP
.EX
pytest -x --lf --nf
.EE
.SH OPTIONS
The following options are reserved for \fBpytest-watcher\fR and will not be passed to the test runner:
.TP
\fB--runner\fR
Specify an alternative test runner.
.TP
\fB--patterns\fR
Specify file patterns to watch.
.TP
\fB--ignore-patterns\fR
Specify file patterns to ignore.
.TP
\fB--now\fR
Run tests immediately after starting the watcher.
.TP
\fB--delay\fR
Specify the delay before running tests.
.TP
\fB--clear\fR
Clear the terminal screen before each test run.
.SH LINKS
Watchdog documentation:
https://python-watchdog.readthedocs.io/en/stable/installation.html#supported-platforms-and-caveats
.SH LICENSE
MIT
.SH COPYRIGHT
Copyright (c) 2021 Olzhas Arystanov
.SH "MAN PAGE"
Enkelena Haxhija (EnkelenaH) created this man page based on the upstream README
|